Understanding how RAIDed Disks Interact with the SLES Boot Process
Novell Cool Solutions: Tip
By Ivan Vari
Digg This -
Posted: 20 Nov 2007
Installed SLED/SLES system onto software raided (RAID1) disks and after the install finished the system fails to boot.
The problem is that the /boot partition as such should not be raided, in fact it should be traditional Linux primary, it's the old school way.
It's not desired for many administrator simply because in case of a disk failure the system may not boot even though our data and root system is safe. Certainly maintaining a /boot manually on the second disk would be a bit tedious.
Some people create separate RAID1 array for /boot which wouldn't give any advantage over having it on the root FS therefor I present a solution here where we have only 1 root and 1 swap.
Note: you will need to load the official media in and select rescue mode for being able to fix the problem with the provided solution.
My disk config looks like this:
geeko:~ # fdisk -l /dev/sda Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 9729 78148161 f W95 Ext'd (LBA) /dev/sda5 1 1306 10490382 fd Linux raid autodetect /dev/sda6 1307 1568 2104483+ fd Linux raid autodetect
md0 is sda5 and sdb5 and used for swap
md1 is sda6 and sdb6 and used for /
Start the grub interactive shell:
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ]
grub> find /boot/grub/stage1 (hd0,6) (hd1,6) grub> root (hd0,6) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,6)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded Done. grub> root (hd1,6) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd1) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,6)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded Done. grub> quit
A bit of an explanation:
- You tell grub first to find all disks which includes grub installed on them.
- Then you select the first disk "root (hd0,6)". Note: grub will treat all disks as "hd" regardless it's SATA or SCSI
- Then you install grub to the first disk's first partition "setup (hd0)". You could install it to anywhere, it's just a common approach.
- You do the same for the second disk as well
After all your system should be able to boot and finish the install stage 2. Bear in mind you may need to redo this when you receive a kernel upgrade. (I had to...) I recommend doing this when you see kernel upgrades getting installed before you reboot the system which saves you the rescue mode...
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com