freebsd-dev/sys/boot/i386/loader
Daniel C. Sobral ff652aa8ea With the beastie menu a problem was introduced in which selecting a
different kernel to boot with kernel="NAME" would load the kernel and
loader.conf-selected modules from /boot/NAME, but it would not change
module_path. So, for instance, the automatically loaded acpi.ko would come
from /boot/kernel/acpi.ko, *always*.

Mind you, this happened for unassisted boot. If you interrupted, typed
"unload" and then "boot NAME", it would Do The Right Thing.

The source of the problem is the double initialization with beastie's
loader.rc. One would happen inside "start", and would load the kernel. The
next one would happen later in the loader.rc script, resetting module_path.

Because module_path is set to the Right Value by the functions in support.4th
that actually load the kernel, when beastie.4th proceeded to boot
module_path would remain wrong, as the kernel was already loaded.

This can be corrected by removing either initialization, and also by changing
the command used by beastie.4th from "boot" to "boot-conf", which makes sure
you use the right kernel and modules.

I chose to remove the second initialization, since this let you interrupt
(or confirm) boot before beastie even comes up. I avoid also doing the
boot-conf change because that would simply cause the kernel and modules to
be loaded twice (in fact, that was my original patch, until, in writing this
very commit message, I saw the error of my ways).

This commit changes the semantics of module loading when using the beastie
menu. Now it does what one would expect it to, but not what it was actually
doing, so something may break for unusual setups depending on broken
behavior. As our japanese friends so nicely put it, shikata ga nakatta. :-)

Approved by:	re (scottl)
2003-11-21 19:01:02 +00:00
..
conf.c Use __FBSDID(). 2003-08-25 23:28:32 +00:00
help.i386 s/hint.acpi.0.disable/hint.acpi.0.disabled/ 2002-08-30 11:11:07 +00:00
loader.rc With the beastie menu a problem was introduced in which selecting a 2003-11-21 19:01:02 +00:00
main.c Use __FBSDID(). 2003-08-25 23:28:32 +00:00
Makefile Build on amd64. Yes, I know this isn't particularly nice. 2003-06-26 03:51:57 +00:00
version - Add 'fwrite' and 'fseek' words for writing to and seeking on files. 2001-12-11 00:49:34 +00:00