gkovacsp
Posts: 10
Joined: Fri Jun 08, 2012 6:50 pm

could not open moddep file '/lib/modules/4.19.75-v7l+/modules.dep.bin'

Sat Jan 25, 2020 1:42 pm

My Pi has rebooted after many-many weeks due to a power outage. Strange things started to happen.

The first symptom of the problems was that it could not mount cifs mounts from fstab.

Code: Select all

$ sudo mount /mnt/nas
mount error: cifs filesystem not supported by the system
mount error(19): No such device
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
It seems the root of the problem is that the "/lib/modules/4.19.75-v7l+" folder is missing, so there is no way to find the files in it.

Code: Select all

$ modprobe cifs
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.75-v7l+/modules.dep.bin'
modprobe: FATAL: Module cifs not found in directory /lib/modules/4.19.75-v7l+
Content of the /lib/modules folder, 4.19.75-v7l+ is not there

Code: Select all

$ ls /lib/modules/
total 24K
drwxr-xr-x  6 root root 4.0K Jan 21 06:21 ./
drwxr-xr-x 16 root root 4.0K Jan  2 12:14 ../
drwxr-xr-x  3 root root 4.0K Jan 25 12:49 4.19.93+/
drwxr-xr-x  3 root root 4.0K Jan 25 12:49 4.19.93-v7+/
drwxr-xr-x  3 root root 4.0K Jan 25 12:49 4.19.93-v7l+/
drwxr-xr-x  3 root root 4.0K Jan 25 12:49 4.19.93-v8+/
This is my version

Code: Select all

$ uname -a
Linux rpi4-ssd 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux
My Pi4 boots from an USB disk, using modification in the SD card's cmdline.txt

Code: Select all

cat /boot/cmdline.txt
console=serial0,115200 console=tty1 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait root=/dev/sda2 rootfstype=ext4 rootwait
Any help from anyone?
I would hate to reinstall everything from scratch...

User avatar
DougieLawson
Posts: 42217
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: could not open moddep file '/lib/modules/4.19.75-v7l+/modules.dep.bin'

Sat Jan 25, 2020 6:29 pm

Your /boot folder used to boot the system doesn't match the /boot folder that was mounted when sudo apt upgrade installed the new kernel.

sudo umount /boot
sudo mount /dev/mmcblk0p1 /boot
sudo apt install --reinstall raspberrypi-bootloader
sudo reboot
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

gkovacsp
Posts: 10
Joined: Fri Jun 08, 2012 6:50 pm

Re: could not open moddep file '/lib/modules/4.19.75-v7l+/modules.dep.bin'

Sat Jan 25, 2020 6:51 pm

Thanks a lot! That Worked!

gkovacsp
Posts: 10
Joined: Fri Jun 08, 2012 6:50 pm

Re: could not open moddep file '/lib/modules/4.19.75-v7l+/modules.dep.bin'

Sat Feb 08, 2020 3:47 pm

In case others run into the same issue, this is the apt command to fix all, I've added the kernel as well

Code: Select all

sudo umount /boot
sudo mount /dev/mmcblk0p1 /boot
sudo apt install --reinstall raspberrypi-bootloader raspberrypi-kernel
sudo reboot

DarkoSan
Posts: 7
Joined: Fri Mar 03, 2017 1:25 pm

Re: could not open moddep file '/lib/modules/4.19.75-v7l+/modules.dep.bin'

Mon Feb 17, 2020 1:20 pm

Thank you!
It works great!
What things we have to do until we have official USB / SSD Boot support.
gkovacsp wrote:
Sat Feb 08, 2020 3:47 pm
In case others run into the same issue, this is the apt command to fix all, I've added the kernel as well

Code: Select all

sudo umount /boot
sudo mount /dev/mmcblk0p1 /boot
sudo apt install --reinstall raspberrypi-bootloader raspberrypi-kernel
sudo reboot

RobCranfill
Posts: 7
Joined: Sat Aug 18, 2018 4:47 pm
Location: Seattle, WA, USA

Re: could not open moddep file '/lib/modules/4.19.75-v7l+/modules.dep.bin'

Wed Dec 16, 2020 8:15 pm

Thanks for the above solution! It does work, but on my Pi it's kinda slow, and I was wondering if there's a reason we can't just copy the files from the SSD card (which is what got the updated boot files) to the SD card (which is what really boots)?

Return to “Troubleshooting”