Re: GRUB & MBR
From: Clive Dove (chdove_at_rogers.com)
Date: Fri, 08 Aug 2003 11:21:27 GMT
Witchsmeller Jason wrote:
> Can anyone explain a few details of dual-booting, I've read quite
> a lot but think I've tied myself up in knots.
> When I installed RH 7.3 on a machine with windows already on it, I
> had the option to install GRUB in either the MBR or in the boot
> sector of the RH installation, what are the implications of
> putting GRUB in these places?
> I'm thinking that if I choose the boot sector of the RH
> installation, RH will be set as the active partition in the MBR
> Partition table which will point to the boot sector of the RH
> partition. Then, when it reads the boot sector (GRUB) in the RH
> installation I get the choice of booting to either Windows or
> With GRUB installed in the MBR I get the choice to boot to either
> OS initially. Is this correct, if so what factors influence which
> option I should take?
> I know the MBR comprises of an IPL (Initial Program Loader) & the
> partition table, does GRUB replace the IPL or does it coexist with
> the IPL?
> There's a lot of conjecture on my part but any help putting the
> final pieces of the puzzle in place are appreciated.
I am familiar with lilo, rather than GRUB, so the following refers
to lilo, but the principles are the same for GRUB.
If you put lilo into the boot partition of the linux installation,
you will not be able to boot to linux unless you have something in
the MBR that acts as a boot manager. or that jumps to something
that acts as a boot manager or you have had the foresight to make a
linux boot floppy.
When lilo is put into the linux partition it acts as a secondary
When lilo is put into the MBR it acts as a boot manager for all
operating systems provided for in file /etc/lilo.conf.
It replaces the first 446 bytes of the MBR, which in effect means
that it replaces the windows primary bootloader that was previously
there, where it acts as a boot manager and primary loader. (The
remainder of the 512 byte MBR is the partition table which remains
Windows programs boot from their own boot sector once they have been
found by a jump from the MBR so anything that jumps from the MBR to
that boot sector will cause it to boot, including lilo (or GRUB)
Linux boots by invoking the kernel from lilo, whether it be in the
MBR or the linux boot sector. Accordingly, if you have a second
linux aboard, put its GRUB or lilo into its own boot sector and
edit the GRUB or lilo that is in the MBR to treat it in the same
manner as if it were a windows os.