Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: where is grub installed?

From: Douglas A. Tutty <dtutty(at)porchlight.ca>
Date: Sat Aug 18 2007 - 17:03:14 EDT


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. The MBR is the first block of the drive (first 512 B) with the partition table in the subsequent block somewhere (check wikipedia). This means that you can reformat /dev/hda1 to your heart's content.

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

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.

Doug.

-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Sat Aug 18 17:05:56 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 02:24:03 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library