Mount can't find device in /etc/fstab

330,002

Solution 1

Why this error?

You probably forgot to tell mount where to mount your drive.

Linux uses device files (/dev/sda, /dev/sdb1, etc.). And unlike Windows drives (C:, D:, etc.), you cannot access them directly (cd /dev/sdb1 will inevitably fail, telling you that it is not a directory but a file). If you want to open a drive with mount, you need to provide a mountpoint. A mountpoint is a directory wherein your USB drive will be opened and where you will be able to access your files.


Solution

  1. Create a directory that you will use as the mountpoint for your drive:

    mkdir /mnt/mydrive
    
  2. Mount your drive with this command:

    mount /dev/sdb1 /mnt/mydrive
    

    Note: If you don't know your drive's device file, you can run sudo fdisk -l or lsblk to identify the partition you're looking for.

  3. Now if you run ls /mnt/mydrive, it should list your drive's files.

  4. When you're done, don't forget to unmount your USB drive before removing it from the computer:

    umount /dev/sdb1
    

More information about this error

/etc/fstab is a file in which you can associate a partition with a mountpoint, allowing you to run mount <device> instead of mount <device> <mountpoint>. This is why you get this confusing error.

fstab has many more uses like mounting a partition at boot time, etc. More information about fstab on the Arch Linux wiki

Solution 2

sudo mkdir /mnt/spider sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda2 /mnt/spider

Remember to replace the drives name from /dev/sda2 to yours. You can find the name of your drives by using the command sudo fdisk -l .

Solution 3

To know your device name use sudo fdisk. Your device can be recognized by its size, and probably looks like /dev/sdx, where x could be any letter from a to z. (Usually a is assigned to your first internal hard-drive)

To mount a usb drive sudo mount <Your Device Name> <Mount Position>, for example:

sudo mount /dev/sdb /mnt

To access what you have just mounted use the position where you have mounted. In the above example I have used /mnt, so I would type:

cd /mnt
Share:
330,002

Related videos on Youtube

Double S
Author by

Double S

Updated on September 18, 2022

Comments

  • Double S
    Double S over 1 year

    It is my second day on Linux. I am having difficulties mounting an USB drive. It shows this error:

    mount: can't find /dev/sdb1/mnt in /etc/fstab or /etc/mtab
    

    How can I get rid of this error?

    • Mostafa Ahangarha
      Mostafa Ahangarha about 8 years
      How do you mount?
    • Double S
      Double S about 8 years
      sudo mount /dev/sdb1/mnt
    • Mostafa Ahangarha
      Mostafa Ahangarha about 8 years
      This is wrong. You should mount your device on a mountpoint. for example: mount /dev/sdb1 /media/usb. Just remember that the /media/usb/ should be made before mounting
    • Mostafa Ahangarha
      Mostafa Ahangarha about 8 years
      for USB, it is better it be mounted inside /media/ folder. moreover, /mnt/ is not made by you. it is built-in folder in ubuntu
    • Double S
      Double S about 8 years
      I created a directory named "media" and a subdirectory "usb"under media.Then i tried mount /dev/sdb1 /media/usb.. But it still have the problem : can't find /dev/sdb1/media/usb in /etc/fstab or /etc/mtab
    • Mostafa Ahangarha
      Mostafa Ahangarha about 8 years
      You have made this media in your home directory while we are talking about root directory (/). Run this first sudo mkdir /media/usb then mount your USB by sudo mount /dev/sda1 /media/usb