Getting missing /lib/modules error

Post Reply
Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Getting missing /lib/modules error

Post by Joe_90 »

I ran an apt update and upgrade just now and I'm getting a DEPMOD ERROR and FATAL message during update-initramfs as follows:

Code: Select all

Unpacking linux-odroid-n2 (2:4.9.236-103) over (2:4.9.236-97) ...
Setting up linux-odroid-n2 (2:4.9.236-103) ...
update-initramfs: Generating /boot/initrd.img-4.9.236-103
Image Name:   uInitrd
Created:      Thu Nov  5 16:46:48 2020
Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
Data Size:    11936035 Bytes = 11656.28 KiB = 11.38 MiB
Load Address: 00000000
Entry Point:  00000000
.
Setting up libnetplan0:arm64 (0.100-0ubuntu4~20.04.3) ...
Setting up libasound2-data (1.2.2-2.1ubuntu2.1) ...
Setting up udev (245.4-4ubuntu3.3) ...
update-initramfs: deferring update (trigger activated)
Setting up libudev-dev:arm64 (245.4-4ubuntu3.3) ...
Setting up zlib1g-dev:arm64 (1:1.2.11.dfsg-2ubuntu1.2) ...
Setting up libasound2:arm64 (1.2.2-2.1ubuntu2.1) ...
Setting up libasound2-dev:arm64 (1.2.2-2.1ubuntu2.1) ...
Setting up libatopology2:arm64 (1.2.2-2.1ubuntu2.1) ...
Setting up alsa-utils (1.2.2-1ubuntu2) ...
alsa-state.service is a disabled or a static unit not running, not starting it.
Setting up systemd (245.4-4ubuntu3.3) ...
Installing new version of config file /etc/systemd/resolved.conf ...
Setting up netplan.io (0.100-0ubuntu4~20.04.3) ...
Setting up systemd-timesyncd (245.4-4ubuntu3.3) ...
Setting up systemd-sysv (245.4-4ubuntu3.3) ...
Setting up libnss-systemd:arm64 (245.4-4ubuntu3.3) ...
Setting up libpam-systemd:arm64 (245.4-4ubuntu3.3) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Processing triggers for initramfs-tools (0.136ubuntu6.3) ...
update-initramfs: Generating /boot/initrd.img-4.9.236-97
W: missing /lib/modules/4.9.236-97
W: Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.9.236-97: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
cat: /var/tmp/mkinitramfs_7jG5RW/lib/modules/4.9.236-97/modules.builtin: No such file or directory
find: ‘/var/tmp/mkinitramfs_7jG5RW/lib/modules/4.9.236-97/kernel’: No such file or directory
depmod: WARNING: could not open modules.order at /var/tmp/mkinitramfs_7jG5RW/lib/modules/4.9.236-97: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/mkinitramfs_7jG5RW/lib/modules/4.9.236-97: No such file or directory
I saw the same error several days ago when I ran the apt update and upgrade on my 20.04 ubuntu N2+ but ignored the message at the time. Is there anything specific I should be looking at in order to resolve?

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Getting missing /lib/modules error

Post by Joe_90 »

I'm answering my own post! I went back through the update logs and I can see similar errors reported. It looks like the update script is trying to run update-initramfs on the previously installed kernel maybe? The error message references 4.9.236-97 but the install contains the 4.9.236-103 kernel. After the update I rebooted and uname-a now shows:

Code: Select all

Linux odroid 4.9.236-103 #1 SMP PREEMPT Wed Nov 4 19:44:48 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
So it seems the kernel update has worked.

User avatar
odroid
Site Admin
Posts: 36468
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1451 times
Been thanked: 990 times
Contact:

Re: Getting missing /lib/modules error

Post by odroid »

Right. You can ignore the warning messages.

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Getting missing /lib/modules error

Post by Joe_90 »

Normally I would ignore "warning" messages, but these are reported as "ERROR" and "FATAL" so that is why I reported them. I did check through the forum before posting and did see reports from last year of the same issue. I presume this is an update script which has got out of step and has left garbage entries in the initramfs-tools directory? I've deleted the entry causing the error and will see what happens on the next update which bumps the kernel version.

User avatar
meveric
Posts: 11382
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 59 times
Been thanked: 443 times
Contact:

Re: Getting missing /lib/modules error

Post by meveric »

check under /var/lib/initramfs-tools/ here you will find files that "point" to the Kernels that are installed.
Since apparently Kernel 4.9.236-97 is no longer installed, if you remove the file you also remove the error message.
Normally the file is removed when you uninstall the particular Kernel version.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Getting missing /lib/modules error

Post by Joe_90 »

See my post - I've deleted the entry causing the error and will see what happens on the next update which bumps the kernel version. :D
I'm assuming the update script which did run the initramfs correctly on the new kernel version had failed to delete the old file.
meveric wrote:
Mon Nov 09, 2020 4:21 pm
check under /var/lib/initramfs-tools/ here you will find files that "point" to the Kernels that are installed.
Since apparently Kernel 4.9.236-97 is no longer installed, if you remove the file you also remove the error message.
Normally the file is removed when you uninstall the particular Kernel version.

User avatar
meveric
Posts: 11382
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 59 times
Been thanked: 443 times
Contact:

Re: Getting missing /lib/modules error

Post by meveric »

ah sorry I missed that part of your message.
But yes that should solve your issue.
These users thanked the author meveric for the post:
Joe_90 (Fri Nov 13, 2020 12:13 am)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 0 guests