[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MBR problem



On Wed, 24 Nov 2004 10:40, Michael Z Daryabeygi wrote:
> Punit Ahluwalia wrote:
> >I installed grub to /dev/hdc2 which is also /root. This is not a dual
> > boot. It is plain and simple "Woody".
> >
> >How do I install grub to the MBR?
>
> you must start grub, either from in a working linux or by booting
> directly into grub.
> from the grub command line:
> $ root = hd(x,y)   /* where x is the num of the hd and y is the num of
> the partition (both zero based)*/
> try tab completion if you are unsure
> root is not your kernel location, it it the grub root, or where the grub
> install images are located
> from you message above I think it would be hd(2,1).
>
> then to write to the MBR,
> $ setup hd(x,y)
>
> and that's it!

With respect, I believe this last line is not quite correct.
"setup hd(x,y)" will install Grub into drive x, partition y.
To install to the MBR of drive x, use    setup hd(x)   

Most likely, you'd want to install Grub to the MBR of the first hard drive 
(if that's what the BIOS is set to boot off) -  that is, /hda or  hd(0), so 
use    "setup hd(0)"

I don't think Grub cares what's already there (LILO, DOS or Windows 
bootloaders), I think GRUB just writes over the top of anything there.

cr



Reply to: