freebsd-nq/sys/boot/i386
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
..
boot0 Update the size of the OS string table that wasn't updated in the previous 2003-11-20 20:28:18 +00:00
boot2 Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the old 2003-11-15 10:04:06 +00:00
btx When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0. 2003-11-16 18:24:23 +00:00
cdboot Initiate deorbit burn for the i386-only a.out related support. Moves are 2002-09-17 01:49:00 +00:00
gptboot Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the old 2003-11-15 10:04:06 +00:00
kgzldr Use __FBSDID(). 2003-08-25 23:28:32 +00:00
libi386 Don't repeat selected defines from ns16550.h or sioreg.h. Just 2003-09-16 11:24:23 +00:00
loader With the beastie menu a problem was introduced in which selecting a 2003-11-21 19:01:02 +00:00
mbr Initiate deorbit burn for the i386-only a.out related support. Moves are 2002-09-17 01:49:00 +00:00
pxeldr Add BOOT_PXELDR_ALWAYS_SERIAL option which forces serial console. 2003-09-03 08:12:20 +00:00
Makefile RIP liloldr. 2002-12-31 02:29:03 +00:00
Makefile.inc Build on amd64. Yes, I know this isn't particularly nice. 2003-06-26 03:51:57 +00:00