a1669fbe5e
- /sys/i386/i386/swapgeneric.c is just plain broke. But fear not, for I have unbroken it. One thing that swapgeneric.c does is walk through the list of configured devices searching for a boot device. The only easy way to accomplish this in 2.0 is to use Garret Wollman's kern_devconf stuff. *BUT*, the head of the kern_devconf linked list (dc_list) is declared static in /sys/kern/kern_devconf.c. This means that swapgeneric.c can't see it at link time. I had to remove the 'static' keyword to get around this little problem. I hope this doesn't break anything anywhere. *Furthermore,* there's a small matter of making the call to setconf() in swapgeneric.c disappear when 'config kernel swap generic' isn't used. You could change /sbin/config to create a dummy setconf() function in swapkernel.c, but that seems messy somehow. (It's also someting of an 'it isn't broken, why are you fixing it' situation.) My solution was to do what the NetBSD people did and put an #ifdef GENERIC around the call to setconf(). If your kernel is called GENERIC or you define 'options GENERIC,' then you can use 'config kernel swap generic' and it'll work. That aside, the upshot is that: a) swapgeneric.c actually works, and and b) the -a boot flag now works as well. If you boot with -a, as in "Boot: wd(0,a)/kernel -a" you will be presented with a 'root device?' prompt after the autoconfig phase, at which point you can specify what device you want mounted as root. Regrettably, you can't specify an NFS filesystem. Yet. Three files are affected: /sys/i386/i386/swapgeneric.c, /sys/i386/i386/autoconf.c and /sys/kern/kern_devconf.c. Submitted by: wpaul |
||
---|---|---|
.. | ||
amd64 | ||
conf | ||
include | ||
isa | ||
Makefile |