Re: 2.1.93..

Riley Williams (rhw@bigfoot.com)
Fri, 17 Apr 1998 17:59:47 +0100 (BST)


Hi Craig.

On Thu, 16 Apr 1998, Craig Milo Rogers wrote:

>> If this is the case, then all that's required is for LILO to know
>> which disk it was loaded off, and label that disk as being the
>> boot disk...

>> Since this is so simple, I'm obviously missing something, so
>> please tell me what - I hate it when I do...

> Suppose you have a system that you want to run Linux on...
> some of the time. Unfortunately, there's a copy of Ms. Windows on
> it, and for reasons that are too incredibly embarassing to
> comtemplate, but which might have something to do with making a
> living in the Real World, you can't just blow the Ms. Windows
> installation away.

Grin...

> So, you go to some place like Fry's Electronics, buy a second
> disk drive, install it in the system, and install Linux on that.

Nods...

> Now, the initial boot sector(s), containing lilo, are on the
> first drive (/dev/sda), while the Linux images are on the second
> drive (/dev/sdb). So, when you want to boot Linux, lilo has to know
> to tell the BIOS, "Please read some sectors from that other drive
> over there."

To be accurate, it has to know to tell the BIOS "Please read some
sectors from the drive you did NOT load me from", correct?

> Lilo presumably does this by storing some small integer somewhere
> in the initial boot sector(s), and passing the appropriate one to
> the BIOS.

Nods...how it does it isn't really relevant to this discussion
though...

> What happens when the controllers or drives are renumbered?
> The small integers change (but not everwhere, all at once)!

Thus the BIOS fails to load LILO, but instead loads something off the
other drive instead? You did say there are only two drives...

> Lilo tries to boot from the wrong drive!

Why does it? If the BIOS has loaded LILO, then it is still accessing
the drive that LILO's on with the same reference, so if LILO knows
which drive it was loaded off, it also knows which drive it was NOT
loaded off, and thus where Linux is...

> The user becomes very, very unhappy.

Why?

Your example appears to demonstrate perfectly what I was saying: If
LILO knows which drive it was loaded off, it knows which is the boot
drive, and thus which is the boot controller, thus it can label any
other drives on the same controller correctly.

In addition, if there's not more than one other controller, it can
then label the drives on the second controller correctly as well,
irrespective of any renumbering that may occur.

As a result, the only problems appear to occur when there are THREE or
more controllers, in which case it can correctly identify which is the
primary controller by the fact that LILO was loaded from a drive on
that controller, but it then needs some means to determine the order
of the remaining controllers...

Best wishes from Riley.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu