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

Re: where is grub installed?



On 8/18/07, Douglas A. Tutty <dtutty@porchlight.ca> wrote:
> On Sat, Aug 18, 2007 at 04:38:33PM -0400, P Kapat wrote:
> > Suppose my hard disks are setup as:
> >
> > IDE (Master)
> > /dev/hda1  -- ext3  -- 10 GB
> > /dev/hda2  -- ext3  -- 100 GB
> > /dev/hda3  -- ext3  -- 50 GB
> >
> > SATA (connected to SATA 1 controller on the mobo)
> > /dev/sda1 -- ext3 -- 50GB  -- /
> > /dev/sda2 -- ext3 -- 500 MB -- /boot
> > /dev/sda3 -- ext3 -- 100 GB -- /home
> >
> > So, the GRUB oncfig files are in /dev/sda2 (/boot/grub). I am assuming
> > that grub is installed in /dev/sda2. So, where is the MBR? Is it on
> > the first track of the first partition of the first hard disk, ie
> > /dev/hda1?
>
> It is wherever you told grub to put it.  On debian, it should go on the
> MBR of the drive, which in your example would be the MBR of /dev/hda.

I see.

> The MBR is the first block of the drive (first 512 B) with the partition
> table in the subsequent block somewhere (check wikipedia).

Thanks I will check that.

> This means that you can reformat /dev/hda1 to your heart's content.

Good to know that.

>
> >
> > If so, suppose I format /dev/hda1 will the MBR be gone implying that I
> > cannot reboot m y system?
>
>
> >
> > What is the safest way to partition the disks so that, if sometime
> > later I install someother OS (Solaris/FreeBSD/Anyother GNU/Linux but
> > not Windows) the MBR is not disturbed and I can use it to boot into
> > the existing Debian.
>
> There's the rub.  It seems that all OSs by default figure that they are
> the only OS and put their boot loader in the MBR of the first hard
> drive.

I was actually surprised to to learn this the hard way. A few days
back, I was trying (out of inane curiosity) the "Open Solaris". It
uses GRUB as the bootloader too, but could not find my Debian
installation and (all to my discredit) installed its grub on the MBR
of hda1. Then I could not get Solaris's grub to boot my debian (i
tried the usual configurations in Solaris-Grub's (not the one
/dev/sda2) /boot/grub/menu.lst).

> However, every OS that you may want to install should include
> documentation on dual-booting.  One of your considerations is whether or
> not Grub can boot that OS.   I think (check the docs) that as long as
> Grub will boot it, you leave grub in the MBR and put the OS's loader on
> the actual partition, then set up grub to chain-load.  The bios will boot
> Grub, then Grub will boot the OS's loader which will in turn boot the
> OS.

Yes, that makes sense.

> My new Athlon64 Asus bios has an F8 boot menu.  It presents a list of
> drives to attempt to boot.  If I had multiple OSs with multiple drives,
> I'd install each OS on its own drive with its loader in the drive's MBR,
> then use the bios boot menu to choose which drive to boot.

I will have to learn to tell grub where to install it. Never paid much
attention to it.

> Doug.

Thanks again.

-- 
Regards
PK
--------------------------------------
http://counter.li.org  #402424



Reply to: