I have recently added a drive to a system and have successfully raid'ed (RAID-1) the paritions, with the exception of the boot partition. I have it ready and mirrored, but can't get GRUB2 (update-grub) to find it.
System: Ubuntu 11.04 Raid Metadata: 1.2
If I run update-grub, it finds the kernel images on the /dev/sda2 partition (present root) but not the images on /dev/md127.
/dev/md127 is composed of "missing" and "/dev/sdb2".
fdisk on /dev/sdb confirms that sdb2 is of type fd (raid autodetect) and is also flagged bootable.
I have two things I want to do.
- Make the boot.cfg on /dev/sdb2 have a menu option to have the root be /dev/md127
- Install grub onto /dev/md127 so the actual boot.cfg from there is being used.
Disk partitions:
$ sudo sfdisk -l /dev/sda Disk /dev/sda: 30394 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sda1 0+ 13 14- 112423+ de Dell Utility /dev/sda2 * 14 7837 7824 62846280 83 Linux /dev/sda3 7838 8882 1045 8393962+ 82 Linux swap / Solaris /dev/sda4 8883 30393 21511 172787107+ 5 Extended /dev/sda5 8883+ 30393 21511- 172787076 83 Linux $ sudo sfdisk -l /dev/sdb Disk /dev/sdb: 30394 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sdb1 0+ 13 14- 112423+ de Dell Utility /dev/sdb2 * 14 7837 7824 62846280 fd Linux raid autodetect /dev/sdb3 7838 8882 1045 8393962+ 82 Linux swap / Solaris /dev/sdb4 8883 30393 21511 172787107+ 5 Extended /dev/sdb5 8883+ 30393 21511- 172787076 fd Linux raid autodetect The thing to note here is that /dev/sdb2 is part of a raid, while /dev/sda2 is not. /dev/sda2 is the present non-raid boot that works fine. I would like to switch to a raid boot and when that is good, convert sda2 to raid and add it to the "missing" raid drive.
$ cat /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md5 : active raid1 sda5[2] sdb5[1] 172785980 blocks super 1.2 [2/2] [UU] md127 : active raid1 sdb2[1] 62846208 blocks [2/1] [_U] The tail end of mdadm.conf. This was auto-generated by /usr/share/mdadm/mkconf
# This file was auto-generated on Thu, 30 Jun 2011 14:38:15 -0500 # by mkconf $Id$ ARRAY /dev/md127 UUID=352d87d1:23d5c92d:04cfec0a:0340cbb1 ARRAY /dev/md/5 metadata=1.2 UUID=7ea17a90:6cbf0816:feef74da:5fa4f88a name=ramuh:5 The grub.cfg file that boots fine from /dev/sda2
menuentry 'Ubuntu, with Linux 2.6.38-11-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os { recordfail set gfxpayload=$linux_gfx_mode insmod part_msdos insmod ext2 set root='(/dev/sda,msdos2)' search --no-floppy --fs-uuid --set=root 7bbe19ee-c62c-4674-b0ca-281d1cedac00 linux /boot/vmlinuz-2.6.38-11-generic-pae root=UUID=7bbe19ee-c62c-4674-b0ca-281d1cedac00 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-2.6.38-11-generic-pae Thanks!