Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Raspbian Jessie: Cannot mount NTFS external harddrive anymore after 'apt-get upgrade' (fuse device is missing)

After I used apt-get upgrade earlier today, my Raspberry Pi (Raspbian Jessie) stopped being able to automount my external harddrives anymore. Automounting worked perfectly fine before apt-get upgrade, but now I can't even manually mount my external HDDs anymore.

This is the error message I received:

pi@raspberrypi:~ $ sudo mount /dev/sda1 /mnt
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'
ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root

'modprobe fuse' gives me the same error message:

modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'

I reinstalled the kernel and bootloader using this command:

sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel

But this did not help.

From reading other forum posts, it may look like my kernel and fuse might not be compatible - but how would that have happened? I feel I'm a bit out of my depth here.

Some forum posts suggested a restart will help, but this didn't solve the issue for me.

Alternatively, I also found a post from drownboat on Reddit from two years ago that looks promising - but to be honest, I have no idea if this is just another red herring or if this is indeed the problem I'm facing. In any case, I'm not sure what exactly/how drownboat did it:

I suspect that what is happening is that updates to the kernel and grub config are being written to the /boot folder, but not onto the boot device. This has caused the modules and the kernel to go out of sync. [...]

I fixed it by adding /boot back to /etc/fstab, rebooting to another kernel where the modules were still working, thus mounting /boot, and finally reinstalling apt-get install --reinstall linux-image-3.16.0-4-amd64.

I would greatly appreciate any help!

Some more info:

uname -a

Linux raspberrypi 4.4.26-v7+ #915 SMP Thu Oct 20 17:08:44 BST 2016 armv7l GNU/Linux

dpkg -s fuse

Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 103
Maintainer: Laszlo Boszormenyi (GCS)
Architecture: armhf
Version: 2.9.3-15+deb8u2
Depends: libc6 (>= 2.4), libfuse2 (= 2.9.3-15+deb8u2), adduser, mount (>= 2.19.1), sed (>= 4), udev | makedev
Conffiles:
/etc/fuse.conf 298587592c8444196833f317def414f2
Description: Filesystem in Userspace
Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations.
Homepage: http://fuse.sourceforge.net/

like image 855
jama Avatar asked Oct 29 '17 16:10

jama


3 Answers

I FOUND THE SOLUTION (see further below for details)! It turned out that the boot partition was not mounted and the operating system reverted to the old kernel before the apt-get upgrade. So I just had to make sure that /boot was automounted at startup so the correct kernel was used.

Further steps in my error analysis ():

OK so I managed to fix the issue myself. It really just turned out that the /boot partition was not mounted and thus my Raspberry Pi reverted to the old kernel instead of the fancy new one that came with apt-get upgrade.

I found the problem by using uname -r, which gave me '4.9.35-v7+' as an answer. This was strange because the original error message had a different version number:

modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.26-v7+/modules.dep.bin'

(My emphasis)

When I navigated to /lib/modules using cd /lib/modules I also saw this:

pi@raspberrypi:/lib/modules $ ls
4.9.35+ 4.9.35-v7+

So the error message about a fuse device missing really seemed to have something to do with a mismatch of kernel and fuse versions. The discrepancy between version numbers led me to believe that the wrong kernel was being used (like drownboat also stated in their Reddit post two years ago).

This is how I fixed the problem (SOLUTION):

sudo nano /etc/fstab/

Then I added the following lines to fstab:

# automount /boot partition at startup
/dev/mmcblk0p6 /boot vfat defaults 0 2

After rebooting, I used sudo raspi-config to check if the boot partition was mounted properly (raspi-config will only let you enter its menu if the partition is mounted, otherwise it will tell you that you need to mount the boot partition first).

Then I ran sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel again to doubly ensure that the latest kernel was installed on the boot partition too - but I don't know if this was a crucial step.

Finally, after another restart, I was able to mount/automount my external harddrives again.

Hope this helps anyone else out there having the same issue as me! :)

like image 139
jama Avatar answered Oct 11 '22 09:10

jama


In my situation, the solution is pretty simple. I run apt update and apt upgrade -y and then apt install ntfs-3g, after these, I try to mount the disk and met this error. The solution is just reboot After reboot, try to mount again, and thing worked well.

like image 44
Kenneth Avatar answered Oct 11 '22 10:10

Kenneth


I had the same issue trying to get Open Media Vault working. There were missing or unmatched kernel files, outdated libraries etc. I ran the updates in the link below and got it working.

Update system's package list

sudo apt-get update

upgrade all installed packages to their latest versions:

sudo apt-get dist-upgrade

https://www.raspberrypi.org/documentation/raspbian/updating.md

like image 21
mediaguru Avatar answered Oct 11 '22 10:10

mediaguru