Solved How to make a minimal Kernel ?

Which command can help mo to know exactly the list of peripherals inside a PC ?

I need those informations to reduce the kernel.
 
# pciconf -vl is useful as well.

Between # kldstat -v (to show the drivers currently compiled into the kernel and the kernel modules loaded), # pciconf -vl (to show the PCI devices/buses detected and drivers attached), # usbdevs to list the USB devices/buses) you should be able to figure out what drivers need to be in the kernel.

When experimenting with new kernels, nextboot() and KODIR come in handy. When installing the new kernel, add KODIR=/boot/kernel.something. That will install the kernel into the /boot/kernel.something directory, and not overwrite the known-to-work /boot/kernel. Then, use nextboot -k kernel.something to tell the loader which kernel to use on the next boot. If that boot fails, rebooting will load /boot/kernel again.

Using KODIR and nextboot makes testing kernels so much simpler and fool-proof, as you can always just reboot to get back to a working system.
 
Back
Top