Re: GRUB & MBR

From: Clive Dove (chdove_at_rogers.com)
Date: 08/08/03


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
> Linux.
>
> 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.
>
> Jason.

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
boot loader.

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
untouched.)

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.



Relevant Pages

  • Re: Please Help: system keeps rebooting after installing FC3
    ... writing to the MBR even when i opt not too. ... F8 everytime i boot to toggle BIOS to boot from my hdb. ... get hold of various other boot loaders, grub fail the same way as yours. ... The installation went smooth and at the end I needed ...
    (linux.redhat)
  • Re: Dual XP/Suse: grub iin MBR or Suse boot sector?
    ... With NTLDR starting from MBR, you don't see the grub menu until ... without breaking the boot setup. ... always access your Linux installation by booting from Linux ...
    (alt.os.linux.suse)
  • Re: Dual XP/Suse: grub iin MBR or Suse boot sector?
    ... With NTLDR starting from MBR, you don't see the grub menu until ... without breaking the boot setup. ... always access your Linux installation by booting from Linux ...
    (comp.os.linux.setup)
  • Re: remove partaion
    ... The most interesting hurdle will be what the Master Boot Record ... thus kill GRUB. ... I would copy your MBR and first 63 sectors (see the MBR Copy Appendix ... GUI or command line commands to accomplish that. ...
    (Fedora)
  • Re: How do I make a boot disk so I can restore Grub?
    ... I read that Windows will overwrite the MBR. ... > need to make a boot disk so I can restore MBR after Windows ... How do I make a boot disk and be able to restore Grub on ... with the designation for wherever your boot partition is. ...
    (comp.os.linux.setup)