Solved Update 12.1-p1 to p5

Hi,

I'm trying to update my install from 12.1-RELEASE-p1 to the last current patch which seems to be p5 .

I used the process "freebsd-update fetch" and then "install" and rebooting afterwards.

However on reboot, some kernel modules wont load :
Code:
KLD linuxkpi.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/kernel/linuxkpi.ko - unsupported file type
KLD drm.ko: depends on linuxkpi - not available or version mismatch
linker_load_file: /boot/modules/drm.ko - unsupported file type
KLD i915kms.ko: depends on drmn - not available or version mismatch
linker_load_file: /boot/modules/i915kms.ko - unsupported file type
KLD coretemp.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/kernel/coretemp.ko - unsupported file type
KLD nmdm.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/kernel/nmdm.ko - unsupported file type
KLD vmm.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/kernel/vmm.ko - unsupported file type

My understanding from the update manual is that I should have a GENERIC kernel that would be updated by the freebsd-update process. However I don't have that one. Should I create one copying one of my current working kernel ? Is there another way to do that correctly ?

Side note, I'm running that on an X1 Carbon Gen6, no ports, only packages.

Hope I'm not missing something obvious here, would love hints or pointer to the " correct way " to do.

Cheers !
 
First of all, the modules in /boot/modules aren't part of the kernel (or base). In your case, you should be able to solve this by upgrading packages, the meta-package drm-kmod should depend on the correct version.

But then, there shouldn't be a change between -p1 and -p5, and the fact that you get error messages for modules in /boot/kernel as well is very strange, therefore, could you elaborate on this?

My understanding from the update manual is that I should have a GENERIC kernel that would be updated by the freebsd-update process. However I don't have that one.

Does that mean you compiled and installed a custom kernel? What does uname -a show now after the update?
 
However on reboot, some kernel modules wont load
This is due to miss match between new kernel and old modules. As the modules are not part of the update you need to update those every time. Probably you have generic kernel. If not , that need to be recompiled.
 
First of all, the modules in /boot/modules aren't part of the kernel (or base). In your case, you should be able to solve this by upgrading packages, the meta-package drm-kmod should depend on the correct version.

But then, there shouldn't be a change between -p1 and -p5, and the fact that you get error messages for modules in /boot/kernel as well is very strange, therefore, could you elaborate on this?
I cannot say much more about that, from what I know I don't have anything strange in my rc.conf and loader.conf . I suspect those errors are drivers trying to be loaded from my rc.conf as they occur last in my dmesg :

Code:
KLD iwm8265fw.ko: depends on kernel - not available or version mismatch         
linker_load_file: /boot/kernel/iwm8265fw.ko - unsupported file type             
iwm8265fw: could not load firmware image, error 8                               
iwm0: could not read firmware iwm8265fw (error 0)                               
device_attach: iwm0 attach returned 6                                           
KLD uhid.ko: depends on kernel - not available or version mismatch             
linker_load_file: /boot/kernel/uhid.ko - unsupported file type                 
KLD ums.ko: depends on kernel - not available or version mismatch               
linker_load_file: /boot/kernel/ums.ko - unsupported file type                   
KLD uhid.ko: depends on kernel - not available or version mismatch             
linker_load_file: /boot/kernel/uhid.ko - unsupported file type                 
KLD netgraph.ko: depends on kernel - not available or version mismatch         
linker_load_file: /boot/kernel/netgraph.ko - unsupported file type             
KLD ng_ubt.ko: depends on netgraph - not available or version mismatch         
linker_load_file: /boot/kernel/ng_ubt.ko - unsupported file type               
KLD netgraph.ko: depends on kernel - not available or version mismatch         
linker_load_file: /boot/kernel/netgraph.ko - unsupported file type             
KLD ng_ubt.ko: depends on netgraph - not available or version mismatch         
linker_load_file: /boot/kernel/ng_ubt.ko - unsupported file type               
KLD netgraph.ko: depends on kernel - not available or version mismatch         
linker_load_file: /boot/kernel/netgraph.ko - unsupported file type             
KLD vboxnetflt.ko: depends on netgraph - not available or version mismatch     
linker_load_file: /boot/modules/vboxnetflt.ko - unsupported file type

Note that I might have inconsistency, as I'm unsure whenever I should load my modules in loader.conf or rc.conf. Might that have an impact ?

Does that mean you compiled and installed a custom kernel? What does uname -a show now after the update?
I didn't build any custom kernel. I just don't have a /boot/GENERIC directory, that's where I'm wondering if I'm missing something.

Code:
FreeBSD X1-WVG-FB 12.1-RELEASE-p5 FreeBSD 12.1-RELEASE-p5 GENERIC  amd64

This is due to miss match between new kernel and old modules. As the modules are not part of the update you need to update those every time. Probably you have generic kernel. If not , that need to be recompiled.

So re-installing the related package should be enough for that ?
 
I think I got the cause of my issue. For some reason (most likely human : my fat fingers), some of the modules in my /boot/kernel directory were not from the correct version. Digging a bit in the other directories, I found some that were behaving correctly. Which leads me to another question : Is there a " correct " way to get a " clean " generic kernel, as I might have made some mistakes in the past. Shall I get it from the base install ?
 
I see two possibilities:

If you have installed sources as well, go to /usr/src to compile and install the kernel locally with make kernel.

Otherwise, but I never went down that road, so not sure it works – you could grab and extract kernel.txz from the installer, which contains a kernel without all patches, so you would have to try freebsd-update after that again.
 
Back
Top