[CentOS] Re: Problem with booting/grub (?)

Mon Sep 22 19:01:41 UTC 2008
William L. Maltby <CentOS4Bill at triad.rr.com>

On Mon, 2008-09-22 at 11:06 -0700, MHR wrote:
> On Mon, Sep 22, 2008 at 10:08 AM, Scott Silva <ssilva at sgvwater.com> wrote:
> >
> > Grub boot code is in the mbr so it loads. If it can't find the stage 2 it
> > usually quietly dies. I believe it has to load stage 1 to have enough code
> > to actually give error messages. The mbr is just too small to get all the
> > code into. So changing drives also changed the bios disk order on your
> > system, and grub got confused.
> >
> I sympathize (I'm confused, too).
> I can't swear to it, but I'm pretty sure I had rebooted several times
> after changing the boot drive and the boot drive order, all without a
> hitch.  Then this happened.
> I can swear (now) that I have rebooted several times since recovering,
> so if I muddled through this correctly, you're saying that it
> shouldn't happen again as long as I don't change the drive order
> again, right?
> One of the things that I found rather irritating in all this was the
> utter lack of clarity provided in both the man pages for grub and
> grub-install, and the info pages (which are supposed to be more in
> detail but are not, really).  How do I know which disk is which from
> grub's p.o.v.?  There is no command to list the drives, and I wound up

BIOS assigns hex "drive ID" to the boot disk 0f 0x80. From BIOS POV,
next is 0x81, 0x82, ...

Now, say you set in BIOS to boot from hdd. It becomes 0x80, hda becomes
0x81, ...

This is the code passed to GRUB, which interprets hd{0,1,2,3} relative
to 0x80, 0x81, ...

Note that with hdd selected as boot, we have a "shuffle up":

hda->hdb, hdb->hdc, hdc->hdd and, of course, hdd->hda.

OTOH (IIRC - be careful now I'm recalling deep dark stuff) if you select
hdb as the boot device, it becomes 0x80, ... NEVER MIND!

Read this instead (from 2003)


> <snip>