Subject: changes to boot argument passing
To: None <port-i386@NetBSD.ORG>
From: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
List: current-users
Date: 09/20/1997 17:19:04
I just commited some changes to the i386 system startup which
complete the recent work on the boot loaders.
The functional changes are not yet fully enabled by default -
I'll be absent next week (realtime conference at Beaune, France),
so I can't quickly respond to complaints, and I wanted to limit the
risk to cause damage to -current.
However, you can have a look at it or test it if you want - there
are some interesting improvements:
a)The name of the booted kernel can be passed from the bootblocks
to the system. There is a new "sysctl" variable, "booted_kernel" to
get it into userland. (It returns a "no such file or directory" if this
feature is compiled in, but the information was not passed. I don't know
if this is desirable.) "sysctl" must be recompiled.
b)For network boots, information about the ethernet adapter (bus type
and address) can be passed to the kernel. The kernel can determine the
boot interface itself - no need to wire it into the config file.
c)Console settings (device and address/speed for serial ports) can be
passed and used by the kernel for console initialization.
d)There is some code which should be able to detect the boot disk
in situations where the old algorithm failed (eg mixed IDE/SCSI).
This is more experimental. In particular, I don't know what happens
if there are wd/sd drives with removable media on IDE/SCSI.
It would be nice if somebody tested it.
All new argument passing is enabled if the bootloader is compiled without
the "COMPAT_OLDBOOT" option. This is currently an either-or:
the old bootdisk information is not passed in this case.
"a", "b" and "c" above should work without further action. (To get a
serial console it needs at least a "SUPPORT_SERIAL" in the bootloader
Makefile -- I hope I'll get some documentation written when I return
from France. For now, look at sys/i386/stand/lib/pcio.c.)
The code doing "d" is inside "#ifdef notyet" in sys/arch/i386/i386/autoconf.c,
function findroot().
As said, it is only tested in simple setups. Disk corruption is
imp^H^H^Hunlikely,
however.
A warning: It _can_ lead to problems if you boot a new kernel from network,
using older ROMs which are not compiled with COMPAT_OLDBOOT
(or are basing on private patches which I distributed to a couple of people).
These ROMs passed network card information to the kernel in a format
which is incompatible to the current one.
The new kernel code does a range check and will normally not crash
(at least, it did not for me), but one can't know...
best regards
Matthias Drochner