custom kernel question?

Hi all,

I'd like to know if by removing support for a specific motherboard/HDD/CPU FreeBSD will still be able to get me to the loader, so that I can "escape to the loader prompt" and change kernels, or the system will be unable to boot.
 
There are no specific drivers for motherboard/HDD/CPU to remove. But yes, if a kernel fails (for whatever reason) you can escape to the loader prompt to load a different kernel.
 
SirDice said:
There are no specific drivers for motherboard/HDD/CPU to remove. But yes, if a kernel fails (for whatever reason) you can escape to the loader prompt to load a different kernel.

No, I mean HDD specific modules (eg SCSI-related). Will then the OS boot at all, if I for example, have a PCI motherboard and remove the PCI module(s)?
 
As long as you don't remove any driver needed to boot your specific system or any other driver that supports these drivers, the system will still boot.
But other things might not work afterwards. For example, even if you don't have SCSI media, parts of the SCSI subsystem are still needed if you want USB to work.
If you keep such drivers as the ATA and syscons you should be fine.

You can easily solve the whole invalid-kernel-can't-boot problem by not using the default location when you install your custom kernel:
# ...
# make KERNCONF=CUSTOM KODIR=/boot/kernel.new installkernel
# nextboot -k kernel.new
# ...
When you reboot the system, it will boot /boot/kernel.new. On your next reboot - and whether the custom kernel worked or not - it will boot your old kernel.
If everything worked fine, you can simply move directories to use your custom kernel instead of the old one.
 
Back
Top