PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > where is grub installed?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

where is grub installed?

Réponse
 
LinkBack Outils de la discussion
Vieux 18/08/2007, 22h40   #1
P Kapat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut where is grub installed?

Hi,
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?

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.

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 18/08/2007, 23h10   #2
Douglas A. Tutty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: where is grub installed?

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
  Réponse avec citation
Vieux 18/08/2007, 23h10   #3
Douglas A. Tutty
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: where is grub installed?

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
  Réponse avec citation
Vieux 19/08/2007, 03h00   #4
Jose Luis Rivas Contreras
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: where is grub installed?

P Kapat wrote:
> Hi,
> 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?


The MBR is _not_ part of any partition, is the boot sector of the drive.
And is in the disk from where you're booting so check in your BIOS.

>
> If so, suppose I format /dev/hda1 will the MBR be gone implying that I
> cannot reboot m y system?


No.

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


Just don't rewrite the MBR with something that will override your actual
GRUB config.

Regards,
Jose Luis.
--

ghostbar on debian linux 'sid' 2.6.22 x86_64-SMP - #382503
Weblog: http://ghostbar.ath.cx/ - http://linuxtachira.org
http://debian.org.ve - irc.debian.org #debian-ve #debian-devel-es
San Cristóbal, Venezuela. http://chaslug.org.ve
Fingerprint = 3E7D 4267 AFD5 2407 2A37 20AC 38A0 AD5B CACA B118


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGx5UyOKCtW8rKsRgRAqEGAJ9rhUWmGVQn1i10jBoP6R MznXmVcACbBNfZ
XOamCoXD3LZ7SwgSVhTs0jY=
=3i5n
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 19/08/2007, 03h00   #5
Jose Luis Rivas Contreras
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: where is grub installed?

P Kapat wrote:
> Hi,
> 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?


The MBR is _not_ part of any partition, is the boot sector of the drive.
And is in the disk from where you're booting so check in your BIOS.

>
> If so, suppose I format /dev/hda1 will the MBR be gone implying that I
> cannot reboot m y system?


No.

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


Just don't rewrite the MBR with something that will override your actual
GRUB config.

Regards,
Jose Luis.
--

ghostbar on debian linux 'sid' 2.6.22 x86_64-SMP - #382503
Weblog: http://ghostbar.ath.cx/ - http://linuxtachira.org
http://debian.org.ve - irc.debian.org #debian-ve #debian-devel-es
San Cristóbal, Venezuela. http://chaslug.org.ve
Fingerprint = 3E7D 4267 AFD5 2407 2A37 20AC 38A0 AD5B CACA B118


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGx5UyOKCtW8rKsRgRAqEGAJ9rhUWmGVQn1i10jBoP6R MznXmVcACbBNfZ
XOamCoXD3LZ7SwgSVhTs0jY=
=3i5n
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 19/08/2007, 07h40   #6
P Kapat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 19/08/2007, 07h40   #7
P Kapat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: where is grub installed?

On 8/18/07, Jose Luis Rivas Contreras <ghostbar38@gmail.com> wrote:
> P Kapat wrote:
> > Hi,
> > 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?

>
> The MBR is _not_ part of any partition, is the boot sector of the drive.
> And is in the disk from where you're booting so check in your BIOS.


Thanks for the explanation.

>
> >
> > If so, suppose I format /dev/hda1 will the MBR be gone implying that I
> > cannot reboot m y system?

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

>
> Just don't rewrite the MBR with something that will override your actual
> GRUB config.


Yes, as I will have to learn to do that.

>
> Regards,
> Jose Luis.


Thanks again.

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 19/08/2007, 07h40   #8
P Kapat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: where is grub installed?

On 8/18/07, Jose Luis Rivas Contreras <ghostbar38@gmail.com> wrote:
> P Kapat wrote:
> > Hi,
> > 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?

>
> The MBR is _not_ part of any partition, is the boot sector of the drive.
> And is in the disk from where you're booting so check in your BIOS.


Thanks for the explanation.

>
> >
> > If so, suppose I format /dev/hda1 will the MBR be gone implying that I
> > cannot reboot m y system?

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

>
> Just don't rewrite the MBR with something that will override your actual
> GRUB config.


Yes, as I will have to learn to do that.

>
> Regards,
> Jose Luis.


Thanks again.

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h20.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,19031 seconds with 16 queries