On 9/7/05, Heinz Sporn <[EMAIL PROTECTED]> wrote:
> Am Mittwoch, den 07.09.2005, 10:25 +0200 schrieb Christoph Gysin:
> > Neil Bothwick wrote:
> > > Correct, and /dev/hda5 is (hd0,4) despite all the conflicting advice
> > > you've been given.  All my boxes have /boot on hda5 and all use hd0,4
> > > (well, except the iBook which uses that horrible yaboot thing, anyone
> > > who wants to start a grub vs. lilo flame war should be made to use
> > > yaboot).
> >
> > Sorry for the confusing answers. I was pretty sure grub doesn't care wether 
> > your
> > partions are primary or logical, giving each a number starting from 0.
> > Appearantly this is *not* the case. From the docs:
> >
> 
> Grub's a nasty hog, that's for sure (but still superior over Lilo IMHO).
> Another very important point to consider is that Grub looks at drive
> sequences from a BIOS perspective. Say you have disk 1 (primary IDE) and
> disk 2 (secondary IDE). When you boot Grub in sunshine mode it'll see
> disk 1 as hd0 and disk 2 as hd1. But if you jump into your BIOS and set
> disk 2 to your primary boot medium Grub will change it's perspective and
> match disk 2 to hd0.
> 
> >       (hd0,1)
> >
> >     Here, `hd' means it is a hard disk drive. The first integer `0'
> > indicates the drive number, that is, the first hard disk, while the
> > second integer, `1', indicates the partition number (or the PC slice
> > number in the BSD terminology). Once again, please note that the
> > partition numbers are counted from _zero_, not from one. This
> > expression means the second partition of the first hard disk drive. In
> > this case, GRUB uses one partition of the disk, instead of the whole
> > disk.
> >
> >       (hd0,4)
> >
> >     This specifies the first "extended partition" of the first hard disk
> > drive. Note that the partition numbers for extended partitions are
> > counted from `4', regardless of the actual number of primary partitions
> > on your hard disk.
> >
> > Hope this made things clearer now...
> >
> > Christoph
> > --
> > echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" [EMAIL PROTECTED]
> --
> Mit freundlichen Grüßen
> 
> Heinz Sporn
> 

Hi Heinz,
   OK, the machine is up and dual booting so everything worked out
fine. Thanks to all for your answers. What I suggested in my first
email was correct. Before I did it I followed Neil's suggestion abut
using the find command within grub. That did clarify things a bit and
made me feel a bit better when I pulled the trigger.

   Anyway, I read all the responses this morning and had a good laugh.
I guess I'm not the only one who has a question or two about how all
of this is done! I must say that I'm appreciative of all the
responses.

   As for the comment above about BIOS order, I think that's correct,
but I tried an experiment on this machine and told it to boot from the
second EDIE controller. That did not change the order grub saw the
drives so I'm not sure every option in BIOS would fit your rule above,
or maybe I still don't understand.

   As for grub rules I think I understand, it's these:

1) The order that the system sees hard drives is the order grub will
enumerate them. For instance, in this system:

/dev/hda - hard drive
/dev/hdb - hard drive
/dev/hdac - cdrom

or this system:

/dev/hda - hard drive
/dev/hdc - cdrom
/dev/hde - hard drive

both produce the same results in grub:

hd0 == /dev/hda
hd1 == /dev/hdb or /dev/hde

where the drives are numbered in the order Linux shows them.

As for partition numbers it is my understanding that grub is always
the /dev/hdX value minus 1.

Beyond that I don't pretend to know anything.

The one thing that always confuses me is the difference between
placing grub in the MBR and placing it in a partition. It is my
understanding that the MBR is a separate part of the drive structure,
and is not part of any partition. Is this true?

When we place an bootloader in the MBR that's what the system jumps to
first? After that the bootloader in the MBR can transfer to either an
operating system or to a second boot loader. I've done this where I
had a copy of grub from Gentoo in the MBR, and then a copy of grub in
a partition. Each copy had their own grub.conf file and managed it's
own set of kernels, etc.

However, what Windows does is a bit beyond me. I suppose it places
it's own bootloader in the MBR. We then overwrite it, but then we have
a command to jump to that OS. (chainloader +1 I suppose?)

Anyway, confusing.

Hey, emerge sync running now. Windows boots, Gentoo boots. All is
good. this is my first dual boot machine that didn't use System
Commander.

Thanks much,
Mark

-- 
gentoo-user@gentoo.org mailing list

Reply via email to