PDA

View Full Version : 11.04 server, GRUB and software raid issue



b0ba
July 27th, 2011, 01:53 PM
Hi There!

Anybody who is familiar with GRUB and
software raids may be can help me to solve issue.

Enviroment:
Ubuntu server is 11.04 64 bit, 2 HDD, 500gb each. Each HDD has 3 partitions:
/boot, root and swap. Each of the partitions joined to software RAID1, mirroring.

I install 11.04 64 bit and after reboot I have got "invalid arch independent elf magic" in GRUB. Ubuntu 9.04 works fine in the he same enviroment.

Looking forward any help and suggestions.

b0ba
July 28th, 2011, 02:35 PM
I read a lot of hints, don't put SWAP to the raid1, no sense, I reconfigured and made fresh install.
Now I have /dev/md0/ - /boot (ext4) and /dev/md1 - / (ext4), but GRUB throws me exception again after reboot : "no such disk". According hints from other threads I boot from Live CD and start Boot Info Script 0.60. See RESULTS.txt from it. What is wrong again ?

b0ba
July 28th, 2011, 02:39 PM
RESULTS.txt
Boot Info Script 0.60 from 17 May 2011


============================= Boot Info Summary: ===============================

=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at sector
1 of the same hard drive for core.img. core.img is at this location and
looks for (md0)/boot/grub on this drive.
=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sdb and looks at sector
1 of the same hard drive for core.img. core.img is at this location and
looks for (md0)/boot/grub on this drive.

sda1: __________________________________________________ ________________________

File system:
Boot sector type: -
Boot sector info:
Mounting failed: mount: unknown filesystem type ''

sda2: __________________________________________________ ________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sda6: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sda7: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

sdb1: __________________________________________________ ________________________

File system:
Boot sector type: -
Boot sector info:
Mounting failed: mount: unknown filesystem type ''
mount: unknown filesystem type ''

sdb2: __________________________________________________ ________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sdb5: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sdb6: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sdb7: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

============================ Drive/Partition Info: =============================

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 2,048 4,095 2,048 fd Linux raid autodetect
/dev/sda2 6,142 976,771,071 976,764,930 5 Extended
/dev/sda5 6,144 1,957,887 1,951,744 fd Linux raid autodetect
/dev/sda6 21,694,464 976,771,071 955,076,608 fd Linux raid autodetect
/dev/sda7 1,959,936 21,688,319 19,728,384 82 Linux swap / Solaris


Drive: sdb __________________________________________________ ___________________

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdb1 2,048 4,095 2,048 fd Linux raid autodetect
/dev/sdb2 6,142 976,771,071 976,764,930 5 Extended
/dev/sdb5 6,144 1,957,887 1,951,744 fd Linux raid autodetect
/dev/sdb6 21,694,464 976,771,071 955,076,608 fd Linux raid autodetect
/dev/sdb7 1,959,936 21,688,319 19,728,384 82 Linux swap / Solaris


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda5 5db37a62-21c8-bcab-9522-eb6bc2319155 linux_raid_member dbs12:0
/dev/sda6 a424d895-07ae-012b-8a3d-c2f8435e4a95 linux_raid_member dbs12:1
/dev/sda7 2eb5aea8-aa35-491b-a3c1-87690641d83e swap
/dev/sdb7 4f6a56f7-d808-45d7-a56e-f37913246674 swap

YesWeCan
July 28th, 2011, 04:28 PM
Erm.
You seem to have 4 partitions set up. What is the fourth?
I suspect Grub's kernel cannot find a file it needs. So it is looking in the wrong place. It may be possible to manually boot from the rescue> prompt and then you can reinstall Grub.
Have a look at: https://wiki.archlinux.org/index.php/GRUB2#Using_the_command_shell section "Using the rescue console".

b0ba
July 28th, 2011, 06:04 PM
so as I told sda5 and sda6 partitions could be mount to md0.
from grub panel:

grub> insmod raid
grub> set root=(md0)
grub> linux /boot/vmlinuz26 root=/dev/md0

I have got again "no such disk"

I have tried to add :grub> insmod mdraid
and I have error : file not found. May be this is reason.

YesWeCan
July 29th, 2011, 01:12 AM
When you installed 11.04 did you also reinstall Grub to the MBRs? 11.04 uses Grub 1.99 and your bootinfoscript is showing an earlier version. I think they need to match.

It may be possible to boot the 11.04 live CD and see if it sees the RAID arrays (install mdadm if not). Then use it to reinstall Grub to the MBRs. I would assume you can do it the normal way like this:
sudo mount /dev/md0 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
sudo grub-install --root-directory=/mnt /dev/sdb

I also see that in bootinfoscript the Grub core looks for (md0)/boot/grub which seems wrong to me if you have a separate boot partition: it should be (md0)/grub. So there may be a couple of things wrong here. I'm not sure why it worked with 9.10 unless, as I suggest, Grub was not reinstalled when 11.04 was installed.

I have booted a non-RAID from the rescue prompt. I have not tried to boot a RAID. For a non-RAID without separate boot partition you do this (assuming your root patition is hd0,2):
rescue> ls
to see what partitions Grub can detect. Does yours see (md0) and (md1)?
rescue> set prefix=(hd0,2)/boot/grub
rescue> insmod (hd0,2)/boot/grub/linux.mod
rescue> set root=(hd0,2)
rescue> linux /vmlinuz root=/dev/sda2 ro
rescue> initrd /initrd.img
rescue> boot

If yours sees (md0) you might try:
rescue> insmod raid
rescue> set prefix=(md0)/grub
rescue> insmod (md0)/grub/linux.mod
rescue> set root=(md0)
rescue> linux /vmlinuz root=/dev/md0 ro
rescue> initrd /initrd.img
rescue> boot

b0ba
July 29th, 2011, 02:44 PM
Thank you very much for quick answer. I loaded again from LIVE CD ( Ubuntu Desktop 11.04 ). See log, step by step what I did.
I have following question:
I dont see mdadm.mod file in the grub folder, but grub config file has it. is it OK ?
Seem not, because grub throws error : no such file


ubuntu@ubuntu:~$ uname -a
Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"
ubuntu@ubuntu:~$ sudo mount /dev/md0 /mnt
mount: special device /dev/md0 does not exist
ubuntu@ubuntu:~$ sudo apt-get install mdadm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
mdadm postfix
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
..
Setting up mdadm (3.1.4-1+8efb9d1ubuntu4) ...
* Starting MD monitoring service mdadm --monitor [ OK ]
Setting up postfix (2.8.2-1ubuntu1) ...
Done.
ubuntu@ubuntu:~$ sudo mdadm --assemble --scan
mdadm: /dev/md/0 has been started with 2 drives.
mdadm: /dev/md/1 has been started with 2 drives.
ubuntu@ubuntu:~$ sudo mount /dev/md0 /mnt
ubuntu@ubuntu:~$ ls /mnt/
abi-2.6.38-8-server initrd.img-2.6.38-8-server memtest86+_multiboot.bin vmlinuz-2.6.38-8-server
config-2.6.38-8-server lost+found System.map-2.6.38-8-server
grub memtest86+.bin vmcoreinfo-2.6.38-8-server
ubuntu@ubuntu:~$ ls /mnt/grub
acpi.mod ext2.mod hello.mod ntfscomp.mod sleep.mod
affs.mod extcmd.mod help.mod ntfs.mod squash4.mod
afs_be.mod fat.mod hexdump.mod ohci.mod tar.mod
afs.mod fixvideo.mod hfs.mod part_acorn.mod terminal.lst
aout.mod font.mod hfsplus.mod part_amiga.mod terminal.mod
appleldr.mod fshelp.mod iorw.mod part_apple.mod terminfo.mod
ata.mod fs.lst iso9660.mod part_bsd.mod test_blockarg.mod
ata_pthru.mod functional_test.mod jfs.mod part_gpt.mod testload.mod
at_keyboard.mod gcry_arcfour.mod jpeg.mod partmap.lst test.mod
befs_be.mod gcry_blowfish.mod keylayouts.mod part_msdos.mod tga.mod
befs.mod gcry_camellia.mod keystatus.mod part_sun.mod trig.mod
bitmap.mod gcry_cast5.mod linux.mod part_sunpc.mod true.mod
bitmap_scale.mod gcry_crc.mod loadbios.mod parttool.lst udf.mod
blocklist.mod gcry_des.mod loadenv.mod parttool.mod ufs1.mod
boot.mod gcry_md4.mod locale password.mod ufs2.mod
bsd.mod gcry_md5.mod loopback.mod password_pbkdf2.mod uhci.mod
btrfs.mod gcry_rfc2268.mod lsacpi.mod pbkdf2.mod usb_keyboard.mod
bufio.mod gcry_rijndael.mod lsefimmap.mod pci.mod usb.mod
cat.mod gcry_rmd160.mod lsefisystab.mod play.mod usbms.mod
chain.mod gcry_seed.mod lsmmap.mod png.mod usbserial_common.mod
cmp.mod gcry_serpent.mod ls.mod probe.mod usbserial_ftdi.mod
command.lst gcry_sha1.mod lspci.mod raid5rec.mod usbserial_pl2303.mod
configfile.mod gcry_sha256.mod lssal.mod raid6rec.mod usbtest.mod
core.efi gcry_sha512.mod lvm.mod raid.mod video_bochs.mod
cpio.mod gcry_tiger.mod mdraid09.mod read.mod video_cirrus.mod
cpuid.mod gcry_twofish.mod mdraid1x.mod reboot.mod video_fb.mod
crypto.lst gcry_whirlpool.mod memdisk.mod regexp.mod videoinfo.mod
crypto.mod gettext.mod memrw.mod reiserfs.mod video.lst
cs5536.mod gfxmenu.mod minicmd.mod relocator.mod video.mod
datehook.mod gfxterm.mod minix2.mod scsi.mod videotest.mod
date.mod gptsync.mod minix.mod search_fs_file.mod xfs.mod
datetime.mod grub.cfg mmap.mod search_fs_uuid.mod xnu.mod
dm_nv.mod grub.efi moddep.lst search_label.mod xnu_uuid.mod
echo.mod grubenv msdospart.mod search.mod xzio.mod
efi_gop.mod gzio.mod multiboot2.mod serial.mod zfsinfo.mod
efi_uga.mod halt.mod multiboot.mod setjmp.mod zfs.mod
elf.mod hashsum.mod nilfs2.mod setpci.mod
example_functional_test.mod hdparm.mod normal.mod sfs.mod
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt/ /dev/sda
Installation finished. No error reported.
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt/ /dev/sdb
Installation finished. No error reported.
ubuntu@ubuntu:~$ ls /mnt/grub
acpi.mod ext2.mod hello.mod ntfscomp.mod sleep.mod
affs.mod extcmd.mod help.mod ntfs.mod squash4.mod
afs_be.mod fat.mod hexdump.mod ohci.mod tar.mod
afs.mod fixvideo.mod hfs.mod part_acorn.mod terminal.lst
aout.mod font.mod hfsplus.mod part_amiga.mod terminal.mod
appleldr.mod fshelp.mod iorw.mod part_apple.mod terminfo.mod
ata.mod fs.lst iso9660.mod part_bsd.mod test_blockarg.mod
ata_pthru.mod functional_test.mod jfs.mod part_gpt.mod testload.mod
at_keyboard.mod gcry_arcfour.mod jpeg.mod partmap.lst test.mod
befs_be.mod gcry_blowfish.mod keylayouts.mod part_msdos.mod tga.mod
befs.mod gcry_camellia.mod keystatus.mod part_sun.mod trig.mod
bitmap.mod gcry_cast5.mod linux.mod part_sunpc.mod true.mod
bitmap_scale.mod gcry_crc.mod loadbios.mod parttool.lst udf.mod
blocklist.mod gcry_des.mod loadenv.mod parttool.mod ufs1.mod
boot.mod gcry_md4.mod locale password.mod ufs2.mod
bsd.mod gcry_md5.mod loopback.mod password_pbkdf2.mod uhci.mod
btrfs.mod gcry_rfc2268.mod lsacpi.mod pbkdf2.mod usb_keyboard.mod
bufio.mod gcry_rijndael.mod lsefimmap.mod pci.mod usb.mod
cat.mod gcry_rmd160.mod lsefisystab.mod play.mod usbms.mod
chain.mod gcry_seed.mod lsmmap.mod png.mod usbserial_common.mod
cmp.mod gcry_serpent.mod ls.mod probe.mod usbserial_ftdi.mod
command.lst gcry_sha1.mod lspci.mod raid5rec.mod usbserial_pl2303.mod
configfile.mod gcry_sha256.mod lssal.mod raid6rec.mod usbtest.mod
core.efi gcry_sha512.mod lvm.mod raid.mod video_bochs.mod
cpio.mod gcry_tiger.mod mdraid09.mod read.mod video_cirrus.mod
cpuid.mod gcry_twofish.mod mdraid1x.mod reboot.mod video_fb.mod
crypto.lst gcry_whirlpool.mod memdisk.mod regexp.mod videoinfo.mod
crypto.mod gettext.mod memrw.mod reiserfs.mod video.lst
cs5536.mod gfxmenu.mod minicmd.mod relocator.mod video.mod
datehook.mod gfxterm.mod minix2.mod scsi.mod videotest.mod
date.mod gptsync.mod minix.mod search_fs_file.mod xfs.mod
datetime.mod grub.cfg mmap.mod search_fs_uuid.mod xnu.mod
dm_nv.mod grub.efi moddep.lst search_label.mod xnu_uuid.mod
echo.mod grubenv msdospart.mod search.mod xzio.mod
efi_gop.mod gzio.mod multiboot2.mod serial.mod zfsinfo.mod
efi_uga.mod halt.mod multiboot.mod setjmp.mod zfs.mod
elf.mod hashsum.mod nilfs2.mod setpci.mod
example_functional_test.mod hdparm.mod normal.mod sfs.mod

ubuntu@ubuntu:~$ sudo umount /dev/md0
ubuntu@ubuntu:~$ sudo reboot

b0ba
July 29th, 2011, 03:14 PM
After reboot I have again GRUB console. See attached picture from server room.
May be was bad idea set up insmod mdadm09, but folder with grub has no mdadm at all.
Anyway something is wrong here. Found one task:
http://savannah.gnu.org/task/?10513
task #10513 (http://savannah.gnu.org/task/?10513): Split mdraid.mod into mdraid09.mod and mdraid10.mod
P.S. Forget to answer:
for (md0)/boot/grub which seems wrong to me if you have a separate boot partition:
(md0) is /boot partitions. it is RAID1.

mjcramer
July 29th, 2011, 09:24 PM
Hi there,

I am having the exact same problem. My setup is slightly simpler than yours in that I'm just using raid0 to stripe two drives in my laptop. I have one raid partition (/dev/md0) for my root filesystem and am able to boot as long as the /boot partition is installed on another drive (for me, /dev/sda1). However, if I change grub to look for (md0), it drops me to a rescue prompt with "file not found". I believe (and at this point am fairly certain) that grub does not insmod raid and mdraid1x (I'm using 1.2 superblocks) and therefore has no idea what (md0). I know this because when I 'ls' at the rescue prompt, (md0) isn't there, but as soon as I insert those modules, it is.

I've added the insmods everywhere I can find in grub.cfg, but to no avail. Which makes sense because how can grub load raid modules on which are located on a raid array. Which one's the chicken and which one's the egg? I don't know how you can get grub's core.img to understand raid and I can't find anything on the web about it. I'm just going to install the boot part on /dev/sda1 and be done with it...

YesWeCan
July 30th, 2011, 11:10 AM
I believe there is a way of installing Grub with the raid module included but I can't recall the command.

Try a chroot reinstall. See section 12.4 here: https://help.ubuntu.com/community/Grub2#ChRoot
You have to install mdadm in live CD first. Don't forget to mount the boot partition.

BTW Grub 1.99 can (is designed to) boot a RAID without needing a separate boot partition.

YesWeCan
July 30th, 2011, 01:19 PM
I've added the insmods everywhere I can find in grub.cfg, but to no avail. Which makes sense because how can grub load raid modules on which are located on a raid array. Which one's the chicken and which one's the egg? I don't know how you can get grub's core.img to understand raid and I can't find anything on the web about it. I'm just going to install the boot part on /dev/sda1 and be done with it...
Which version of Grub are you using?
The trick is to be booted in Ubuntu with your desired partition mounted at /boot and specified in fstab and and containing the correct files.
Then do
sudo update-grub
sudo grub-install /dev/sdx (set x to the disk letter, repeat for each RAID disk)
sudo update-initramfs -u

This will make sure the Grub core has the necessary raid modules.

As I say, if you are using Grub1.99 you don't need a separate /boot at all. If you change this then make sure the /boot in root has the correct files in it (copy them from your working, separate boot partition).

b0ba
August 1st, 2011, 03:45 PM
I gave up with RAID1 in boot and I have made decision /boot partion will be just single drive. I have made fresh install of 11.04 and I can say 11.04 is bug on bug. I have again "no such disk" and I have rescue console at the screen. I have very simple enviroment right now, but with the same crap result. What is wrong again with GRUB?
I loaded again from LIVE CD ( Ubuntu Desktop 11.04 ). Reinstall GRUB manually and now I have again GRUB console. See screen, but without any messages at all. But system did not load.



Boot Info Script 0.60 from 17 May 2011


============================= Boot Info Summary: ===============================

=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (md/0)/boot/grub on this drive.
=> Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (md/0)/boot/grub on this drive.

sda1: __________________________________________________ ________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files: /grub/grub.cfg

sda2: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

sda3: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sdb1: __________________________________________________ ________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System:
Boot files:

sdb2: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

sdb3: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

============================ Drive/Partition Info: =============================

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 2,048 499,711 497,664 83 Linux
/dev/sda2 499,712 31,750,143 31,250,432 82 Linux swap / Solaris
/dev/sda3 31,750,144 976,771,071 945,020,928 fd Linux raid autodetect


Drive: sdb __________________________________________________ ___________________

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdb1 2,048 499,711 497,664 83 Linux
/dev/sdb2 499,712 31,750,143 31,250,432 82 Linux swap / Solaris
/dev/sdb3 31,750,144 976,771,071 945,020,928 fd Linux raid autodetect


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 4660df73-1146-4cab-8ede-48153523d10c ext4
/dev/sda2 f2a615d7-1e07-4473-8e97-1b9e348bbdaf swap
/dev/sda3 aa7b26e0-b3d1-34f8-0479-652d480f3dbc linux_raid_member dbs16:1
/dev/sdb1 5d5b547e-a623-40c3-aac3-9c286b2ae136 ext4
/dev/sdb2 b164a099-4b9b-43c6-b709-f774f4d206de swap

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sr0 /cdrom iso9660 (ro,noatime)


============================= sda1/grub/grub.cfg: ==============================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
}

insmod raid
insmod mdraid1x
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md/1)'
search --no-floppy --fs-uuid --set=root a4d2b84f-6f9e-4760-8de3-477a1baacd90
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 4660df73-1146-4cab-8ede-48153523d10c
set locale_dir=($root)/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-server' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 4660df73-1146-4cab-8ede-48153523d10c
linux /vmlinuz-2.6.38-8-server root=UUID=a4d2b84f-6f9e-4760-8de3-477a1baacd90 ro quiet
initrd /initrd.img-2.6.38-8-server
}
menuentry 'Ubuntu, with Linux 2.6.38-8-server (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 4660df73-1146-4cab-8ede-48153523d10c
echo 'Loading Linux 2.6.38-8-server ...'
linux /vmlinuz-2.6.38-8-server root=UUID=a4d2b84f-6f9e-4760-8de3-477a1baacd90 ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.38-8-server
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 4660df73-1146-4cab-8ede-48153523d10c
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 4660df73-1146-4cab-8ede-48153523d10c
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=================== sda1: Location of files loaded by Grub: ====================

GiB - GB File Fragment(s)

0.014257431 = 0.015308800 grub/grub.cfg 1
0.055302620 = 0.059380736 initrd.img-2.6.38-8-server 3
0.018915176 = 0.020310016 vmlinuz-2.6.38-8-server 1

=============================== StdErr Messages: ===============================

unlzma: Decoder error
unlzma: Decoder error

b0ba
August 2nd, 2011, 08:16 PM
Can anybody send here GRUB config and partitions from correctly working server 11.04?

MAFoElffen
August 2nd, 2011, 09:43 PM
Hi There!

Anybody who is familiar with GRUB and
software raids may be can help me to solve issue.

Enviroment:
Ubuntu server is 11.04 64 bit, 2 HDD, 500gb each. Each HDD has 3 partitions:
/boot, root and swap. Each of the partitions joined to software RAID1, mirroring.

I install 11.04 64 bit and after reboot I have got "invalid arch independent elf magic" in GRUB. Ubuntu 9.04 works fine in the he same enviroment.

Looking forward any help and suggestions.
Let me get this straight-- (Only quickly looked this over)...

All your partitions are in RAID? The definitions for Grub2 to read a RAID array is in the second part of Grub... meaning in /boot/grub. If that is in your array... well it gets an error saying "unknown filesystem"... because it can't read striped data it without those grub driver files to interpret the array definition.

Here's the ways I get around that:
Method #1- Use a small drive to use as a separate /boot and use it outside the defined array... I do this as a primary rule of thumb... but I get these drives for free...

Method #2- Use a small drive to use as a separate /boot and use it outside the array... You are sort-of doing this already, but I think it's inside your defined array?

Method #3- Use a pendrive, cd or floppy as your /boot... as sort of a bootstrap "key."

Method #4- Some hardware RAID you can boot from...Some RAID types you can boot from... RAID 1 is one... but I was continually playing with... Like adding entries into 40_custom to boot if there was a disk failure. Let me look if I have an old copy of my grub boot files for those...

Most of mine are Older Hardware, but with hardware RAID's-- and I use the above methods, but I use like 10 plus drives on my servers. For me, for a usual a rule-of-thumb:


sda1 Normal partition def /boot
sdb1 thru sdb 1 RAID 1 (mirrored) /
sdc1 thru sdx RAID 5 thru RAID 10 /home and other critical data

b0ba
August 3rd, 2011, 09:37 AM
Let me get this straight-- (Only quickly looked this over)...

All your partitions are in RAID? The definitions for Grub2 to read a RAID array is in the second part of Grub... meaning in /boot/grub. If that is in your array... well it gets an error saying "unknown filesystem"... because it can't read striped data it without those grub driver files to interpret the array definition.

Here's the ways I get around that:
Method #1- Use a small drive to use as a separate /boot
[/code]

See my post N12, I did exactly the same. Is not working.

YesWeCan
August 3rd, 2011, 10:54 AM
In your grub> console it sees (md/1). Have you tried setting this as root and then the other boot commands? Its all in that link to "Ubuntu Grub2"

Your grub files are readable but grub.cfg is wrong which is why the console appears. It doesn't seem to contain raid commands. So somewhere along the line this file has not been updated.

The bootinfoscript is not showing all the info. I think this is either because you ran it from CD without installing mdadm or bootinfoscript cannot deal with raid partitions. It is missing /etc/fstab and the raid entries for blkid. I would also want to see /etc/mdadm/mdadm.conf.

The chroot ought to work. Boot live CD, install mdadm, then use chroot method (also in that link) to do an update-grub. This should sort the grub.cfg file out. You do not need to do grub-install because that is working fine.

Failing all that, why not start again? First boot CD and do "format drive" in Disk Utility to renew the MBRs on each disk. Then boot from the alternate install CD and create your RAID1 (do not make a separate boot partition, it is not needed) and use LVM to make partitions: root, home, swap, etc.

b0ba
August 3rd, 2011, 01:51 PM
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ sudo apt-get install mdadm
Setting up mdadm (3.1.4-1+8efb9d1ubuntu4) ...
Generating mdadm.conf... done.
Done.

ubuntu@ubuntu:~$ sudo mdadm --assemble --scan
mdadm: /dev/md/1 has been started with 2 drives.
ubuntu@ubuntu:~$ sudo mount /dev/md1 /mnt
ubuntu@ubuntu:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
aufs 2023640 87784 1935856 5% /
none 2015564 644 2014920 1% /dev
/dev/sr0 714954 714954 0 100% /cdrom
/dev/loop0 680704 680704 0 100% /rofs
none 2023640 164 2023476 1% /dev/shm
tmpfs 2023640 20 2023620 1% /tmp
none 2023640 100 2023540 1% /var/run
none 2023640 0 2023640 0% /var/lock
/dev/md1 465095264 1293460 440176340 1% /mnt
ubuntu@ubuntu:~$ fdisk -l
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/boot

ubuntu@ubuntu:~/Downloads$ ls
boot_info_script060.zip boot_info_script.sh CHANGELOG
ubuntu@ubuntu:~/Downloads$ ls
boot_info_script060.zip boot_info_script.sh CHANGELOG
ubuntu@ubuntu:~/Downloads$ chmod 777 boot_info_script.sh
ubuntu@ubuntu:~/Downloads$ ./boot_info_script.sh

boot_info_script version: 0.60 [17 May 2011]


"gawk" could not be found, using "busybox awk" instead.
This may lead to unreliable results.

Please use "sudo" or become "root" to run this script.
ubuntu@ubuntu:~/Downloads$ sudo ./boot_info_script.sh

boot_info_script version: 0.60 [17 May 2011]


"gawk" could not be found, using "busybox awk" instead.
This may lead to unreliable results.

Identifying MBRs...
Computing Partition Table of /dev/sda...
Computing Partition Table of /dev/sdb...
Searching sda1 for information...
Searching sda2 for information...
Searching sda3 for information...
Searching sdb1 for information...
Searching sdb2 for information...
Searching sdb3 for information...
Searching md/1 for information...

Finished. The results are in the file "RESULTS.txt"
located in "/home/ubuntu/Downloads/".

ubuntu@ubuntu:~/Downloads$ mv RESULTS.txt RESULTS.txt.1
ubuntu@ubuntu:~/Downloads$ sudo apt-get install gawk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
gawk
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 567 kB of archives.
After this operation, 1,307 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ natty/main gawk amd64 1:3.1.7.dfsg-5 [567 kB]
Fetched 567 kB in 2s (215 kB/s)
Selecting previously deselected package gawk.
(Reading database ... 134555 files and directories currently installed.)
Unpacking gawk (from .../gawk_1%3a3.1.7.dfsg-5_amd64.deb) ...
Processing triggers for man-db ...
Setting up gawk (1:3.1.7.dfsg-5) ...
ubuntu@ubuntu:~/Downloads$ sudo ./boot_info_script.sh

boot_info_script version: 0.60 [17 May 2011]

Identifying MBRs...
Computing Partition Table of /dev/sda...
Computing Partition Table of /dev/sdb...
Searching sda1 for information...
Searching sda2 for information...
Searching sda3 for information...
Searching sdb1 for information...
Searching sdb2 for information...
Searching sdb3 for information...
Searching md/1 for information...

Finished. The results are in the file "RESULTS.txt"
located in "/home/ubuntu/Downloads/".

ubuntu@ubuntu:~/Downloads$ for i in /dev/ /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
ubuntu@ubuntu:~/Downloads$ sudo chroot /mnt
root@ubuntu:/# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-server
Found initrd image: /boot/initrd.img-2.6.38-8-server
Found memtest86+ image: /memtest86+.bin
No volume groups found
done

b0ba
August 3rd, 2011, 01:59 PM
See prev. post from me. I have update of the GRUB and after reboot I have the same GRUB console as before. I made decision to erase 11.04 and downgrade to 10.04 stable release.

YesWeCan
August 3rd, 2011, 02:07 PM
Don't you need to mount the boot partition md0 at /boot in chroot or it will put the Grub files into (md1)/boot instead? You can copy the (md1)/boot/grub files into (md0)/grub.
Compare the contents of (md0)/grub and (md1)/boot/grub and you will see which you just modified.

FYI you can avoid using (md0) altogether by chrooting and then using the local (md1)/boot. Mount (md0) somewhere and copy all its contents to (md1)/boot. Then redo the update-grub and then grub-install to both sda and sdb. Now when Grub starts up it will look in (md1)/boot/ and the (md0) partition will not be used at all. Remove the (md0) mount directive in fstab too.

b0ba
August 3rd, 2011, 02:48 PM
Don't you need to mount the boot partition md0 -
No according my post 12, I have in the last config only one raid and boot I have
in /dev/sda1.

FormatSeize
August 3rd, 2011, 03:06 PM
From several installations last night, I found that grub really only likes something with the specific name "sda" associated with it. So what I ended up doing is installing 11.04 on a regular disk to get grub there. The other two disks are in a RAID 0, and I do the installation up until installing grub fails. Since grub failing happens after the installation, a system is still there.

Now, using the grub on sda, (a non-RAID disk), I can boot into the RAID, then update the system to (hopefully) pick up any loose pieces that I missed during installation when grub-install failed.

Now that I actually type it out, it seems like a really sloppy workaround. But I just started the whole RAID thing two days ago.

YesWeCan
August 3rd, 2011, 03:35 PM
-
No according my post 12, I have in the last config only one raid and boot I have
in /dev/sda1.
Sorry, I missed that.
So what does your newest grub.cfg contain? Check the file date. It should now have all the correct RAID directives.

This is my grub.cfg stanza for my Ubuntu OS on RAID10:

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md1)'
search --no-floppy --fs-uuid --set 824f4788-8258-44cc-8efb-f1fc54b0fba7
linux /vmlinuz-2.6.35-30-generic root=/dev/mapper/system-root ro quiet splash
initrd /initrd.img-2.6.35-30-generic
}11.04 on RAID does work. I have installed it. Actually, on RAID0 with no separate boot partition. Unless there is something very peculiar with your hardware it should work fine. If you start from scratch then I advise erasing your two disks by giving them new MBRs and then using the alternate install CD to make a RAID and LVM layer for multiple partitions and NO separate boot partition. Let the installer take care of all the details.

YesWeCan
August 3rd, 2011, 03:48 PM
From several installations last night, I found that grub really only likes something with the specific name "sda" associated with it.
That is what you have observed but your conclusion is not the general case. Grub will work on any MBR system disk that is not part of something weird like fakeraid. Grub 1.99 that comes with 11.04 is designed to boot any linux RAID directly and its boot program should be installed to the MBRs of the raid disks.


So what I ended up doing is installing 11.04 on a regular disk to get grub there. The other two disks are in a RAID 0, and I do the installation up until installing grub fails. Since grub failing happens after the installation, a system is still there. I think having a separate disk, like a USB stick, with Grub/Ubuntu on it is a very handy thing to have while debugging because you can use that Grub to boot any OS on your system. But you don't need it in normal operation when using linux raid.

psusi
August 3rd, 2011, 04:33 PM
Let me get this straight-- (Only quickly looked this over)...

All your partitions are in RAID? The definitions for Grub2 to read a RAID array is in the second part of Grub... meaning in /boot/grub. If that is in your array... well it gets an error saying "unknown filesystem"... because it can't read striped data it without those grub driver files to interpret the array definition.

When you install grub2 to a raid array, it detects this, and builds the raid module into the core image, thus avoiding the chicken and egg problem. You do not need a separate /boot partition.

I think I see the crazy path the OP has taken to run into so many problems:

First, when installing you will come to a screen asking what drives to install grub to. You need to check both sda and sdb. Based on the older versions originally reported, it appears you failed to do this.

Then when you reinstalled grub from the livecd, you did not install mdadm and mount the raid array to install grub there. Instead you mounted only an individual drive, and tried to install grub there, causing it not to build in the raid driver. Never mount one of the drives in the array individually; you must always go through the raid driver.

b0ba
August 3rd, 2011, 05:00 PM
I have made insallation of 10.04 server ( enviroment described in post 12 ). Server is working without any problems. Conclusion for me: don't touch 11.04, it is very very raw
release and main reason is raw GRUB2 in it, seems this release is working only for the desktops with very simple, typical configurations and software RAID partitions is not the case. I will wait before stable one will come, before, I am with 10.04.

YesWeCan
August 3rd, 2011, 05:52 PM
I just recreated something similar to your set-up in VirtualBox. I used the "Ubuntu 11.04 32-bit desktop alternate installer". I wanted to see whether there is a class problem.
Boots just fine.


@ubuntu:~$ sudo sfdisk -luS

Disk /dev/sda: 65970 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/sda1 * 2048 487423 485376 83 Linux
/dev/sda2 487424 29784063 29296640 82 Linux swap / Solaris
/dev/sda3 29784064 1006346239 976562176 fd Linux RAID autodetect
/dev/sda4 0 - 0 0 Empty

Disk /dev/sdb: 65970 cylinders, 255 heads, 63 sectors/track
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/sdb1 2048 487423 485376 83 Linux
/dev/sdb2 487424 29784063 29296640 82 Linux swap / Solaris
/dev/sdb3 29784064 1006346239 976562176 fd Linux RAID autodetect
/dev/sdb4 0 - 0 0 Empty

Disk /dev/md0: 122069982 cylinders, 2 heads, 4 sectors/track

sfdisk: ERROR: sector 0 does not have an MSDOS signature
/dev/md0: unrecognised partition table type
No partitions found
@ubuntu:~$ mount
/dev/md0 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
/dev/sda1 on /boot type ext4 (rw,commit=0)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/bam/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=bam)
/dev/sr0 on /media/VBOXADDITIONS_4.0.12_72916 type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000, iocharset=utf8,mode=0400,dmode=0500)
grub.cfg stanza:

menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root cb4ea337-c67e-4d75-b9fc-7ef2dc864fd0
linux /vmlinuz-2.6.38-8-generic root=UUID=54d78a76-aabc-4886-82a0-7019e8ae731d ro quiet splash vt.handoff=7
initrd /initrd.img-2.6.38-8-generic
}
@ubuntu:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/md0 during installation
UUID=54d78a76-aabc-4886-82a0-7019e8ae731d / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=cb4ea337-c67e-4d75-b9fc-7ef2dc864fd0 /boot ext4 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=39cc635f-cdb3-4da5-88eb-9f8bbd5a1ce2 none swap sw 0 0
# swap was on /dev/sdb2 during installation
UUID=1c0a462e-f2f4-4d83-9a77-1f45a3dbad69 none swap sw 0 0

psusi
August 3rd, 2011, 06:05 PM
I have made insallation of 10.04 server ( enviroment described in post 12 ). Server is working without any problems. Conclusion for me: don't touch 11.04, it is very very raw
release and main reason is raw GRUB2 in it, seems this release is working only for the desktops with very simple, typical configurations and software RAID partitions is not the case. I will wait before stable one will come, before, I am with 10.04.

Don't jump to conclusions. Everyone else seems to manage to get that setup to work fine in 11.04, and 10.04 also uses grub2.





set root='(/dev/sda,msdos1)'



What the?! That isn't valid. Grub uses hd0, not /dev/sda.

YesWeCan
August 3rd, 2011, 06:13 PM
What the?! That isn't valid. Grub uses hd0, not /dev/sda.
Apparently Grub 1.99 does.

psusi
August 3rd, 2011, 06:19 PM
Apparently Grub 1.99 does.

If you disable the search directives, does it still boot? I would suspect not. With the search directive, the root is set to the correct device automatically so it doesn't matter that the previous setting was wrong.

YesWeCan
August 3rd, 2011, 06:32 PM
If you disable the search directives, does it still boot? I would suspect not. With the search directive, the root is set to the correct device automatically so it doesn't matter that the previous setting was wrong.
Well well. It errors out when the search line is commented out. Can't find the kernel.
So the update-grub generates a grub.cfg directive that is unusable. Nice.
Using "set root='(hd0,1)' and the search commented out it works.

psusi
August 3rd, 2011, 07:16 PM
Well well. It errors out when the search line is commented out. Can't find the kernel.
So the update-grub generates a grub.cfg directive that is unusable. Nice.
Using "set root='(hd0,1)' and the search commented out it works.

Bug report time? ;)

b0ba
August 3rd, 2011, 07:21 PM
Don't jump to conclusions. Everyone else seems to manage to get that setup to work fine in 11.04, and 10.04 also uses grub2.


I am ready to remove 10.04 and try to install 11.04 again, if you can show me what was wrong in my actions and how can I fix.

YesWeCan
August 3rd, 2011, 07:23 PM
I've reported it.

(note to readers: this screw up in, presumably, the 10_linux module, is not related to the OP's original problem)

YesWeCan
August 3rd, 2011, 07:32 PM
I am ready to remove 10.04 and try to install 11.04 again, if you can show me what was wrong in my actions and how can I fix.
That's a little tricky without being able to watch you do it.
I would advise you to reformat both disks using Disk Utility - format drive. Just give them new MBRs so the disks appear completely blank. This should not be necessary but it eliminates a variable.

Then use the alternate installer to:
1. Create one partition on each disk, type "physical volume for RAID", no mount point
2. Make a RAID1 out of them
3. Stick an LVM layer on the RAID1
4. Make partitions for mounting root, home, swap, etc in LVM
5. Say yes to installing Grub to sda and sdb or whatever it offers.

You don't have to use LVM. You can make separate RAIDs for root, home, swap, etc. if you prefer. I use LVM because I find it simpler and more flexible.

I wouldn't bother making a separate boot partition - this just complicates things IMO.

b0ba
August 3rd, 2011, 08:01 PM
Then use the alternate installer to

Do you mean any other boot live CD, but not Ubuntu ?

YesWeCan
August 3rd, 2011, 08:04 PM
64-bit PC (AMD64) alternate install CD (http://releases.ubuntu.com/11.04/ubuntu-11.04-alternate-amd64.iso) here: http://releases.ubuntu.com/11.04/

psusi
August 3rd, 2011, 08:06 PM
Do you mean any other boot live CD, but not Ubuntu ?

The livecd does not support installing to raid. The alternate installer is on the alternate cd ( and the server cd ), and is a text mode interface.

To clarify what YesWeCan said, the first step should be to create a raid partition, not ext4.

YesWeCan
August 3rd, 2011, 08:16 PM
To clarify what YesWeCan said, the first step should be to create a raid partition, not ext4.
I used ext4 last time. I've updated my instructions to "physical volume for RAID". Does it make any difference?

YesWeCan
August 3rd, 2011, 08:33 PM
@b0ba
You should choose "manual" partitioning.
Then it is a matter of selecting the free space on each disk to create a partition. You choose the size or it defaults to the whole space. Then you highlight the partition and press enter to define its format and mount point.

After you have made two RAID type partitions, highlight the "Configure software RAID" and press enter. Then choose the partitions and raid level.

After that, choose "Configure the LVM". You first choose the raid partition (md0) as your physical volume. Then add it to a volume group which you choose a name for, such as "system". The volume group can then be allocated logical volumes. I made 3 named root, swap and home gave them sizes 20GB, 4GB and 400GB respectively.

Finally, you highlight and select each logical volume to allocate it a format type and mount point.

Then you select "Finish partitioning" and it will ask you to confirm and then it will start the installation. My partitioning page is shown below; just before finishing.

psusi
August 3rd, 2011, 08:34 PM
I used ext4 last time. I've updated my instructions to "physical volume for RAID". Does it make any difference?

Yes... it has to be the latter to be used as part of a raid array. IIRC, once you get to the step where you create the raid array, it gives you a list of devices to use as components. That list only includes partitions marked as physical volume for RAID.

YesWeCan
August 3rd, 2011, 08:37 PM
@b0ba
Towards the end of the installation it will ask you if you want to install Grub to the master boot record. Answer "yes".
It will then install it to both sda and sdb MBRs.

After reboot, mdadm will start syncing the two disks. You can monitor its progress using
watch cat /proc/mdstat

b0ba
August 3rd, 2011, 08:46 PM
@b0ba
You should choose "manual" partitioning............

Will do tmr again with alternate CD. I did exactly the same steps with Server CD, but without LVM. Lets see if it will help.

Thank you very much for the detailed guide.

YesWeCan
August 3rd, 2011, 08:50 PM
Yes... it has to be the latter to be used as part of a raid array. IIRC, once you get to the step where you create the raid array, it gives you a list of devices to use as components. That list only includes partitions marked as physical volume for RAID.
Not when I did it. And I have used ext4 partitions before to make RAIDs. So it is not a requirement that the partition type be linux raid before it is included in the RAID. But notice that in the fdisk output in post #26 that the partition type was subsequently changed. So I think the installer doesn't care because it changes it anyway.

According to this https://raid.wiki.kernel.org/index.php/RAID_Boot "kernel autodetect is correspondingly deprecated."

YesWeCan
August 3rd, 2011, 10:02 PM
Will do tmr again with alternate CD. I did exactly the same steps with Server CD, but without LVM. Lets see if it will help.
I've checked this out on 11.04 64-bit Server and it works.

b0ba
August 4th, 2011, 02:05 PM
@YesWeCan (http://ubuntuforums.org/member.php?u=934104)

I have done all according your detailed guide. I used alternative CD from ubuntu.
One small change I did, I put SWAP to non-raid partition. See screenshot.
I have done installation and rebooted server, see screenshot2, what I have after.
Never saw such kind of messages, if I press any button, the message just replicated to the screen. Do you have ideas ? questions ?

P.S. I load server from Ubuntu live cd ( 11.04 desktop ) and tried to execute the same commands as I did before.


ubuntu@ubuntu:~$ sudo apt-get install mdadm
Reading package lists... Done
sudo mdubuntu@ubuntu:~$ sudo mdadm --assemble --scan
mdadm: /dev/md/0 has been started with 2 drives.
ubuntu@ubuntu:~$ sudo apt-get install lvm2
Reading package lists... Done
ubuntu@ubuntu:~$ sudo lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
root dbs16 -wi--- 456.34g
ubuntu@ubuntu:~$ sudo lvchange -a y /dev/dbs16/root
ubuntu@ubuntu:~$ sudo mount /dev/dbs16/root /mnt
ubuntu@ubuntu:~$ cd Downloads/
ubuntu@ubuntu:~/Downloads$ chmod 777 boot_info_script.sh
ubuntu@ubuntu:~/Downloads$ sudo ./boot_info_script.sh

boot_info_script version: 0.60 [17 May 2011]


"gawk" could not be found, using "busybox awk" instead.
This may lead to unreliable results.

Identifying MBRs...
Computing Partition Table of /dev/sda...
Computing Partition Table of /dev/sdb...
Searching sda1 for information...
Searching sda2 for information...
Searching sda5 for information...
Searching sdb1 for information...
Searching sdb2 for information...
Searching sdb5 for information...
Searching dbs16-root' for information...
Searching md/0 for information...

Finished. The results are in the file "RESULTS.txt"
located in "/home/ubuntu/Downloads/".

ubuntu@ubuntu:~/Downloads$ apt-get install gawk
ubuntu@ubuntu:~/Downloads$ mv RESULTS.txt RESULTS.txt.1
ubuntu@ubuntu:~/Downloads$ sudo ./boot_info_script.sh

boot_info_script version: 0.60 [17 May 2011]

Identifying MBRs...
Computing Partition Table of /dev/sda...
Computing Partition Table of /dev/sdb...
Searching sda1 for information...
Searching sda2 for information...
Searching sda5 for information...
Searching sdb1 for information...
Searching sdb2 for information...
Searching sdb5 for information...
Searching dbs16-root' for information...
Searching md/0 for information...

Finished. The results are in the file "RESULTS.txt"
located in "/home/ubuntu/Downloads/".

ubuntu@ubuntu:~/Downloads$

YesWeCan
August 4th, 2011, 02:18 PM
What hardware are you using? Motherboard, disks? How old are they?

psusi
August 4th, 2011, 03:13 PM
Instead of choosing the option from the boot menu, hit e to edit the entry and post a picture of that. Then press c to go to the command prompt, and type ls and see what shows up.

b0ba
August 4th, 2011, 03:26 PM
Hardware is IBM System x3250 M3. See also new RESULTS.txt.


Boot Info Script 0.60 from 17 May 2011


============================= Boot Info Summary: ===============================

=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at sector
1 of the same hard drive for core.img. core.img is at this location and
looks in partition 1 for /grub.
=> Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (md/0)/boot/grub on this drive.

sda1: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sda2: __________________________________________________ ________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

sdb1: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sdb2: __________________________________________________ ________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sdb5: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

dbs16-root': __________________________________________________ _________________

File system:
Boot sector type: Unknown
Boot sector info:
Mounting failed: mount: unknown filesystem type ''

md/0: __________________________________________________ ________________________

File system: LVM2_member
Boot sector type: -
Boot sector info:

============================ Drive/Partition Info: =============================

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 2,048 957,030,399 957,028,352 fd Linux raid autodetect
/dev/sda2 957,032,446 976,771,071 19,738,626 5 Extended
/dev/sda5 957,032,448 976,771,071 19,738,624 82 Linux swap / Solaris


Drive: sdb __________________________________________________ ___________________

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdb1 2,048 957,030,399 957,028,352 fd Linux raid autodetect
/dev/sdb2 957,032,446 976,771,071 19,738,626 5 Extended
/dev/sdb5 957,032,448 976,771,071 19,738,624 82 Linux swap / Solaris


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/mapper/dbs16-root 7a9aa242-0c9f-4956-82a7-92e7269a65fd ext4
/dev/md0 RAHsQF-WjOz-Vj1e-VN18-SmPa-odw9-Uu9dit LVM2_member
/dev/md/0 RAHsQF-WjOz-Vj1e-VN18-SmPa-odw9-Uu9dit LVM2_member
/dev/sda1 1d08ab93-5439-0962-34cb-594b3594fd23 linux_raid_member dbs16:0
/dev/sda5 f15cacf8-9ffc-468f-b326-b61664095bac swap
/dev/sdb1 1d08ab93-5439-0962-34cb-594b3594fd23 linux_raid_member dbs16:0
/dev/sdb5 2e0cf118-0b0a-451d-9840-b30c19ace849 swap

========================= "ls -R /dev/mapper/" output: =========================

/dev/mapper:
control
dbs16-root

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/loop0 /rofs squashfs (ro,noatime)
/dev/mapper/dbs16-root /mnt ext4 (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)


======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on dbs16-root'



=============================== StdErr Messages: ===============================

unlzma: Decoder error
One or more specified logical volume(s) not found.
One or more specified logical volume(s) not found.
One or more specified logical volume(s) not found.
hexdump: /dev/mapper/dbs16-root': No such file or directory
hexdump: /dev/mapper/dbs16-root': No such file or directory

b0ba
August 4th, 2011, 03:36 PM
Instead of choosing the option from the boot menu, hit e to edit the entry and post a picture of that. Then press c to go to the command prompt, and type ls and see what shows up.

I have no boot menu at the screen, message I posted is first what I see after BIOS messages. If I type "e" or "c" messages just replicated again.
Does it make sense try to reinstall GRUB according RESULTS.txt ?

FormatSeize
August 4th, 2011, 03:50 PM
That is what you have observed but your conclusion is not the general case. Grub will work on any MBR system disk that is not part of something weird like fakeraid. Grub 1.99 that comes with 11.04 is designed to boot any linux RAID directly and its boot program should be installed to the MBRs of the raid disks.
Thank you for clarifying my stupidity. I could not understand for the life of me why I was able to successful boot my raid all of a sudden in light of what I'd experienced before.

psusi
August 4th, 2011, 04:15 PM
It looks like you once again managed to not install grub to either sda or sdb. The copy there appears to be from before, when you had a separate /boot partition.

YesWeCan
August 4th, 2011, 04:17 PM
I have no boot menu at the screen, message I posted is first what I see after BIOS messages. If I type "e" or "c" messages just replicated again.
Does it make sense try to reinstall GRUB according RESULTS.txt ?
Which of the two disks is your bios set to boot from? Your boot info script output shows you have two versions of Grub. Did you blank both disks before you started?

YesWeCan
August 4th, 2011, 04:26 PM
It looks like you once again managed to not install grub to either sda or sdb. The copy there appears to be from before, when you had a separate /boot partition.
I think Grub on sdb may have been updated because it refers to (md/0) now rather than (md0), but there has been at least one install in between so...

b0ba
August 4th, 2011, 04:29 PM
Which of the two disks is your bios set to boot from? Your boot info script output shows you have two versions of Grub. Did you blank both disks before you started?

First disk is bootable in BIOS. I did not format disks, I just removed all old partitions before I started. Do you think format of the disks can be reason ?
I can try.

YesWeCan
August 4th, 2011, 04:34 PM
First disk is bootable in BIOS. I did not format disks, I just removed all old partitions before I started. Do you think format of the disks can be reason ?
I can try.
I think the reason may be you are booting the old Grub. Can you swap the disks over so it boots the other one?

b0ba
August 4th, 2011, 05:17 PM
I think the reason may be you are booting the old Grub. Can you swap the disks over so it boots the other one?

I swap drives and tried to load. The same messages. Loaded from Live CD and formated both with DiskUtil. I start process of installation again.

YesWeCan
August 4th, 2011, 05:26 PM
I'm not sure whether anyone has mentioned this, but all raid options in your bios need to be disabled.

psusi
August 4th, 2011, 05:47 PM
I think Grub on sdb may have been updated because it refers to (md/0) now rather than (md0), but there has been at least one install in between so...

He used LVM this time so it should be looking for the logical volume, not md0. He still seems to not be checking the sda and sdb boxes in the install grub screen.


I'm not sure whether anyone has mentioned this, but all raid options in your bios need to be disabled.

Simply disabling the bios support is not enough; any fakeraid signatures must be removed from the disk. If they are there, Ubuntu will still activate them. IIRC, the alternate installer has a pop up message when you get to the partitioning screen that says that sata raid devices have been detected, do you want to activate them? As long as there are no fakeraid signatures on the drive, then it doesn't matter whether it is enabled or not in the bios.

b0ba
August 4th, 2011, 05:48 PM
I'm not sure whether anyone has mentioned this, but all raid options in your bios need to be disabled.

Sure, in other case I had no chance to install 10.04 yesterday and 9.04 before with software raids.
and I had not such kind of message (
sata raid devices have been detected)
I am in install process again. Next 20-30 mins let you know anout resilts.

P.S. After format of both drives I did also:


Using Linux

You can also use dd command from Linux itself (it removes partition table):
# dd if=/dev/null of=/dev/sdX bs=512 count=1
Just remove MBR, without the partition table (see comment below):
# dd if=/dev/null of=/dev/sdX bs=446 count=1

b0ba
August 4th, 2011, 08:30 PM
After reboot I have just blinked cursor in the left upper corner. Seems I have no GRUB at all :) Tmr will continue to investigate issue.

psusi
August 4th, 2011, 08:53 PM
Yea, that's the problem. When the installer gets to the grub step, you need to tell it to install grub to both disks.

YesWeCan
August 4th, 2011, 11:05 PM
He used LVM this time so it should be looking for the logical volume, not md0.
Good point.

He still seems to not be checking the sda and sdb boxes in the install grub screen.
I never saw tick boxes. The attached is all I ever saw - a simple yes/no. Perhaps it is different if another OS is detected?

b0ba
August 5th, 2011, 07:15 AM
I have installed GRUB according chroot method. See log. After reboot I see just blinked cursor in left upper corner and nothing more. Help me please, what I have done wrong ?


To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ sudo apt-get install mdadm
....
ubuntu@ubuntu:~$ sudo mdadm --assemble --scan
mdadm: /dev/md/0 has been started with 2 drives.
ubuntu@ubuntu:~$ sudo apt-get install lvm2
Reading package lists... Done
ubuntu@ubuntu:~$ sudo lvchange -a y /dev/dbs16/root
ubuntu@ubuntu:~$ sudo mount /dev/dbs16/root /mnt
ubuntu@ubuntu:~$ ls /mnt
bin dev home lib lost+found mnt proc sbin srv tmp var
boot etc initrd.img lib64 media opt root selinux sys usr vmlinuz
ubuntu@ubuntu:/mnt/dev$ sudo mount -B /dev /mnt/dev
ubuntu@ubuntu:/mnt/dev$ sudo mount -B /dev/pts /mnt/dev/pts
ubuntu@ubuntu:/mnt/dev$ sudo mount -B /proc /mnt/proc
ubuntu@ubuntu:/mnt/dev$ sudo mount -B /sys /mnt/sys
ubuntu@ubuntu:/mnt/dev$ sudo chroot /mnt
root@ubuntu:/# sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
done
root@ubuntu:/# sudo grub-install /dev/sda
Installation finished. No error reported.
root@ubuntu:/# sudo grub-install /dev/sdb
Installation finished. No error reported.
root@ubuntu:/# sudo grub-install --recheck /dev/sda
Installation finished. No error reported.
root@ubuntu:/# sudo grub-install --recheck /dev/sdb
Installation finished. No error reported.
root@ubuntu:/#

YesWeCan
August 5th, 2011, 11:31 AM
Bootinfoscript output?

b0ba
August 5th, 2011, 12:35 PM
As expected no GRUB, but you see log in prev. message.




Boot Info Script 0.60 from 17 May 2011


============================= Boot Info Summary: ===============================

=> No boot loader is installed in the MBR of /dev/sda.
=> No boot loader is installed in the MBR of /dev/sdb.

sda1: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sda2: __________________________________________________ ________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

sdb1: __________________________________________________ ________________________

File system: linux_raid_member
Boot sector type: -
Boot sector info:

sdb2: __________________________________________________ ________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sdb5: __________________________________________________ ________________________

File system: swap
Boot sector type: -
Boot sector info:

dbs16-root': __________________________________________________ _________________

File system:
Boot sector type: Unknown
Boot sector info:
Mounting failed: mount: unknown filesystem type ''

md/0: __________________________________________________ ________________________

File system: LVM2_member
Boot sector type: -
Boot sector info:

============================ Drive/Partition Info: =============================

Drive: sda __________________________________________________ ___________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 2,048 957,030,399 957,028,352 fd Linux raid autodetect
/dev/sda2 957,032,446 976,771,071 19,738,626 5 Extended
/dev/sda5 957,032,448 976,771,071 19,738,624 82 Linux swap / Solaris


Drive: sdb __________________________________________________ ___________________

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdb1 2,048 957,030,399 957,028,352 fd Linux raid autodetect
/dev/sdb2 957,032,446 976,771,071 19,738,626 5 Extended
/dev/sdb5 957,032,448 976,771,071 19,738,624 82 Linux swap / Solaris


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/mapper/dbs16-root 84621806-64ea-4b78-928c-89066468341c ext4
/dev/md0 62Z1BQ-z5JC-Zdv1-rKkM-Fk1j-iqsA-QP34X1 LVM2_member
/dev/sda1 987776e8-54b3-79cb-3277-cd7b751722dd linux_raid_member dbs16:0
/dev/sda5 974fb798-c0e6-40fe-813a-44d56cf03ff4 swap
/dev/sdb1 987776e8-54b3-79cb-3277-cd7b751722dd linux_raid_member dbs16:0
/dev/sdb5 464dcb95-d55a-40d1-9adf-5f7ba1e0c95e swap

========================= "ls -R /dev/mapper/" output: =========================

/dev/mapper:
control
dbs16-root

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/loop0 /rofs squashfs (ro,noatime)
/dev/mapper/dbs16-root /mnt ext4 (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)


======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on dbs16-root'



=============================== StdErr Messages: ===============================

One or more specified logical volume(s) not found.
One or more specified logical volume(s) not found.
One or more specified logical volume(s) not found.
hexdump: /dev/mapper/dbs16-root': No such file or directory

YesWeCan
August 5th, 2011, 12:49 PM
Curious. So it seems that neither the Ubuntu installer nor grub-install are able to write to the MBRs, although neither reported any errors.

What does that suggest? This machine you are using is an IBM server not an ordinary PC, so that may be relevant. I was starting to wonder whether the bios is protecting the MBRs but that doesn't fit with your having reformatted the MBRs using Disk Utility. Very odd.

b0ba
August 5th, 2011, 12:56 PM
Curious. So it seems that neither the Ubuntu installer nor grub-install are able to write to the MBRs, although neither reported any errors.

What does that suggest? This machine you are using is an IBM server not an ordinary PC, so that may be relevant. I was starting to wonder whether the bios is protecting the MBRs but that doesn't fit with your having reformatted the MBRs using Disk Utility. Very odd.

I could agree with you about protection, but we have facts agains :
1) yes, MBR is empty, it means I removed it with tools.
2) 10.04 and prev vers of Ubuntu I had installed without any problems.

Second point can be wrong, if new GRUB2 are using other method how to write MBR. Do you remember I have installed GRUB several times and you told me, seems
I have old GRUB ( from 10.04 I think ). Seem there is issue in 11.04.

Do you know may be how to turn on debug messages here and to get "real" status of grub-install.


root@ubuntu:/# sudo grub-install --recheck /dev/sdb Installation finished. No error reported.

YesWeCan
August 5th, 2011, 01:42 PM
I could agree with you about protection, but we have facts agains :
1) yes, MBR is empty, it means I removed it with tools.
2) 10.04 and prev vers of Ubuntu I had installed without any problems.

Second point can be wrong, if new GRUB2 are using other method how to write MBR. Do you remember I have installed GRUB several times and you told me, seems
I have old GRUB ( from 10.04 I think ). Seem there is issue in 11.04.

Do you know may be how to turn on debug messages here and to get "real" status of grub-install.
I am not aware of any grub debug mode. I'm not sure what Grub would report since it seems to believe it has written the MBRs without a problem.
11.04 uses Grub 1.99 so it is different. But there must be something else involved here because on my system it install ok.

Would you mind posting the output of sudo sfdisk -luS?

Have you got a USB stick handy (or any disk)? You could try the chroot and then install Grub to the USB stick. Check it has done it using bootinfoscript; if so, boot off the stick. This will isolate the problem to those 500GB disks.

psusi pointed out that if the disks had fakeraid metadata on them then the Ubuntu installer would have mentioned it. Just to be absolutely sure, though, you could try to erase it:
sudo dmraid -E -r /dev/sda
sudo dmraid -E -r /dev/sdb

b0ba
August 5th, 2011, 02:52 PM
do you mean erase
sudo dmraid -E -r /dev/sda
sudo dmraid -E -r /dev/sdb
and reinstall grub again with chroot ?


ubuntu@ubuntu:~$ sudo sfdisk -luS

Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/sda1 2048 957030399 957028352 fd Linux raid autodetect
/dev/sda2 957032446 976771071 19738626 5 Extended
/dev/sda3 0 - 0 0 Empty
/dev/sda4 0 - 0 0 Empty
/dev/sda5 957032448 976771071 19738624 82 Linux swap / Solaris

Disk /dev/sdb: 60801 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/sdb1 2048 957030399 957028352 fd Linux raid autodetect
/dev/sdb2 957032446 976771071 19738626 5 Extended
/dev/sdb3 0 - 0 0 Empty
/dev/sdb4 0 - 0 0 Empty
/dev/sdb5 957032448 976771071 19738624 82 Linux swap / Solaris
ubuntu@ubuntu:~$

YesWeCan
August 5th, 2011, 03:36 PM
do you mean erase
sudo dmraid -E -r /dev/sda
sudo dmraid -E -r /dev/sdb
and reinstall grub again with chroot ?

I think the dmraid command will tell you if it finds nothing. If they find anything then yes.

b0ba
August 5th, 2011, 05:28 PM
I have tried again. See results, no GRUB after. I think this is bug.


ubuntu@ubuntu:~$ sudo apt-get install mdadm
ubuntu@ubuntu:~$ sudo mdadm --assemble --scan
mdadm: /dev/md/0 has been started with 2 drives.
ubuntu@ubuntu:~$ sudo apt-get install lvm2
ubuntu@ubuntu:~$ sudo lvchange -a y /dev/dbs16/root
ubuntu@ubuntu:~$ sudo mount /dev/dbs16/root /mnt
ubuntu@ubuntu:~$ sudo mount -B /dev /mnt/dev
ubuntu@ubuntu:~$ sudo mount -B /dev/pts /mnt/dev/pts
ubuntu@ubuntu:~$ sudo mount -B /proc /mnt/proc
ubuntu@ubuntu:~$ sudo mount -B /sys /mnt/sys
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# sudo apt-get install dmraid
Reading package lists... Done
Building dependency tree
Reading state information... Done
dmraid is already the newest version.
The following package was automatically installed and is no longer required:
efibootmgr
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 202 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up grub-pc (1.99~rc1-13ubuntu3) ...
Installation finished. No error reported.
Installation finished. No error reported.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Setting up grub-gfxpayload-lists (0.2) ...
root@ubuntu:/# sudo dmraid -E -r /dev/sda
no raid disks and with names: "/dev/sda"
root@ubuntu:/# sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
done
root@ubuntu:/# sudo grub-install /dev/sda
Installation finished. No error reported.
root@ubuntu:/# sudo grub-install /dev/sdb
Installation finished. No error reported.
root@ubuntu:/#

MAFoElffen
August 6th, 2011, 11:06 PM
I have no boot menu at the screen, message I posted is first what I see after BIOS messages. If I type "e" or "c" messages just replicated again.
Does it make sense try to reinstall GRUB according RESULTS.txt ?
When you get what looks to be near the end of your BIOS messages, hold down your <Shift> key...

If you only have one OS installed, your Grub menu may not display until you do that (ways around that but...) After it display's, hit the <down arrow> key to turn off the timer. Then try "YesWeCan's" instructions.

On Raid 1, since it is a mirror, you should be able to boot each disk individually, so the only difference is actually the grub --> points to itself as a disk, right? So shouldn't that be two tests? With you having only 2 disks in your array, it's actually 1 test.

Removing alternaye disks from the array > trying to boot > add back into array > remove other disk from array > try to boot > add back in?

YesWeCan
August 7th, 2011, 12:54 AM
@MAFoElffen
There is something sinister going on here. The problem is that Grub will not install to either MBR. The grub-install command, used from live CD, reports that it has installed without error but bootinfoscript shows that it has done nothing of the sort! I am at a loss as to why this would happen. Any ideas?

This is the hardware: http://www-03.ibm.com/systems/x/hardware/rack/x3250m3/specs.html

b0ba
August 8th, 2011, 07:37 PM
@YesWeCan Can you please create bug report ? (http://ubuntuforums.org/member.php?u=934104)
I don't see solution without help from Ubuntu developers.

P.S. Don't you think my issue has common problem with
http://ubuntuforums.org/showthread.php?t=1819651

YesWeCan
August 8th, 2011, 11:09 PM
I'm not sure what to put in a bug report. I don't think we have diagnosed it enough. That other thread may be a different issue - Grub was installed successfully to the MBRs.

I mentioned using another disk or USB device to try installing Grub on. If the Grub install works on another device that will show there is something specific to do with your 500GB disks that doesn't work. This would also get your array booting so you can use it.

Also, we should manually install Grub to a 500GB disk MBR area using dd and check it will boot. I'll test this in VirtualBox and then give you the instructions.

The fact that 11.04's installer cannot put Grub on the disks and doesn't report an error is an issue. The fact that the 11.04 CD cannot put Grub on either disk and doesn't report an error is an issue. If it is the case that the 10.04 installer can put Grub on the disks then that is another useful symptom.

YesWeCan
August 8th, 2011, 11:32 PM
Try to manually install Grub to sda using dd:
This assumes the chroot grub-install command you used before actually ran grub-mkimage.

Boot live CD, install mdadm and lvm2


sudo mount /dev/dbs16/root /mnt
sudo dd if=/mnt/boot/grub/boot.img bs=446 count=1 of=/dev/sda
sudo dd if=/mnt/boot/grub/core.img bs=512 seek=1 of=/dev/sda

Then run bootinfoscript and check it has Grub installed in sda and looks for the root partition. If ok, boot off sda.

(warning to casual on-lookers: dd can seriously damage your data) :!:

YesWeCan
August 8th, 2011, 11:39 PM
If you are able to boot into your hard disk Ubuntu, then (after you have finished celebrating) you can try to install Grub to sdb:
sudo grub-install /dev/sdb
Confirm with bootinfoscript. If this works it would narrow things down to the live CD chroot install method not working.

MAFoElffen
August 9th, 2011, 12:14 AM
@YesWeCan Can you please create bug report ? (http://ubuntuforums.org/member.php?u=934104)
I don't see solution without help from Ubuntu developers.

P.S. Don't you think my issue has common problem with
http://ubuntuforums.org/showthread.php?t=1819651
#b0ba
First run and post the output of


dmraid -ay -vvv -ddd
Sorry, but "we" need the person who is having "the problem" to submit the launchpad report. The reason for this is that when you submit a report, it's going to dump hardware and configuration info from the machine submitting the report.

I am a new member of some groups on Launchpad, and have submitted Bugs for the community on xorg, grub and kernel... Both there and upstream at Debian, X.org, GNU Grub and Kernel.org. It is a challenge when you're not having the same exact problem (have to recreate that problem) to submit dumps and try workarounds.

@Both
It is reported already as a launchpad bug and you should join it:
Ubuntu, grub2 package, Bugs #527401, "grub-installer fails to install on a raid1 array" (https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/527401)

Although this bug says it has a fix (only for mdraid v0.9) I know that this problem still Exists for mdraaid versions 1.0, 1.1. 1.2... So the problem still exists, though I don't know why. Specifically, there is another report which is a duplicate of this bug, that is 11.04, Grub 1.99 and RAID1. But I didn't see it reappear until a few days ago. All these are getting ID'ed as Grub and then dmraid.

But although similar-- a bug of yours would most likely be marked a as a duplicate of that. Ynless you stressed that your bug "installs" but not to subsequent drives, even manually.

I agree with YesWeCan. I can see something is... just weirding me out on this!!! I'm wondering the specific "how" you are installing Grub... Grub should just treat the disks (sda, sdb, sdc) as individual disks and it's a RAID 1, so the disks could/should be treated as individual disks... RAID itself shouldn't be a factor in this situation, but somehow it is. This doesn't make sense.

What if you did it this way:
- Create a menu item in /etc/grub.d/40_custom that would boot off the sda (hd0) without the RAID active. If you have problems with that, post your grub.conf here and I'll edit it and post a 40_custom back to you.

- update-grub, reboot, then select that menu boot item...

- Install grub2 to the other 2 disks from the command line


sudo grub-install --boot-directory=/mnt/boot /dev/sdX
Replacing the "X" with b and c...

Another curiosity I share with YesWeCan is: Why 3 drives in a RAID1 (mirror)?

YesWeCan
August 9th, 2011, 12:37 AM
Another curiosity I share with YesWeCan is: Why 3 drives in a RAID1 (mirror)?
What 3 drives? Are you referring to that other thread that b0ba cited? If so, it is psusi who queried the 3 drive RAID1 not I. :)

MAFoElffen
August 9th, 2011, 12:50 AM
What 3 drives? Are you referring to that other thread that b0ba cited? If so, it is psusi who queried the 3 drive RAID1 not I. :)
You're right... Not doing well. I should just get some sleep. My mind is scrambled today.

YesWeCan
August 9th, 2011, 12:54 AM
You're right... Not doing well. I should just get some sleep. My mind is scrambled today.
This is what grappling with Grub does to people. It is a form of mental torture. Should be confined to Cuba. :p

b0ba
August 9th, 2011, 10:21 AM
@YesWeCan (http://ubuntuforums.org/member.php?u=934104) : You are the BEST :KS:KS:KS:KS:KS ! I have done it according your post #76 and I managed to load Ubuntu without any warnings. Next step I will reinstall it from server CD, I did it from
alternate. Time to open bug report. Please let me know if you need some information from me. Here you are the log :


ubuntu@ubuntu:~$ sudo apt-get install mdadm
Reading package lists... Done
Building dependency tree
ubuntu@ubuntu:~$ sudo mdadm --assemble --scan
mdadm: /dev/md/0 has been started with 2 drives.
ubuntu@ubuntu:~$ sudo apt-get install lvm2
ubuntu@ubuntu:~$ sudo lvchange -a y /dev/dbs16/root
ubuntu@ubuntu:~$ sudo mount /dev/dbs16/root /mnt
ubuntu@ubuntu:~$ sudo dd if=/mnt/boot/grub/boot.img bs=446 count=1 of=/dev/sda
1+0 records in
1+0 records out
446 bytes (446 B) copied, 0.0399909 s, 11.2 kB/s
ubuntu@ubuntu:~$ sudo dd if=/mnt/boot/grub/core.img bs=512 seek=1 of=/dev/sda
60+1 records in
60+1 records out
31038 bytes (31 kB) copied, 0.0416209 s, 746 kB/s
ubuntu@ubuntu:~$

YesWeCan
August 9th, 2011, 10:43 AM
Good stuff! :)
If you haven't started the server install yet, would you mind trying to install grub to sdb from your installed Ubuntu? It will be useful to know whether it can do this or not to help narrow down the problem:
sudo grub-install /dev/sdb
Then run bootinfoscript to see if Grub is on both disks. Then try booting off sdb.

b0ba
August 9th, 2011, 11:18 AM
Good stuff! :)
If you haven't started the server install yet, would you mind trying to install grub to sdb from your installed Ubuntu? It will be useful to know whether it can do this or not to help narrow down the problem:
sudo grub-install /dev/sdb
Then run bootinfoscript to see if Grub is on both disks. Then try booting off sdb.

I have started, but I can execute
sudo grub-install /dev/sdb
after installation. Server and alternate CDs are the same in GRUB part I think.

b0ba
August 9th, 2011, 01:20 PM
I expected, after installation I don't need to reinstall grub to MBR, but not. See pic.
I will try right now to copy it with DD commands if it will be enough.

b0ba
August 9th, 2011, 02:10 PM
I am smashed and confused :(
1) boot from live cd
2) reinstall grub.
See log. Now IMG files are not presented in grub folder at all.


GRUB version 2

This is very similar to Grub version 1: boot.img is stored in the MBR (http://en.wikipedia.org/wiki/Master_boot_record) or Volume boot record (http://en.wikipedia.org/wiki/Volume_boot_record) like Stage 1; however, it can load one sector from any LBA48 (http://en.wikipedia.org/wiki/LBA48) address. This loads the first sector of core.img (generated from diskboot.img) which is then used to load the rest of the generated core.img file. The core.img file will normally be stored in the same location as Stage 1.5 with the same problems; however, it can be moved to a file system or bare partition with fewer problems than moving or omitting Stage 1.5.
Once loaded, the core.img file will then load the default configuration file and any other modules needed.



How comes I had those file before in grub folder ?



...................
ubuntu@ubuntu:~$ sudo lvchange -a y /dev/dbs16/root
ubuntu@ubuntu:~$ sudo mount /dev/dbs16/root /mnt
ubuntu@ubuntu:~$ sudo mount -B /dev /mnt/dev
ubuntu@ubuntu:~$ sudo mount -B /dev/pts /mnt/dev/pts
ubuntu@ubuntu:~$ sudo mount -B /proc /mnt/proc
ubuntu@ubuntu:~$ sudo mount -B /sys /mnt/sys
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-server
Found initrd image: /boot/initrd.img-2.6.38-8-server
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
done
root@ubuntu:/# sudo grub-install /dev/sda
Installation finished. No error reported.
root@ubuntu:/# sudo grub-install /dev/sdb
Installation finished. No error reported.

root@ubuntu:/mnt# sudo dd if=/boot/grub/boot.img bs=446 count=1 of=/dev/sda
dd: opening `/boot/grub/boot.img': No such file or directory
root@ubuntu:/mnt# cd ..
root@ubuntu:/# cd boot
root@ubuntu:/boot# ls -la
total 33480
drwxr-xr-x 3 root root 4096 2011-08-09 13:31 .
drwxr-xr-x 22 root root 4096 2011-08-09 12:14 ..
-rw-r--r-- 1 root root 730039 2011-04-11 06:24 abi-2.6.38-8-generic
-rw-r--r-- 1 root root 730132 2011-04-11 06:45 abi-2.6.38-8-server
-rw-r--r-- 1 root root 130313 2011-04-11 06:24 config-2.6.38-8-generic
-rw-r--r-- 1 root root 130421 2011-04-11 06:45 config-2.6.38-8-server
drwxr-xr-x 3 root root 12288 2011-08-09 14:53 grub
-rw-r--r-- 1 root root 3456642 2011-08-09 12:13 initrd.img-2.6.38-8-generic
-rw-r--r-- 1 root root 14294248 2011-08-09 13:31 initrd.img-2.6.38-8-server
-rw-r--r-- 1 root root 160988 2010-10-22 14:08 memtest86+.bin
-rw-r--r-- 1 root root 163168 2010-10-22 14:08 memtest86+_multiboot.bin
-rw------- 1 root root 2654256 2011-04-11 06:24 System.map-2.6.38-8-generic
-rw------- 1 root root 2677814 2011-04-11 06:45 System.map-2.6.38-8-server
-rw------- 1 root root 1368 2011-04-11 06:26 vmcoreinfo-2.6.38-8-generic
-rw------- 1 root root 1367 2011-04-11 06:46 vmcoreinfo-2.6.38-8-server
-rw------- 1 root root 4523936 2011-04-11 06:24 vmlinuz-2.6.38-8-generic
-rw------- 1 root root 4579872 2011-04-11 06:45 vmlinuz-2.6.38-8-server

root@ubuntu:/boot/grub# pwd
/boot/grub
root@ubuntu:/boot/grub# ls b*
befs_be.mod bitmap.mod blocklist.mod bsd.mod bufio.mod
befs.mod bitmap_scale.mod boot.mod btrfs.mod
root@ubuntu:/boot/grub# cd ..
root@ubuntu:/boot# ls
abi-2.6.38-8-generic memtest86+_multiboot.bin
abi-2.6.38-8-server System.map-2.6.38-8-generic
config-2.6.38-8-generic System.map-2.6.38-8-server
config-2.6.38-8-server vmcoreinfo-2.6.38-8-generic
grub vmcoreinfo-2.6.38-8-server
initrd.img-2.6.38-8-generic vmlinuz-2.6.38-8-generic
initrd.img-2.6.38-8-server vmlinuz-2.6.38-8-server
memtest86+.bin
root@ubuntu:/boot# sudo apt-get install dmraid
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdmraid1.0.0.rc16
The following NEW packages will be installed:
dmraid libdmraid1.0.0.rc16
0 upgraded, 2 newly installed, 0 to remove and 76 not upgraded.
Need to get 128 kB of archives.
After this operation, 479 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/main libdmraid1.0.0.rc16 amd64 1.0.0.rc16-4.1ubuntu3 [100.0 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ natty/main dmraid amd64 1.0.0.rc16-4.1ubuntu3 [27.8 kB]
Fetched 128 kB in 0s (171 kB/s)
Selecting previously deselected package libdmraid1.0.0.rc16.
(Reading database ... 59996 files and directories currently installed.)
Unpacking libdmraid1.0.0.rc16 (from .../libdmraid1.0.0.rc16_1.0.0.rc16-4.1ubuntu3_amd64.deb) ...
Selecting previously deselected package dmraid.
Unpacking dmraid (from .../dmraid_1.0.0.rc16-4.1ubuntu3_amd64.deb) ...
Processing triggers for man-db ...
Setting up libdmraid1.0.0.rc16 (1.0.0.rc16-4.1ubuntu3) ...
Setting up dmraid (1.0.0.rc16-4.1ubuntu3) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.38-8-server
root@ubuntu:/boot# sudo dmraid -E -r /dev/sda
no raid disks and with names: "/dev/sda"
root@ubuntu:/boot# ls
abi-2.6.38-8-generic memtest86+_multiboot.bin
abi-2.6.38-8-server System.map-2.6.38-8-generic
config-2.6.38-8-generic System.map-2.6.38-8-server
config-2.6.38-8-server vmcoreinfo-2.6.38-8-generic
grub vmcoreinfo-2.6.38-8-server
initrd.img-2.6.38-8-generic vmlinuz-2.6.38-8-generic
initrd.img-2.6.38-8-server vmlinuz-2.6.38-8-server
memtest86+.bin
root@ubuntu:/boot# cd grub
root@ubuntu:/boot/grub# ls
acpi.mod gcry_whirlpool.mod parttool.mod
affs.mod gettext.mod password.mod
afs_be.mod gfxblacklist.txt password_pbkdf2.mod
afs.mod gfxmenu.mod pbkdf2.mod
aout.mod gfxterm.mod pci.mod
appleldr.mod gptsync.mod play.mod
ata.mod grub.cfg png.mod
ata_pthru.mod grub.efi probe.mod
at_keyboard.mod grubenv raid5rec.mod
befs_be.mod gzio.mod raid6rec.mod
befs.mod halt.mod raid.mod
bitmap.mod hashsum.mod read.mod
bitmap_scale.mod hdparm.mod reboot.mod
blocklist.mod hello.mod regexp.mod
boot.mod help.mod reiserfs.mod
bsd.mod hexdump.mod relocator.mod
btrfs.mod hfs.mod scsi.mod
bufio.mod hfsplus.mod search_fs_file.mod
cat.mod iorw.mod search_fs_uuid.mod
chain.mod iso9660.mod search_label.mod
cmp.mod jfs.mod search.mod
command.lst jpeg.mod serial.mod
configfile.mod keylayouts.mod setjmp.mod
core.efi keystatus.mod setpci.mod
cpio.mod linux.mod sfs.mod
cpuid.mod loadbios.mod sleep.mod
crypto.lst loadenv.mod squash4.mod
crypto.mod locale tar.mod
cs5536.mod loopback.mod terminal.lst
datehook.mod lsacpi.mod terminal.mod
date.mod lsefimmap.mod terminfo.mod
datetime.mod lsefisystab.mod test_blockarg.mod
dm_nv.mod lsmmap.mod testload.mod
echo.mod ls.mod test.mod
efi_gop.mod lspci.mod tga.mod
efi_uga.mod lssal.mod trig.mod
elf.mod lvm.mod true.mod
example_functional_test.mod mdraid09.mod udf.mod
ext2.mod mdraid1x.mod ufs1.mod
extcmd.mod memdisk.mod ufs2.mod
fat.mod memrw.mod uhci.mod
fixvideo.mod minicmd.mod unicode.pf2
font.mod minix2.mod usb_keyboard.mod
fshelp.mod minix.mod usb.mod
fs.lst mmap.mod usbms.mod
functional_test.mod moddep.lst usbserial_common.mod
gcry_arcfour.mod msdospart.mod usbserial_ftdi.mod
gcry_blowfish.mod multiboot2.mod usbserial_pl2303.mod
gcry_camellia.mod multiboot.mod usbtest.mod
gcry_cast5.mod nilfs2.mod video_bochs.mod
gcry_crc.mod normal.mod video_cirrus.mod
gcry_des.mod ntfscomp.mod video_fb.mod
gcry_md4.mod ntfs.mod videoinfo.mod
gcry_md5.mod ohci.mod video.lst
gcry_rfc2268.mod part_acorn.mod video.mod
gcry_rijndael.mod part_amiga.mod videotest.mod
gcry_rmd160.mod part_apple.mod xfs.mod
gcry_seed.mod part_bsd.mod xnu.mod
gcry_serpent.mod part_gpt.mod xnu_uuid.mod
gcry_sha1.mod partmap.lst xzio.mod
gcry_sha256.mod part_msdos.mod zfsinfo.mod
gcry_sha512.mod part_sun.mod zfs.mod
gcry_tiger.mod part_sunpc.mod
gcry_twofish.mod parttool.lst
root@ubuntu:/boot/grub# ls b*
befs_be.mod bitmap.mod blocklist.mod bsd.mod bufio.mod
befs.mod bitmap_scale.mod boot.mod btrfs.mod
root@ubuntu:/boot/grub# ls c*
cat.mod cmp.mod configfile.mod cpio.mod crypto.lst cs5536.mod
chain.mod command.lst core.efi cpuid.mod crypto.mod
root@ubuntu:/boot/grub# sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-server
Found initrd image: /boot/initrd.img-2.6.38-8-server
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
done
root@ubuntu:/boot/grub# sudo grub-install /dev/sda
Installation finished. No error reported.
root@ubuntu:/boot/grub# sudo grub-install /dev/sdb
Installation finished. No error reported.
root@ubuntu:/boot/grub# ls -la *img
ls: cannot access *img: No such file or directory
root@ubuntu:/boot/grub# ls -la
total 5076
drwxr-xr-x 3 root root 12288 2011-08-09 15:00 .
drwxr-xr-x 3 root root 4096 2011-08-09 14:57 ..
-rw-r--r-- 1 root root 18624 2011-08-09 15:00 acpi.mod
-rw-r--r-- 1 root root 8672 2011-08-09 15:00 affs.mod
-rw-r--r-- 1 root root 8720 2011-08-09 15:00 afs_be.mod
-rw-r--r-- 1 root root 8224 2011-08-09 15:00 afs.mod
-rw-r--r-- 1 root root 1824 2011-08-09 15:00 aout.mod
-rw-r--r-- 1 root root 5384 2011-08-09 15:00 appleldr.mod
-rw-r--r-- 1 root root 15000 2011-08-09 15:00 ata.mod
-rw-r--r-- 1 root root 3816 2011-08-09 15:00 ata_pthru.mod
-rw-r--r-- 1 root root 8704 2011-08-09 15:00 at_keyboard.mod
-rw-r--r-- 1 root root 8584 2011-08-09 15:00 befs_be.mod
-rw-r--r-- 1 root root 8056 2011-08-09 15:00 befs.mod
-rw-r--r-- 1 root root 4200 2011-08-09 15:00 bitmap.mod
-rw-r--r-- 1 root root 4056 2011-08-09 15:00 bitmap_scale.mod
-rw-r--r-- 1 root root 3928 2011-08-09 15:00 blocklist.mod
-rw-r--r-- 1 root root 4392 2011-08-09 15:00 boot.mod
-rw-r--r-- 1 root root 51120 2011-08-09 15:00 bsd.mod
-rw-r--r-- 1 root root 20160 2011-08-09 15:00 btrfs.mod
-rw-r--r-- 1 root root 3360 2011-08-09 15:00 bufio.mod
-rw-r--r-- 1 root root 4208 2011-08-09 15:00 cat.mod
-rw-r--r-- 1 root root 8312 2011-08-09 15:00 chain.mod
-rw-r--r-- 1 root root 3632 2011-08-09 15:00 cmp.mod
-rw-r--r-- 1 root root 2375 2011-08-09 15:00 command.lst
-rw-r--r-- 1 root root 4112 2011-08-09 15:00 configfile.mod
-rw-r--r-- 1 root root 152576 2011-08-09 15:00 core.efi
-rw-r--r-- 1 root root 5696 2011-08-09 15:00 cpio.mod
-rw-r--r-- 1 root root 2912 2011-08-09 15:00 cpuid.mod
-rw-r--r-- 1 root root 825 2011-08-09 15:00 crypto.lst
-rw-r--r-- 1 root root 7832 2011-08-09 15:00 crypto.mod
-rw-r--r-- 1 root root 5512 2011-08-09 15:00 cs5536.mod
-rw-r--r-- 1 root root 3744 2011-08-09 15:00 datehook.mod
-rw-r--r-- 1 root root 3944 2011-08-09 15:00 date.mod
-rw-r--r-- 1 root root 2240 2011-08-09 15:00 datetime.mod
-rw-r--r-- 1 root root 3408 2011-08-09 15:00 dm_nv.mod
-rw-r--r-- 1 root root 3664 2011-08-09 15:00 echo.mod
-rw-r--r-- 1 root root 10352 2011-08-09 15:00 efi_gop.mod
-rw-r--r-- 1 root root 7760 2011-08-09 15:00 efi_uga.mod
-rw-r--r-- 1 root root 8264 2011-08-09 15:00 elf.mod
-rw-r--r-- 1 root root 3072 2011-08-09 15:00 example_functional_test.mod
-rw-r--r-- 1 root root 10608 2011-08-09 15:00 ext2.mod
-rw-r--r-- 1 root root 8016 2011-08-09 15:00 extcmd.mod
-rw-r--r-- 1 root root 10552 2011-08-09 15:00 fat.mod
-rw-r--r-- 1 root root 3400 2011-08-09 15:00 fixvideo.mod
-rw-r--r-- 1 root root 18536 2011-08-09 15:00 font.mod
-rw-r--r-- 1 root root 4712 2011-08-09 15:00 fshelp.mod
-rw-r--r-- 1 root root 145 2011-08-09 15:00 fs.lst
-rw-r--r-- 1 root root 4920 2011-08-09 15:00 functional_test.mod
-rw-r--r-- 1 root root 3200 2011-08-09 15:00 gcry_arcfour.mod
-rw-r--r-- 1 root root 10584 2011-08-09 15:00 gcry_blowfish.mod
-rw-r--r-- 1 root root 33224 2011-08-09 15:00 gcry_camellia.mod
-rw-r--r-- 1 root root 16712 2011-08-09 15:00 gcry_cast5.mod
-rw-r--r-- 1 root root 4912 2011-08-09 15:00 gcry_crc.mod
-rw-r--r-- 1 root root 18352 2011-08-09 15:00 gcry_des.mod
-rw-r--r-- 1 root root 5176 2011-08-09 15:00 gcry_md4.mod
-rw-r--r-- 1 root root 5928 2011-08-09 15:00 gcry_md5.mod
-rw-r--r-- 1 root root 4120 2011-08-09 15:00 gcry_rfc2268.mod
-rw-r--r-- 1 root root 21416 2011-08-09 15:00 gcry_rijndael.mod
-rw-r--r-- 1 root root 10344 2011-08-09 15:00 gcry_rmd160.mod
-rw-r--r-- 1 root root 14496 2011-08-09 15:00 gcry_seed.mod
-rw-r--r-- 1 root root 19256 2011-08-09 15:00 gcry_serpent.mod
-rw-r--r-- 1 root root 9176 2011-08-09 15:00 gcry_sha1.mod
-rw-r--r-- 1 root root 5584 2011-08-09 15:00 gcry_sha256.mod
-rw-r--r-- 1 root root 6744 2011-08-09 15:00 gcry_sha512.mod
-rw-r--r-- 1 root root 13776 2011-08-09 15:00 gcry_tiger.mod
-rw-r--r-- 1 root root 32528 2011-08-09 15:00 gcry_twofish.mod
-rw-r--r-- 1 root root 24216 2011-08-09 15:00 gcry_whirlpool.mod
-rw-r--r-- 1 root root 8200 2011-08-09 15:00 gettext.mod
-rw-r--r-- 1 root root 608 2011-08-05 16:38 gfxblacklist.txt
-rw-r--r-- 1 root root 64232 2011-08-09 15:00 gfxmenu.mod
-rw-r--r-- 1 root root 23888 2011-08-09 15:00 gfxterm.mod
-rw-r--r-- 1 root root 5904 2011-08-09 15:00 gptsync.mod
-r--r--r-- 1 root root 5675 2011-08-09 14:59 grub.cfg
-rw-r--r-- 1 root root 152576 2011-08-09 15:00 grub.efi
-rw-r--r-- 1 root root 1024 2011-08-09 11:08 grubenv
-rw-r--r-- 1 root root 13696 2011-08-09 15:00 gzio.mod
-rw-r--r-- 1 root root 6984 2011-08-09 15:00 halt.mod
-rw-r--r-- 1 root root 9552 2011-08-09 15:00 hashsum.mod
-rw-r--r-- 1 root root 12976 2011-08-09 15:00 hdparm.mod
-rw-r--r-- 1 root root 2368 2011-08-09 15:00 hello.mod
-rw-r--r-- 1 root root 4408 2011-08-09 15:00 help.mod
-rw-r--r-- 1 root root 5400 2011-08-09 15:00 hexdump.mod
-rw-r--r-- 1 root root 11216 2011-08-09 15:00 hfs.mod
-rw-r--r-- 1 root root 11312 2011-08-09 15:00 hfsplus.mod
-rw-r--r-- 1 root root 5184 2011-08-09 15:00 iorw.mod
-rw-r--r-- 1 root root 11840 2011-08-09 15:00 iso9660.mod
-rw-r--r-- 1 root root 10808 2011-08-09 15:00 jfs.mod
-rw-r--r-- 1 root root 9472 2011-08-09 15:00 jpeg.mod
-rw-r--r-- 1 root root 6656 2011-08-09 15:00 keylayouts.mod
-rw-r--r-- 1 root root 3784 2011-08-09 15:00 keystatus.mod
-rw-r--r-- 1 root root 15464 2011-08-09 15:00 linux.mod
-rw-r--r-- 1 root root 5840 2011-08-09 15:00 loadbios.mod
-rw-r--r-- 1 root root 10568 2011-08-09 15:00 loadenv.mod
drwxr-xr-x 2 root root 4096 2011-08-04 19:25 locale
-rw-r--r-- 1 root root 5544 2011-08-09 15:00 loopback.mod
-rw-r--r-- 1 root root 6328 2011-08-09 15:00 lsacpi.mod
-rw-r--r-- 1 root root 3960 2011-08-09 15:00 lsefimmap.mod
-rw-r--r-- 1 root root 4264 2011-08-09 15:00 lsefisystab.mod
-rw-r--r-- 1 root root 3384 2011-08-09 15:00 lsmmap.mod
-rw-r--r-- 1 root root 7944 2011-08-09 15:00 ls.mod
-rw-r--r-- 1 root root 8088 2011-08-09 15:00 lspci.mod
-rw-r--r-- 1 root root 4488 2011-08-09 15:00 lssal.mod
-rw-r--r-- 1 root root 10440 2011-08-09 15:00 lvm.mod
-rw-r--r-- 1 root root 3320 2011-08-09 15:00 mdraid09.mod
-rw-r--r-- 1 root root 3744 2011-08-09 15:00 mdraid1x.mod
-rw-r--r-- 1 root root 4168 2011-08-09 15:00 memdisk.mod
-rw-r--r-- 1 root root 5192 2011-08-09 15:00 memrw.mod
-rw-r--r-- 1 root root 6480 2011-08-09 15:00 minicmd.mod
-rw-r--r-- 1 root root 7368 2011-08-09 15:00 minix2.mod
-rw-r--r-- 1 root root 7384 2011-08-09 15:00 minix.mod
-rw-r--r-- 1 root root 11664 2011-08-09 15:00 mmap.mod
-rw-r--r-- 1 root root 3007 2011-08-09 15:00 moddep.lst
-rw-r--r-- 1 root root 4296 2011-08-09 15:00 msdospart.mod
-rw-r--r-- 1 root root 21416 2011-08-09 15:00 multiboot2.mod
-rw-r--r-- 1 root root 20000 2011-08-09 15:00 multiboot.mod
-rw-r--r-- 1 root root 12232 2011-08-09 15:00 nilfs2.mod
-rw-r--r-- 1 root root 181456 2011-08-09 15:00 normal.mod
-rw-r--r-- 1 root root 5744 2011-08-09 15:00 ntfscomp.mod
-rw-r--r-- 1 root root 16848 2011-08-09 15:00 ntfs.mod
-rw-r--r-- 1 root root 17848 2011-08-09 15:00 ohci.mod
-rw-r--r-- 1 root root 3008 2011-08-09 15:00 part_acorn.mod
-rw-r--r-- 1 root root 3184 2011-08-09 15:00 part_amiga.mod
-rw-r--r-- 1 root root 3720 2011-08-09 15:00 part_apple.mod
-rw-r--r-- 1 root root 5200 2011-08-09 15:00 part_bsd.mod
-rw-r--r-- 1 root root 3832 2011-08-09 15:00 part_gpt.mod
-rw-r--r-- 1 root root 82 2011-08-09 15:00 partmap.lst
-rw-r--r-- 1 root root 3744 2011-08-09 15:00 part_msdos.mod
-rw-r--r-- 1 root root 2920 2011-08-09 15:00 part_sun.mod
-rw-r--r-- 1 root root 3168 2011-08-09 15:00 part_sunpc.mod
-rw-r--r-- 1 root root 17 2011-08-09 15:00 parttool.lst
-rw-r--r-- 1 root root 7768 2011-08-09 15:00 parttool.mod
-rw-r--r-- 1 root root 3696 2011-08-09 15:00 password.mod
-rw-r--r-- 1 root root 5160 2011-08-09 15:00 password_pbkdf2.mod
-rw-r--r-- 1 root root 2304 2011-08-09 15:00 pbkdf2.mod
-rw-r--r-- 1 root root 2128 2011-08-09 15:00 pci.mod
-rw-r--r-- 1 root root 4448 2011-08-09 15:00 play.mod
-rw-r--r-- 1 root root 10912 2011-08-09 15:00 png.mod
-rw-r--r-- 1 root root 4784 2011-08-09 15:00 probe.mod
-rw-r--r-- 1 root root 2584 2011-08-09 15:00 raid5rec.mod
-rw-r--r-- 1 root root 4896 2011-08-09 15:00 raid6rec.mod
-rw-r--r-- 1 root root 10416 2011-08-09 15:00 raid.mod
-rw-r--r-- 1 root root 3016 2011-08-09 15:00 read.mod
-rw-r--r-- 1 root root 2216 2011-08-09 15:00 reboot.mod
-rw-r--r-- 1 root root 72392 2011-08-09 15:00 regexp.mod
-rw-r--r-- 1 root root 17128 2011-08-09 15:00 reiserfs.mod
-rw-r--r-- 1 root root 29384 2011-08-09 15:00 relocator.mod
-rw-r--r-- 1 root root 7536 2011-08-09 15:00 scsi.mod
-rw-r--r-- 1 root root 5320 2011-08-09 15:00 search_fs_file.mod
-rw-r--r-- 1 root root 5304 2011-08-09 15:00 search_fs_uuid.mod
-rw-r--r-- 1 root root 5272 2011-08-09 15:00 search_label.mod
-rw-r--r-- 1 root root 4320 2011-08-09 15:00 search.mod
-rw-r--r-- 1 root root 13632 2011-08-09 15:00 serial.mod
-rw-r--r-- 1 root root 906 2011-08-09 15:00 setjmp.mod
-rw-r--r-- 1 root root 9888 2011-08-09 15:00 setpci.mod
-rw-r--r-- 1 root root 7896 2011-08-09 15:00 sfs.mod
-rw-r--r-- 1 root root 4216 2011-08-09 15:00 sleep.mod
-rw-r--r-- 1 root root 7192 2011-08-09 15:00 squash4.mod
-rw-r--r-- 1 root root 5752 2011-08-09 15:00 tar.mod
-rw-r--r-- 1 root root 112 2011-08-09 15:00 terminal.lst
-rw-r--r-- 1 root root 6808 2011-08-09 15:00 terminal.mod
-rw-r--r-- 1 root root 22744 2011-08-09 15:00 terminfo.mod
-rw-r--r-- 1 root root 2680 2011-08-09 15:00 test_blockarg.mod
-rw-r--r-- 1 root root 4600 2011-08-09 15:00 testload.mod
-rw-r--r-- 1 root root 8640 2011-08-09 15:00 test.mod
-rw-r--r-- 1 root root 4896 2011-08-09 15:00 tga.mod
-rw-r--r-- 1 root root 1971 2011-08-09 15:00 trig.mod
-rw-r--r-- 1 root root 2528 2011-08-09 15:00 true.mod
-rw-r--r-- 1 root root 11264 2011-08-09 15:00 udf.mod
-rw-r--r-- 1 root root 9064 2011-08-09 15:00 ufs1.mod
-rw-r--r-- 1 root root 9520 2011-08-09 15:00 ufs2.mod
-rw-r--r-- 1 root root 10640 2011-08-09 15:00 uhci.mod
-rw-r--r-- 1 root root 2560080 2011-08-05 16:38 unicode.pf2
-rw-r--r-- 1 root root 7328 2011-08-09 15:00 usb_keyboard.mod
-rw-r--r-- 1 root root 17424 2011-08-09 15:00 usb.mod
-rw-r--r-- 1 root root 9736 2011-08-09 15:00 usbms.mod
-rw-r--r-- 1 root root 3216 2011-08-09 15:00 usbserial_common.mod
-rw-r--r-- 1 root root 4360 2011-08-09 15:00 usbserial_ftdi.mod
-rw-r--r-- 1 root root 4656 2011-08-09 15:00 usbserial_pl2303.mod
-rw-r--r-- 1 root root 6528 2011-08-09 15:00 usbtest.mod
-rw-r--r-- 1 root root 8824 2011-08-09 15:00 video_bochs.mod
-rw-r--r-- 1 root root 9368 2011-08-09 15:00 video_cirrus.mod
-rw-r--r-- 1 root root 29288 2011-08-09 15:00 video_fb.mod
-rw-r--r-- 1 root root 5824 2011-08-09 15:00 videoinfo.mod
-rw-r--r-- 1 root root 41 2011-08-09 15:00 video.lst
-rw-r--r-- 1 root root 19568 2011-08-09 15:00 video.mod
-rw-r--r-- 1 root root 6496 2011-08-09 15:00 videotest.mod
-rw-r--r-- 1 root root 10344 2011-08-09 15:00 xfs.mod
-rw-r--r-- 1 root root 56080 2011-08-09 15:00 xnu.mod
-rw-r--r-- 1 root root 3536 2011-08-09 15:00 xnu_uuid.mod
-rw-r--r-- 1 root root 21528 2011-08-09 15:00 xzio.mod
-rw-r--r-- 1 root root 11720 2011-08-09 15:00 zfsinfo.mod
-rw-r--r-- 1 root root 40896 2011-08-09 15:00 zfs.mod

psusi
August 9th, 2011, 02:37 PM
Why did you install dmraid? You can't mix dmraid with mdadm. What does sudo dmraid -s show?

b0ba
August 9th, 2011, 02:43 PM
Why did you install dmraid? You can't mix dmraid with mdadm. What does sudo dmraid -s show?

Tried to follow recommendations from post #68.
I have to reboot again with Live CD and install dmraid, after I can answer.


ubuntu@ubuntu:~$ sudo apt-get install dmraid
Reading package lists... Done
Building dependency tree
Reading state information... Done
dmraid is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

ubuntu@ubuntu:~$ sudo dmraid -s
no raid disks

YesWeCan
August 9th, 2011, 06:26 PM
Hmm. It's odd that boot.img and core.img were not created in the Ubuntu server /boot/grub directory. Perhaps they were created somewhere else.
The only thing I noticed is that you used "sudo" here. As you have done a chroot you do not need sudo - you are already root. I wonder whether this is affecting it - I'm not sure at all. You might try it again.

root@ubuntu:/# sudo grub-install /dev/sda
Installation finished. No error reported.
root@ubuntu:/# sudo grub-install /dev/sdb
Installation finished. No error reported.

psusi
August 9th, 2011, 06:28 PM
Using sudo when you are already root has no effect.

b0ba
August 9th, 2011, 07:42 PM
Hmm. It's odd that boot.img and core.img were not created in the Ubuntu server /boot/grub directory. Perhaps they were created somewhere else.


Could be good idea to extract both image files from grub package and copy manually ?
but anyway I can not understand algorithm when grub makes copy of images to /boot/grub
and when just to MBR.

YesWeCan
August 9th, 2011, 07:57 PM
The "vanilla" image files need to be modified by grub-install (actually grub-mkimage that grub-install runs). The core.img file needs to have the UUID of the /boot partition inserted.

I can not understand how it is possible for you to chroot into your hard disk installation and run grub-install and it reports "no errors" but appears to do absolutely nothing. It is so absurd that I wonder if we are missing something really obvious here.

b0ba
August 9th, 2011, 09:19 PM
What is difference between alternate and server CD in grub part of installation ?
I have idea, to clean up with DD command MBR area and reinstall GRUB again.
Will check it tmr.

YesWeCan
August 9th, 2011, 09:52 PM
Do not erase the MBR or you will lose your partition table and then you'll have to reinstall from scratch.

YesWeCan
August 9th, 2011, 10:47 PM
Have you got a 4GB USB memory stick or another drive? It would be good to have a separate Ubuntu install so its Grub bootloader can be used to boot the Ubuntu on the array.

b0ba
August 9th, 2011, 11:33 PM
Yes. I have. But it will not help to understand 11.04 issue and to fix bug

YesWeCan
August 9th, 2011, 11:54 PM
Yes. I have. But it will not help to understand 11.04 issue and to fix bug
I am interested to know whether the grub install works when you are running from the Ubuntu on the hard disks. You didn't try that when you had it working before.

psusi
August 10th, 2011, 02:53 AM
There shouldn't be any difference whether you use the alternate or server install.

b0ba
August 10th, 2011, 09:15 AM
Do not erase the MBR or you will lose your partition table and then you'll have to reinstall from scratch.

I belive this DD command will remove just MBR.


Just remove MBR, without the partition table (see comment below):
# dd if=/dev/null of=/dev/sdX bs=446 count=1

b0ba
August 10th, 2011, 05:28 PM
I found finally way how to install img files, see end of log from chroot
and after reboot Ubuntu loaded.

Seems removing of 2 packages was a key:

Removing grub-efi ...
Removing grub-efi-amd64 ...


.....................
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# apt-get install -y grub-pc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
efibootmgr
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
grub-gfxpayload-lists
Suggested packages:
desktop-base
The following packages will be REMOVED:
grub-efi grub-efi-amd64
The following NEW packages will be installed:
grub-gfxpayload-lists grub-pc
0 upgraded, 2 newly installed, 2 to remove and 76 not upgraded.
Need to get 942 kB of archives.
After this operation, 49.2 kB disk space will be freed.
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/main grub-pc amd64 1.99~rc1-13ubuntu3 [939 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ natty/main grub-gfxpayload-lists amd64 0.2 [2,944 B]
Fetched 942 kB in 4s (218 kB/s)
Preconfiguring packages ...
(Reading database ... 60015 files and directories currently installed.)
Removing grub-efi ...
Removing grub-efi-amd64 ...
Processing triggers for man-db ...
Selecting previously deselected package grub-pc.
(Reading database ... 59791 files and directories currently installed.)
Unpacking grub-pc (from .../grub-pc_1.99~rc1-13ubuntu3_amd64.deb) ...
Selecting previously deselected package grub-gfxpayload-lists.
Unpacking grub-gfxpayload-lists (from .../grub-gfxpayload-lists_0.2_amd64.deb) ...
Processing triggers for man-db ...
Setting up grub-pc (1.99~rc1-13ubuntu3) ...
Installation finished. No error reported.
Installation finished. No error reported.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.38-8-server
Found initrd image: /boot/initrd.img-2.6.38-8-server
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Setting up grub-gfxpayload-lists (0.2) ...
root@ubuntu:/# ls /boot/grub/*img
/boot/grub/boot.img /boot/grub/diskboot.img /boot/grub/kernel.img
/boot/grub/cdboot.img /boot/grub/g2hdr.img /boot/grub/lnxboot.img
/boot/grub/core.img /boot/grub/grldr.img /boot/grub/pxeboot.img
root@ubuntu:/#

YesWeCan
August 10th, 2011, 06:07 PM
Good grief. Does the grub-install work now too?

psusi
August 10th, 2011, 06:37 PM
Is this an EFI system or not? If it is an EFI system then it should be using grub-efi, and that is why it was installed instead of grub-pc. grub-efi does not muck with the MBR, which is why installing it didn't seem to have any effect.

b0ba
August 10th, 2011, 06:59 PM
Good grief. Does the grub-install work now too?

actually don't know, because I copied img files to MBR with your DD commands.

@psusi (http://ubuntuforums.org/member.php?u=41311) I don't know if it is EFI system or not.

YesWeCan
August 10th, 2011, 07:06 PM
Is it booting ok now?

psusi
August 10th, 2011, 07:58 PM
@psusi (http://ubuntuforums.org/member.php?u=41311) I don't know if it is EFI system or not.

Most motherboards that have come out in the last 9 months or so support EFI, but have the option of still booting in bios mode. Go into your bios and see if you can find the setting.

It seems like you somehow managed to boot in EFI mode when installing Ubuntu, which caused it to install grub-efi, but then when you went to boot from the hard disk, it booted in bios mode. That's goofy. You need to stick with one or the other.

Let me ask you this... when you boot from the livecd, do you get a text mode grub menu, or the graphical syslinux boot? If you get grub, then you're booting in EFI mode.

b0ba
August 10th, 2011, 08:13 PM
..... If you get grub, then you're booting in EFI mode.
No, I had just normal graphical syslinux boot and yes, system is loading right now
without any problems.

@YesWeCan (http://ubuntuforums.org/member.php?u=934104) can you please open ticket or do you need some info from me ?

YesWeCan
August 10th, 2011, 08:17 PM
That's interesting psusi. So you are saying that it is possible to boot the Ubuntu alternative server install CD using EFI and if you do so then the installer will install grub-efi instead of grub-pc?

But what did the Ubuntu installer actually do at the Grub install stage? b0ba didn't report any error messages. There is no efi boot partition; which I understand would be needed.

Why did the desktop alternate install give a different result - in this case the .img files were present.

And why would a chroot grub-install appear to work and report no errors but apparently do nothing?

YesWeCan
August 10th, 2011, 08:22 PM
No, I had just normal graphical syslinux boot and yes, system is loading right now
without any problems.
Would you mind just checking if grub-install works? Say, do this:
sudo dd if=/dev/zero bs=446 count=1 of=/dev/sdb
sudo grub-install /dev/sdb
and then try to boot off sdb.
That will confirm the grub-install is now working ok. :)

You should open a launchpad account. You may need it again in the future. I'll find instructions.

YesWeCan
August 10th, 2011, 08:35 PM
Just go here
https://bugs.launchpad.net/ubuntu
And click on "register" in the top right corner. Once you are logged in you can start a bug report. It is a good idea to search first in case it has already been reported.
Once you have a bug number assigned others can add comments to it.

psusi
August 10th, 2011, 08:37 PM
None of this is making any sense. If you boot the installer ( be it desktop or alternate doesn't matter ) in EFI mode, then it installs grub-efi, otherwise it goes with grub-pc. If you have grub-efi installed, then that would explain why it didn't modify the MBR when you kept trying to reinstall it ( though it should have thrown an error without there being an EFI system partition ), and grub-efi also doesn't have the img files.

How do you get to the point where grub-efi is installed? Just by booting the livecd?

b0ba
August 11th, 2011, 11:33 AM
Would you mind just checking if grub-install works? Say, do this:
sudo dd if=/dev/zero bs=446 count=1 of=/dev/sdb
sudo grub-install /dev/sdb
and then try to boot off sdb.
That will confirm the grub-install is now working ok. :)

You should open a launchpad account. You may need it again in the future. I'll find instructions.

See log, grub-install works now. So seems problem was in EFI, only strange why installer uses it, instead of normal grub-pc.


tvj@dbs16:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/dbs16-root
471002488 1537860 445539076 1% /
none 2015672 228 2015444 1% /dev
none 2023972 24 2023948 1% /dev/shm
none 2023972 2028 2021944 1% /var/run
none 2023972 0 2023972 0% /var/lock
tvj@dbs16:~$ sudo dd if=/dev/zero bs=446 count=1 of=/dev/sda
[sudo] password for tvj:
1+0 records in
1+0 records out
446 bytes (446 B) copied, 3.4503e-05 s, 12.9 MB/s
tvj@dbs16:~$ sudo grub-install /dev/sda
Installation finished. No error reported.
tvj@dbs16:~$

Boot Info Script 0.60 from 17 May 2011


============================= Boot Info Summary: ===============================

=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for ?? on this drive.
=> Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for ?? on this drive.

MAFoElffen
August 11th, 2011, 02:09 PM
Just go here
https://bugs.launchpad.net/ubuntu
And click on "register" in the top right corner. Once you are logged in you can start a bug report. It is a good idea to search first in case it has already been reported.
Once you have a bug number assigned others can add comments to it.
After registering at Launchpad, if you then go to a terminal and type:


ubuntu-bug grub
Then it will direct you to launchpad to report a bug on Grub and file the correct dump files for you, leaving you to fill out info on the problem...

YesWeCan
August 11th, 2011, 07:14 PM
See log, grub-install works now. So seems problem was in EFI, only strange why installer uses it, instead of normal grub-pc.
Well at least you have it working now.

Major sigh tho. What a waste of time.
It is just this sort of lack of quality control (that's the very polite version of what I am really thinking) that gives linux a bad name.

b0ba
August 12th, 2011, 08:35 PM
Finally I opened new bug.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/825145/+subscriptions

@YesWeCan (http://ubuntuforums.org/member.php?u=934104) Thank you very much again for your help and patince in my struggle ;)

maxslug
August 15th, 2011, 05:00 AM
Just a note to other future googlers that there are OTHER problems w/ Grub2 and RAID1 using 11.04 that at this time (8/2011) are not fixed.

In my case, grub doesn't parse the configuration correctly and won't install.
See https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/681535?comments=all

It's been fixed upstream for almost a year, but hasn't made it into lucid yet.

-m