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 /etc/fstab:

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?

EDIT 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).

  • I agree this question is a duplicate - what do I do about this?
    – Candic3
    Commented Oct 9, 2019 at 18:07

2 Answers 2


Try the usbmount package. sudo apt-get install usbmount

Read about it at: https://www.raspberrypi.org/forums/viewtopic.php?t=205016

Worked for me.

Regards, Jon G


If it works when you mount it manually you are probably missing the auto flag in the fstab configuration.

You should also use UUID instead of the device name (eg. /dev/sdb1). This way you won't have problems when using more than one USB drive.

(comment - Can't check any of this because you didn't include the line you've entered in fstab)

  • Thanks for your answer - I actually did include the auto flag, AFAICT, although perhaps you want to check what I posted in my question.
    – Candic3
    Commented Oct 9, 2019 at 17:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.