Solved Can't load kernel

After building a custom kernel on FreeBSD 12 (following the handbook as always), the custom kernel won't load. The alteration was the one i always did, enable support for ALTQ on PF. Thank you all for your time.
ps: installation on virtualbox.
 
"It doesn't work" doesn't give us anything useful to go on, obviously there's a problem with your kernel. What's the error message? And what did you put into your kernel configuration.

Also: do you use any directives in /etc/src.conf? And if this is an upgrade: did you check it against src.conf(5)? Because those options also tend to change over time. Note that I'm not talking about running man src.conf because that would only give you information about your running kernel, I'm talking about: cd /usr/src; man -M ./share/man src.conf which would present you with the manualpage for the kernel you're about to build.
 
Clean install. The message is only this one "can't load kernel". If there's a way to be more specific please do tell me. The command you presented gives me information about my current kernel GENERIC. because after building and installing my custom kernel and rebooting, the GENERIC kernel gets booted instead of the new one, if i try to force with nextboot -fk MYNEWKERNEL it simply return to the boot loader screen with the message "can't boot kernel"
 
Why would you even want to 'force' it though, that should already be handled by the boot menu. I assume you do have a boot menu popping up which allows you to select what kernel to boot? The default is already kernel which would be your new one. So if that doesn't boot then you're going to have to drop back to kernel.old.

Which is a warning: don't "just" run make installkernel again because then your /boot/kernel.old would be replaced with the current broken kernel, instead use # make reinstallkernel to preserve GENERIC.

So what's in your kernel configuration? And with 'clean install' I assume you meant that you didn't add anything to /etc/src.conf and /etc/make.conf?

Leading up to: what command did you use to build your kernel?
 
you are correct about the meaning of clean install. my modifications are the lines to activate ALTQ
Code:
options         ALTQ
options         ALTQ_CBQ       
options         ALTQ_RED       
options         ALTQ_HFSC    
options         ALTQ_PRIQ
as for the commando sequence:
Code:
cd /usr/src/sys/amd64/conf
cp GENERIC NEWKERNEL
edit NEWKERNEL to include the above lines
Code:
cd /usr/src
make buildkernel KERNCONF=NEWKERNEL
make installkernel KERNCONF=NEWKERNEL
shutdown -r now
thanks for the tip about reinstalling new kernel on every attempt.
 
What are the contents of your /boot/loader.conf file?

By the way, there is an open PR 233098 that looks related, but it mentions additional LUA error messages. Do you get those messages, too? If so, you should add a comment to that PR so it gets more attention.
 
Thanks SirDice that did the trick.
olli@ it has ocurred to me on my first test when i used root on zfs, so i formatted using UFS, i will add the comment. Thank you all for your time and patience.
 
Back
Top