I'm trying to mount my usb drive on my raspberry pi automatically, so that I don't have to redo it every time the device starts.
I followed the instructions here: https://www.raspberrypi-spy.co.uk/2014/05/how-to-mount-a-usb-flash-disk-on-the-raspberry-pi/
It works when I mount it manually.
However, when I try to follow the instructions for automating this process, it doesn't work. when i do
sudo reboot as shown in the instructions I linked to, it wipes the usb drive, and then I have to mount it all over again in order to access my files.
I made double sure there are no typos in my file
/etc/fstab or anything (I hope?). Here is the line in
UUID=DA0A-FB7B /media/usb exfat auto,nofail,noatime,users,rw,uid=pid,gid=pi 0 0
The only surprising thing during the mounting process was the message:
FUSE exfat 1.3.0 WARN: volume was not unmounted cleanly.
What am I doing wrong?
I realized one thing that I was doing wrong: I did not have the correct file type in
UUID=DA0A-FB7B /media/usb exfat auto,nofail,noatime,users,rw,uid=pid,gid=pi 0 0. But I editted the
/etc/fstab file to fix that. Now, after I reboot when I try to access
/media/usb, it is telling me
ls: cannot access 'usb': Transport endpoint is not connected. Is there another step I'm missing?
** second EDIT ** For some reason, when I remove the usb from the drive, and then insert it again, the automount works. So, every time I reboot the Pi, I need to remove the USB and insert it again. Not sure why but that was the trick (in addition to fixing the filesystem type, as I mentioned above).