Description
Just to share because I faced some kernel related issues when creating a new SD from scratch....would like to know if somebody else was facing similar problems
using the last raspbian image :
Raspberry Pi OS (32-bit) Lite
Minimal image based on Debian Buster
Version: May 2020
Release date: 2020-05-27
Kernel version: 4.19
Size: 432 MB
Rebooting after the scripted install, the Pi does not want to start kmod-static-nodes.service neither systemd-modules-load.service…maybe something unusual happened during the apt-get update/upgrade process…
Jun 17 23:31:50 emonpi systemd[1]: Starting Load Kernel Modules...
Jun 17 23:31:50 emonpi systemd-modules-load[1633]: libkmod: ERROR ../libkmod/libkmod-config.c:656 kmod_config_parse: /lib/modules/4.19.118-v7+
Jun 17 23:31:50 emonpi systemd-modules-load[1633]: libkmod: ERROR ../libkmod/libkmod-index.c:787 index_mm_open: magic check fail: 23202f65 ins
Jun 17 23:31:50 emonpi systemd-modules-load[1633]: could not open moddep file '/lib/modules/4.19.118-v7+/modules.dep.bin'
Jun 17 23:31:50 emonpi systemd-modules-load[1633]: Failed to lookup module alias 'i2c-dev': Function not implemented
Jun 17 23:31:50 emonpi systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Jun 17 23:31:50 emonpi systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Jun 17 23:31:50 emonpi systemd[1]: Failed to start Load Kernel Modules.
the system is in recovery mode but the whole emoncms stack is working fine and emoncms can be reached through the network…
kernel version :
uname -r
4.19.118-v7+
it appears there is some disorders in /lib/modules :
pi@emonpi:/lib/modules/4.19.118-v7+ $ ls
build modules.alias.dpkg-tmp modules.dep modules.devname.dpkg-new modules.softdep.dpkg-tmp
kernel modules.builtin modules.dep.bin modules.devname.dpkg-tmp modules.symbols
modules.alias modules.builtin.bin modules.dep.bin.dpkg-new modules.order modules.symbols.bin
modules.alias.bin modules.builtin.bin.dpkg-new modules.dep.bin.dpkg-tmp modules.order.dpkg-new modules.symbols.bin.dpkg-new
modules.alias.bin.dpkg-new modules.builtin.bin.dpkg-tmp modules.dep.dpkg-new modules.order.dpkg-tmp modules.symbols.bin.dpkg-tmp
modules.alias.bin.dpkg-tmp modules.builtin.dpkg-new modules.dep.dpkg-tmp modules.softdep modules.symbols.dpkg-new
modules.alias.dpkg-new modules.builtin.dpkg-tmp modules.devname modules.softdep.dpkg-new modules.symbols.dpkg-tmp
so tried to reinstall raspberrypi-kernel-headers but still no progress :
sudo apt-get install raspberrypi-kernel-headers
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
raspberrypi-kernel-headers
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.9 MB of archives.
After this operation, 163 MB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf raspberrypi-kernel-headers armhf 1.20200601-1 [24.9 MB]
Fetched 24.9 MB in 15s (1,708 kB/s)
Selecting previously unselected package raspberrypi-kernel-headers.
(Reading database ... 48316 files and directories currently installed.)
Preparing to unpack .../raspberrypi-kernel-headers_1.20200601-1_armhf.deb ...
Unpacking raspberrypi-kernel-headers (1.20200601-1) ...
Setting up raspberrypi-kernel-headers (1.20200601-1) ...
Anyway, it seems there is no headers package available for my kernel release version
sudo apt list linux-headers-*
Listing... Done
linux-headers-4.18.0-3-common-rt/stable 4.18.20-2+rpi1 all
linux-headers-4.18.0-3-common/stable 4.18.20-2+rpi1 all
linux-headers-4.9.0-6-all-armhf/stable 4.9.82-1+deb9u3+rpi2 armhf
linux-headers-4.9.0-6-all/stable 4.9.82-1+deb9u3+rpi2 armhf
linux-headers-4.9.0-6-common-rt/stable 4.9.82-1+deb9u3+rpi2 all
linux-headers-4.9.0-6-common/stable 4.9.82-1+deb9u3+rpi2 all
linux-headers-4.9.0-6-rpi2/stable 4.9.82-1+deb9u3+rpi2 armhf
linux-headers-4.9.0-6-rpi/stable 4.9.82-1+deb9u3+rpi2 armhf
linux-headers-rpi-rpfv/stable 4.9+80+deb9u4+rpi2 armhf
linux-headers-rpi2-rpfv/stable 4.9+80+deb9u4+rpi2 armhf
linux-headers-rpi2/stable 4.9+80+deb9u4+rpi2 armhf
linux-headers-rpi/stable 4.9+80+deb9u4+rpi2 armhf
I am not very familiar with all that
@borpin @TrystanLea one of yu maybe know better ?
I finally could manage to make things work but in a very ugly manner - actually I replaced the whole /lib/modules folder with some content from another pi working fine on the same kernel
Alex