PermaLink Howto install grub on SW raid02/01/2007 06:57 AM
You use a md device to boot your system ? For some reason you want to be able to boot from any of the disks ? Here's how to install grub to boot correctly.

Let's assume, you use a raid1 on hde and hdg and your boot partition is the first partition on the disk.

# Run grub

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>

# Install bootloader on first disk (in this case /dev/hde)

grub> device (hd0) /dev/hde

grub> root (hd0,0)
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,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

# Now install on second disk (in this case /dev/hdg)

grub> device (hd0) /dev/hdg

grub> root (hd0,0)
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,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

# Exit grub

Technorati:

Disclaimer ...
All my entries in this Blog reflect my personal opinion on various subjects and do not represent any employer's and/or customer's position.

wickerl_bechelaren_at.gif
Contact
Categories
Photo Albums
BlogRoll
netcraft Linux host Blog Admin OpenNTF
Archive