Mounting an USB drive both at boot and when plugged in Debian
This happened after a very basic Debian installation. I had a line in the
/etc/fstab file that seemed valid:
UUID=d4c189f6-9c38-4961-9afa-a4e24ad8c379 /mountpoint ntfs-3g defaults,auto,nofail 0 0
However, it wasn’t mounting neither at boot nor when I plugged the USB drive. If I ran
mount -a it worked.
After googleing a bit, this thread give me the first clue:
sudo sh -c "echo usb_storage >> /etc/modules" was necessary because the kernel module
usb_storage wasn’t running for some reason.
This allowed Debian to mount the USD drive in /mountpoint at boot, but If I unplugged it and then plugged it again, then it wasn’t automounting. I found the solution for this at the Unix and Linux StackExchange:
apt-get install usbmount, since this package wasn’t present in the system.
It worked for me.