14

I am unable to mount my USB:

$ mount /dev/sdb1 /mnt
mount: mount /dev/sdb1 on /mnt failed: File exists

What is the origin of this error and how do I mount my USB?

The partition /dev/sdb1 is not in /etc/fstab

5

1 Answer 1

5

the error means '/dev/sdb1' has already been mounted. in this case it is because you can't mount a filesystem to /mnt you have to specify a folder

su umount /dev/sdb1
cd /mnt
su mkdir usbstick
su mount  /dev/sdb1 /mnt/usbstick
exit

add it to fstab

/dev/sdb1 /mnt/usbstick fat32 noauto,users,rw,umask=0 0 0

change fat32 to whatever the filesystem on the stick is

6
  • 1
    If the problem was that /dev/sdb1 is already mounted, the error would be EBUSY, not EEXIST. You can always mount to /mnt, even if it has subdirectories; it would hide the subdirectories, but that wouldn't prevent the mounting. Dec 31, 2016 at 20:27
  • 1
    there was no error specified by OP so you are guessing. and no you cannot always mount a fs to /mnt it depends on OS and sysadmin. letting any process mount a fs is a security hole. fstabs can be exploited. Jan 1, 2017 at 0:04
  • @μολὼν.λαβέ I've posted my output as a comment on the question. It shows the error appearing when trying to mount on a freshly created directory.
    – Tom Hale
    Nov 15, 2017 at 11:32
  • @Tom Hale what is your mount point? what permissions are you using? Nov 15, 2017 at 23:55
  • 1
    @μολὼν.λαβέ As shown, the first mount point tried was existing, then a new directory was created as mountpoint, and that mount also failed (both via sudo). umask=0022. It seems a transitory error. I have a btrfs filesystem with errors. Rebooting fixed the mount issue.
    – Tom Hale
    Nov 16, 2017 at 5:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .