Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: why does dk(4) take precedence in boot device selection???



At Thu, 23 Apr 2015 05:55:11 +0000 (UTC), mlelstv%serpens.de@localhost (Michael van Elst) wrote:
Subject: Re: why does dk(4) take precedence in boot device selection???
> 
> woods%planix.ca@localhost ("Greg A. Woods") writes:
> 
> >Am I missing something here that I could do to change the wedge
> >configuration to avoid this issue?  Is it still so difficult to discover
> >which device the boot loader booted the kernel from on such a
> >semi-modern amd64 machine that the kernel can make such mistakes as
> >this?  If dk(4) is auto-configuring can it not at least look to see if
> >there's a valid filesystem on the device before it shoves itself in the
> >front of the line as the supposed "boot device"?
> 
> The device drivers, including dk, do not 'shove itself' anywhere. There
> are several, ugly, heuristics to guess which device and partition was
> used to boot from, so that it be mounted as root.

Well, perhaps "shove" is the wrong word, but either the boot code is
lying about where it loads the kernel from and it is filling in
BTINFO_BOOTWEDGE info when it should not (why the heck would it even
look on a different device from where it came from and from where it
found and loaded the kernel!?!?!?), or the code for match_bootwedge() is
somehow too simplistic and over-eager.

In any case the result is any old dk(4) device gets undue precedence in
being selected as the booted_device and this of course entirely foils
the default logic for searching for the root FS, since it may not have
anything whatsoever to do with where the kernel came from, which is also
where the root filesystem is also supposed to be.

The worst part is that none of this seems to be documented, never mind
with a big warning that it violates the principle of least astonishment.

Which means it must be a bug, right?  :-)

-- 
						Greg A. Woods
						Planix, Inc.

<woods%planix.com@localhost>       +1 250 762-7675        http://www.planix.com/

Attachment: pgpjcywpsjar8.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index