0

I have a very unusual condition, perhaps a partial update or unknown condition.

#>uname -a
Linux sip02 4.14.30-v7+ #1102 SMP Mon Mar 26 16:45:49 BST 2018 armv7l GNU/Linux

#>uname -r
4.14.30-v7+

#>ls /lib/modules/`uname -r`/
/bin/ls: cannot access '/lib/modules/4.14.30-v7+/': No such file or directory

#>depmod
depmod: ERROR: could not open directory /lib/modules/4.14.30-v7+: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

#>/bin/ls -shal /lib/modules/
total 16K
4.0K drwxr-xr-x  4 root root 4.0K Apr 26 02:31 .
4.0K drwxr-xr-x 16 root root 4.0K Mar 25 18:32 ..
4.0K drwxr-xr-x  3 root root 4.0K Apr 26 02:31 4.14.34+
4.0K drwxr-xr-x  3 root root 4.0K Apr 26 02:31 4.14.34-v7+

uname reports 4.14.30-v7+ but available modules are for 4.14.34-v7+.

How can I synchronize/update 'uname'? Who is telling the truth?

0

The situation you described may be the result of a failed or incomplete upgrade.

However your solution is likely to cause other problems

"In normal circumstances there is NEVER a need to run rpi-update as it always gets you to the leading edge firmware and kernel and because that may be a testing version it could leave your RPi unbootable". https://www.raspberrypi.org/forums/viewtopic.php?p=916911#p916911 Even the rpi-update documentation now warns "Even on Raspbian you should only use this with a good reason. This gets you the latest bleeding edge kernel/firmware."

sudo apt-get update; sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel will put it back to the latest supported kernel/bootcode.

PS The current supported kernel is 4.14.34

PPS The recommended kernel/bootcode upgrade also cleans up the modules, and does not leave a trail of obsolete modules like rpi-update

2

Stefan's problem could be a bit like mine. I installed raspbian stretch on SD card but then did that thing of putting the root file system on usb and changing /boot.cmdline.txt to point to it. What happened with me it seems is that the /boot filesystem it was looking at (/boot in the rootfs on the usb) was different to the real /boot on the SD. I mounted /dev/mmcblk0p1 on /boot , reran those bootloader/kernel reinstalls and then everything matched up (umame -r and /lib/modules). If you haven't done the usb thing then this wont help ......

  • Thanks Kevin, that might be an interesting hint. My root system is not on another USB-device, but my /boot/cmdline.txt is also modified, as I am having a fulldisc-encryption on my system. – Stefan Wegener Mar 14 at 10:19
1

I had the same problem - the kernel was behind the /lib/modules revision:

# openhabian@openHABianPi:~$ uname -r
4.14.79-v7+
# openhabian@openHABianPi:~$ ls /lib/modules
4.14.98+  4.14.98-v7+

The recommended upgrade listed above solved this and updated my kernel to 4.14.98-v7+

  • I am having exactly the same problem (even with the same versions like you) but the "sudo apt-get update; sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel"-solution did not work for me. I also had no error messages and returncode 0 when performing the upgrade... – Stefan Wegener Mar 13 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.