[wplug] GRUB won't update MBR

Vanco, Donald VANCOD at PIOS.com
Tue Aug 5 21:07:03 EDT 2003


I wrote:
> Alexandros Papadopoulos wrote:
>> I installed a hardware ATA RAID 1 controller in a RH7.2 machine.
>> After much trouble, I've managed to install GRUB on the MBR, but it
>> insists on trying to boot /dev/hda1, while my current disks are
>> /dev/hde and /dev/hdg. I thought that having the correct grub.conf
>> and running grub-install /dev/hde was all it took, but it doesn't
>> seem to be so easy. 
>> 
>> Right now I have to edit the boot options manually every time and
>> change the root= clause to /dev/hde1. It then boots just fine.
>> 
>> Anyone have any instructions for wiping out a MBR and installing the
>> one I want?! grub-install is giving me "no corresponding BIOS drive"
>> errors, and yeah, these drives are on a PCI controller.
> Hmm.... are there BIOS settings to look to PCI add-in devices for boot
> (first)?  Does the ATA RAID card offer the ability to "label" a boot
> drive? I suspect the latter will be required.  I've dealt with add-in
> ATA RAID cards but only at install and the installer did all the
> magic.  Like yours they're always hde and hdg.
> 
> I don't think the issue has anything to do with/will be helped by
> blasting the MBR on the device formerly known as hda - but if you
> want to: dd if=/dev/zero of=/dev/hda count=2
> DO NOT add a number or you will be blasting a data partition.  You
> can get to this by booting the first CD of the RH distro and either
> going into the "rescue mode" (broken in 7.2, but likely functional
> for this exercise) or by going far enough into the install process to
> get the bash shell on console 2.
> 
> Have you tried entering the grub shell and specifying to boot device
> and then installing grub? (but grub-install should do the same stuff).

oops - forgot the grub stuff...

This assumes a conf file in /boot/grub/grub.conf (standard RH fare)
enter the grub shell:
grub

(now find the stage1 image)

grub> find /boot/grub/stage1
(hd0,0)   (or you should see something similar)



(now set the root to match the above device)

grub> root (hd0,0)



(now install grub)

grub> setup (hd0)
NOTE - if you use (hd0,0) here you are NOT writing MBR you are writing to
the FIRST partition)

...but this is essentially what grub-install does.

HTH

BTW - you can also try making a grub floppy just to insure your images are
OK:
(from /boot/grub).  There's 2 stages to GRUB....
dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1

YMMV
Don



More information about the wplug mailing list