Re: better matching of boot devices on amd64

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tobias Weingartner
Date: Monday, December 6, 2010 - 5:14 pm

On Thursday, December 2, David Gwynne wrote:

Unfortunately, on the PC there is no 100% reliable mapping between the
BIOS disk number (which is used for booting), and the device path used
on the obsd side.  So in essence, we need to "find" the device we booted
from.  This was/is the point to the checksums.  At the point where the
checksum stuff was implemented, I seriously thought about sending the
checksum of the boot device through the bootdev var during boot.  With
a few "special" cases to signify network/etc style boots.  This seemed
somewhat "hackish"...

I've always wondered why the B_* defines in reboot.h were MI, as opposed
to MD.  Booting is inherantly a very MD stype of thing.  Something that
makes 100% sense on the VAX will likley map poorly or not at all to a PC
or a Sun box.  Anyways, that all aside...



Yup, and this works most of the time... unless you happen to have all
the disks zero'd or otherwise bit-identical.  :)



Nope, no suck.  Makes sense.  Hackish solution, but likely the best one
for right now.  A quick egrep through /usr/src seems to indicate that
the only parts of the kernel that really care are MD parts, and nothing
really uses it in userland.  Prime candidate to re-factor someday.


I'm likely late to the party, but it looks ok.  And if it works, I really
can't test this... then it's ok by me.

--Toby.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: better matching of boot devices on amd64, Tobias Weingartner, (Mon Dec 6, 5:14 pm)