[CentOS] CentOS 5 grub boot problem

Wed Aug 5 23:41:59 UTC 2015
Chris Murphy <lists at colorremedies.com>

I never thought I'd say this, but I think it's easier to do this with
GRUB 2. Anyway I did an installation to raid1's in CentOS 6's
installer, which still uses GRUB legacy. I tested removing each of the
two devices and it still boots. These are the commands in its log:

  : Running... ['/sbin/grub-install', '--just-copy']
  : Running... ['/sbin/grub', '--batch', '--no-floppy',
'--device-map=/boot/grub/device.map']
  : grub> device (hd0) /dev/vdb
  : grub> root (hd0,1)
  : grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0,1)
/grub/stage2 p (hd0,1)/grub/grub.conf
  : Running... ['/sbin/grub', '--batch', '--no-floppy',
'--device-map=/boot/grub/device.map']
  : grub> root (hd0,1)
  : grub> install --stage2=/boot/grub/stage2 /grub/stage1 d (hd0,1)
/grub/stage2 p (hd0,1)/grub/grub.conf

I do not know why there's a duplication of the install command. It
also looks like the way it knows it's supposed to install two
bootloader stage1 and stage2 to two different devices is with

devices (hd0) /dev/vdb

I don't know why the split referencing. (hd0) is /dev/vda and (hd1) is
/dev/vdb. Weird. But it does work.

hd0,1 in my case is /boot, but yours is hd0,0 since it's the first
partition. So anywhere the steps above say hd0,1 you probably need
hd0,0.


Chris Murphy