mount: you must specify the filesystem type

You need to add the -t FILESYSTEMTYPE argument to the command, replacing FILESYSTEMTYPE with your filesystem type. This specifies the filesystem type of the filesystem to be mounted. In your case, this would be /dev/sdb2. Some common, valid filesystem types are:

  • auto - this is a special one. It will try to guess the fs type when you use this.
  • ext4 - this is probably the most common Linux fs type of the last few years
  • ext3 - this is the most common Linux fs type from a couple years back
  • ntfs - this is the most common Windows fs type or larger external hard drives
  • vfat - this is the most common fs type used for smaller external hard drives
  • exfat - is also a file system option commonly found on USB flash drives and other external drives

I was getting a similar error:

# mount /dev/sdb1 /mydisk/ -t auto
mount: you must specify the filesystem type

I tried finding out the issue and the issue was, I had partitioned it but no filesystem was assigned.

# mkfs.ext3 /dev/sdb1 2>/dev/null
...
Superblock backups stored on blocks: 
...
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override

After this it successfully got mounted.


There is more to the story here. Usually if you mount a partition with a common filesystem type using mount, it will auto-detect the partition type.

The fact that it isn't auto-detecting it in this case could signal a few possibilities.

  • You haven't installed filesystem tools for the chosen filesystem. If you did a standard desktop install of Ubuntu, this shouldn't normally be a problem.

    For example, to mount ntfs drives in recent versions of Ubuntu you need the ntfs-3g package.

  • You selected the wrong partition.

  • The partition is corrupt or unformatted. In this case, you should probably do a filesystem check (fsck) on it before mounting it. You may then want to proceed to mount it manually, specifying the filesystem type, as read-only. If all else fails you may need special recovery software such as testdisk photorec.

Tags:

Mount