Solved How to make a minimal Kernel ?

sonysun

Member

Reaction score: 1
Messages: 36

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

I need those informations to reduce the kernel.
 

danger@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 369
Messages: 996

# less /var/run/dmesg.boot
 

phoenix

Administrator
Staff member
Administrator
Moderator

Reaction score: 1,281
Messages: 4,099

# 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.
 
Top