7

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

  • Can you give the output of lsblk please. – Sidahmed Dec 31 '16 at 11:22
  • I got the same error. Here is my output. – Tom Hale Nov 15 '17 at 11:31
2

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

| improve this answer | |
  • 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. – Gilles 'SO- stop being evil' Dec 31 '16 at 20:27
  • 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 '17 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 '17 at 11:32
  • @Tom Hale what is your mount point? what permissions are you using? – μολὼν.λαβέ Nov 15 '17 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 '17 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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