Its a few days away from Karmic’s official release, and I’m putting together a new computer and thought I would give the new version a try. I set everything up with Software raid, and it is still annoying to me that to do so on Ubuntu still requires the Alternate CD and a text-based install.
I configured the /boot partition to use a RAID1 array, as I normally do. After getting most of the way through the install, I got a big red screen with the following error:
==================================== Unable to install GRUB in /dev/md0 Executing 'grub-install /dev/md0 failed' This is a fatal error ====================================
I tried several variations on continuing, but nothing seemed to work. Turns out that a known issue with Karmic is that this doesn’t work. Actually the known issue says that grub is only installed to the first drive, but that was not my experience.
Bug 420748 gives some detail on the issue, and it seems that the change to Grub2 might have something to do with it. From the red screen, I chose to proceed without installing a boot loader. I Rebooted to Alternate CD, and chose to repair a broken installation. Once to a shell, I ran these commands to install grub to the master boot records on both drives
grub-install /dev/sda grub-install /dev/sdb
I removed the CD and rebooted. It ended up at a grub shell. At which point I ran the following to boot into the system (note the difference in grub2 commands)
set root=(hd0,1) linux /vmlinuz-2.6.31-14-generic ro root=/dev/md1 (use tab-completion on the kernel image filename) initrd /initrd.img-2.6.31-14-generic (again, use tab-completion) boot
At that point, it started up normally. Once logged in, I started a terminal and then ran this command as root to create a minimal grub.cfg file (note that it is no longer called menu.lst)
grub-mkconfig > /boot/grub/grub.cfg
I’m now able to reboot into a working system. So much for a flawless install experience.
4 thoughts on “Booting from a Software Raid device on Ubunto Karmic (9.10)”
brilliant! thanks for the links
we made it work with raid boot and raid+lvm root
Ha! I have had quite an experience with installation as well. Thanks for the links and info. It helped me a lot
My experience is somewhat different. Getting to the grub shell was easy, since I chrooted to the new / partition before rebooting after the install. Then after installing mdadm and updating initramfs and grub, I rebooted.
The problem I’ve got is that mdadm isn’t starting, so that grub doesn’t see the partitions on /dev/md1. In the grub console all I need to do is mdadm –auto-detect then exit and the boot continues. However, I don’t want to do that every time.
I notice that your root is /dev/md1 while mine is /dev/md1p1. If you’re simply using RAID 1, then your /dev/md1 may be readable even without mdadm starting. However, with a partitioned RAID array, I definitely need mdadm to be running. However, I don’t know enough about grub 2 to make it start.