| Grub ing to the second disk in a RAID1/mirror set. |
|
|
|
| Written by Mogamat Abrahams and Terence November |
| Thursday, 26 May 2011 09:31 |
|
So the problem came down to the fact that GRUB is installed in the bootsector of the first drive only. As the bootsector is not subject to RAID1 mechanics, it doesn't get replicated, only the partitions marked as RAID are. Partitions as we know, are located after the BOOT sector on the disc. Disc1---SDA1-----MD0---/boot Disc1--SDA2-----MD1------/ Disc2--SDB1---MD0-----/boot Disc2---SDB2----MD1------/ So a simple task indeed, put GRUB on the second disk so it can find the parts to boot if the first one fails. Sure....not.... As the discs are constantly embraced in an act of replication and the resultant combined disc is presented to the OS, GRUB only updates itself on the first disc - perhaps there is another way which eluded us... So we had to pull out our trusty ClearOS installation disc, remove the first hard drive and boot into rescue mode. Remember that at this point sdb now becomes sda. GRUB could still not find the discs/partitions we needed, but this was due to us not re-assembling the proper directory structure. mount /dev/sda2 /mnt/temp mount /dev/sda1 /mnt/temp/boot chroot /mnt/temp put us back in the game. At this point we could see the /boot files and could run GRUB, but root (hd0,0) still told us invalid device name Having vaguely remembered a similar tryst with GRUBby in the past (related to GHOSTing GRUBbed drives) we refered back to our trusty notes. Exiting the chroot, we did: mount -o bind /proc /mnt/temp/proc mount -o bind /dev /mnt/temp/dev chroot /mnt/temp and voila! GRUB could now find the drive/partition. It seems to depend on the /dev and /proc folders to communicate with the hardware. Being a boot loader which lives before the kernel comes into existance, we expected it to be able to directly access the drives I suppose. Our mistake. So then a simple : grub grub> root (hd0,0) grub> setup (hd0) grub> quit reboot and the disc booted, just as it was supposed to in the first place. |
| Last Updated on Tuesday, 31 May 2011 09:10 |



