Quick build of stripped-down kernel

Thomas Mueller mueller6727 at bellsouth.net
Sat Nov 26 12:24:24 UTC 2011


from "b. f." <bf1783 at googlemail.com>:

> If the kernel versions were compatible, and the set of modules were
> the same, I suppose you could set MODULES_WITH_WORLD and
> KODIR=/boot/modules during buildworld and installworld, to build the
> modules as part of buildworld and install them in /boot/modules during
> installworld, rather than in /boot/kernel or /boot/kernel2.  Then you
> could build and install both of your kernels with NO_MODULES, as
> previously discussed, and with your  different choices of KODIR for
> each kernel.  Because /boot/modules is part of the default module_path
> defined in /boot/defaults/loader.conf, the modules ought to load as
> usual for either kernel.  If you wanted to place them in a different
> directory, you could alter KODIR during buildworld and installworld,
> and add the directory to module_path in /boot/loader.conf.  I haven't
> tested this, but I think that it will work, and I'd be interested to
> hear whether it does. There are of course alternative methods.

> b.

That should be helpful; I could do that when FreeBSD 9.0-RC3 comes out.

I would only use the single set of modules when kernels are built from the same source tree; otherwise there could be incompatibility.

I might also want to build FreeBSD 9.0-RELEASE, when that comes out, for i386, on a 16 GB USB stick, and run on new computer and older 32-bit computer.

Older computer USB is not directly bootable, but USB can be booted using PLOP boot manager (http://www.plop.at/).


Tom



More information about the freebsd-questions mailing list