# Missing kernel modules in 8.3?



## frijsdijk (Nov 6, 2013)

Today, by coincidence, I spotted a weird issue on a couple of our FreeBSD servers that are running 8.3-RELEASE. All these servers are running the GENERIC kernel (amd64), all of them are updated with `freebsd-update`.

In /boot/kernel, I'm missing opensolaris.ko. Upon investigation, I found that alot more modules are missing.

If I compare the files in /boot/kernel, from a good server (1252 files), with a 'bad' server (~1070 files), I'm missing these kernel modules:


```
agp.ko
agp.ko.symbols
cam.ko
cam.ko.symbols
cardbus.ko
cardbus.ko.symbols
drm.ko
drm.ko.symbols
dtmalloc.ko
dtmalloc.ko.symbols
dtnfsclient.ko
dtnfsclient.ko.symbols
dtrace.ko
dtrace.ko.symbols
dtrace_test.ko
dtrace_test.ko.symbols
dtraceall.ko
dtraceall.ko.symbols
fasttrap.ko
fasttrap.ko.symbols
fbt.ko
fbt.ko.symbols
firewire.ko
firewire.ko.symbols
i915.ko
i915.ko.symbols
if_ae.ko
if_ae.ko.symbols
if_age.ko
if_age.ko.symbols
if_alc.ko
if_alc.ko.symbols
if_ale.ko
if_ale.ko.symbols
if_bce.ko
if_bce.ko.symbols
if_bfe.ko
if_bfe.ko.symbols
if_bge.ko
if_bge.ko.symbols
if_ed.ko
if_ed.ko.symbols
if_et.ko
if_et.ko.symbols
if_fwe.ko
if_fwe.ko.symbols
if_fwip.ko
if_fwip.ko.symbols
if_nve.ko
if_nve.ko.symbols
if_pcn.ko
if_pcn.ko.symbols
if_sf.ko
if_sf.ko.symbols
if_sis.ko
if_sis.ko.symbols
if_sn.ko
if_sn.ko.symbols
if_vge.ko
if_vge.ko.symbols
if_vr.ko
if_vr.ko.symbols
joy.ko
joy.ko.symbols
lockstat.ko
lockstat.ko.symbols
lpt.ko
lpt.ko.symbols
mach64.ko
mach64.ko.symbols
mga.ko
mga.ko.symbols
mmc.ko
mmc.ko.symbols
mmcsd.ko
mmcsd.ko.symbols
ntfs.ko
ntfs.ko.symbols
opensolaris.ko.symbols
pccard.ko
pccard.ko.symbols
plip.ko
plip.ko.symbols
profile.ko
profile.ko.symbols
prototype.ko
prototype.ko.symbols
r128.ko
r128.ko.symbols
radeon.ko
radeon.ko.symbols
reiserfs.ko
reiserfs.ko.symbols
savage.ko
savage.ko.symbols
sbp.ko
sbp.ko.symbols
sbp_targ.ko
sbp_targ.ko.symbols
sdt.ko
sdt.ko.symbols
sis.ko
sis.ko.symbols
snd_ad1816.ko
snd_ad1816.ko.symbols
snd_als4000.ko
snd_als4000.ko.symbols
snd_atiixp.ko
snd_atiixp.ko.symbols
snd_cmi.ko
snd_cmi.ko.symbols
snd_cs4281.ko
snd_cs4281.ko.symbols
snd_csa.ko
snd_csa.ko.symbols
snd_driver.ko
snd_driver.ko.symbols
snd_ds1.ko
snd_ds1.ko.symbols
snd_emu10k1.ko
snd_emu10k1.ko.symbols
snd_emu10kx.ko
snd_emu10kx.ko.symbols
snd_envy24.ko
snd_envy24.ko.symbols
snd_envy24ht.ko
snd_envy24ht.ko.symbols
snd_es137x.ko
snd_es137x.ko.symbols
snd_ess.ko
snd_ess.ko.symbols
snd_fm801.ko
snd_fm801.ko.symbols
snd_hda.ko
snd_hda.ko.symbols
snd_ich.ko
snd_ich.ko.symbols
snd_maestro.ko
snd_maestro.ko.symbols
snd_maestro3.ko
snd_maestro3.ko.symbols
snd_mss.ko
snd_mss.ko.symbols
snd_neomagic.ko
snd_neomagic.ko.symbols
snd_sb16.ko
snd_sb16.ko.symbols
snd_sb8.ko
snd_sb8.ko.symbols
snd_sbc.ko
snd_sbc.ko.symbols
snd_solo.ko
snd_solo.ko.symbols
snd_spicds.ko
snd_spicds.ko.symbols
snd_t4dwave.ko
snd_t4dwave.ko.symbols
snd_uaudio.ko
snd_uaudio.ko.symbols
snd_via8233.ko
snd_via8233.ko.symbols
snd_via82c686.ko
snd_via82c686.ko.symbols
snd_vibes.ko
snd_vibes.ko.symbols
sound.ko
sound.ko.symbols
systrace.ko
systrace.ko.symbols
systrace_freebsd32.ko
systrace_freebsd32.ko.symbols
systrace_linux32.ko
systrace_linux32.ko.symbols
tdfx.ko
tdfx.ko.symbols
unionfs.ko
unionfs.ko.symbols
wlan.ko
wlan.ko.symbols
xfs.ko
xfs.ko.symbols
```

Has anyone else spotted something like this? The weird thing is, zfs.ko is there, but opensolaris.ko is not. Needless to say, zfs will not start on such a machine.

I could easily fix it by copying /boot/kernel from a good to a bad machine, but this got me a bit worried. Something like this should not happen!


----------



## da1 (Nov 6, 2013)

What happens of you manually load the zfs kernel module?


----------



## frijsdijk (Nov 6, 2013)

```
# kldload zfs
kldload: can't load zfs: Exec format error
```

And in /var/log/messages:


```
Nov  6 11:29:38 srv01 kernel: KLD zfs.ko: depends on opensolaris - not available or version mismatch
Nov  6 11:29:38 srv01 kernel: linker_load_file: Unsupported file type
```


```
# zfs list
internal error: failed to initialize ZFS library

# /etc/rc.d/zfs onestart
kldload: can't load zfs: Exec format error
/etc/rc.d/zfs: WARNING: Unable to load kernel module zfs

# kldstat
Id Refs Address            Size     Name
 1   11 0xffffffff80100000 e56ee8   kernel
 2    1 0xffffffff81012000 bd4f     ipfw.ko
 3    1 0xffffffff8101e000 6e5b     ipmi.ko
 4    1 0xffffffff81025000 88f      smbus.ko

# dmesg | tail
KLD zfs.ko: depends on opensolaris - not available or version mismatch
linker_load_file: Unsupported file type
```


----------



## da1 (Nov 6, 2013)

Weird. I think maybe you should also post to the mailing lists.

So if I understood this correctly, those servers were pre-8.3 and were updated using `freebsd-update`. Can it be that the modules were missing before the update?


----------



## frijsdijk (Nov 6, 2013)

da1 said:
			
		

> Weird. I think maybe you should also post to the mailing lists.
> 
> So if I understood this correctly, those servers were pre-8.3 and were updated using `freebsd-update`. Can it be that the modules were missing before the update?



Possibly.. yes. Not sure about that.

On one machiene I rsync'd the /boot/kernel from a good machine. And then I can start ZFS.


```
# kldstat
Id Refs Address            Size     Name
 1   11 0xffffffff80100000 e56e68   kernel
 2    1 0xffffffff81012000 bd6f     ipfw.ko
 3    1 0xffffffff8101e000 6e1b     ipmi.ko
 4    1 0xffffffff81025000 88f      smbus.ko
# kldload zfs
# kldstat
Id Refs Address            Size     Name
 1   19 0xffffffff80100000 e56e68   kernel
 2    1 0xffffffff81012000 bd6f     ipfw.ko
 3    1 0xffffffff8101e000 6e1b     ipmi.ko
 4    1 0xffffffff81025000 88f      smbus.ko
 5    1 0xffffffff81026000 133af8   zfs.ko
 6    1 0xffffffff8115a000 1fcf     opensolaris.ko
```


----------



## wblock@ (Nov 6, 2013)

Old modules that are no longer rebuilt because of entries in /etc/src.conf?


----------



## frijsdijk (Nov 8, 2013)

wblock@ said:
			
		

> Old modules that are no longer rebuilt because of entries in /etc/src.conf?



Non-existent on this server. But the server is maintained with freebsd-update (running GENERIC kernel). So how could that be the reason?


----------

