I want to mount a partition to an auxiliary folder via mount to fix a damaged grub.
I used the command.
sudo mount /dev/sdb2 /home/ubuntu/temp
and got as error:
mount: you must specify the filesystem type
Why?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI want to mount a partition to an auxiliary folder via mount to fix a damaged grub.
I used the command.
sudo mount /dev/sdb2 /home/ubuntu/temp
and got as error:
mount: you must specify the filesystem type
Why?
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:
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.
lsblk -f
. In my case there was no information in front of my disk.
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.
Please use parted -l
to check the partition type and make sure you are mounting an actual data partition with known partition types (for example, ntfs, fat, etc).
Here is what you would see from an 8TB drive, the first partition is not the actual data partition and instead, you should mount the second partition, which is the actual data partition.
Model: TRUSTED Mass Storage (scsi)
Disk /dev/sdb: 8796GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 134MB 134MB Microsoft reserved partition msftr ` es
2 134MB 8796GB 8796GB ntfs Basic data partition
If you have a > 32 GB drive usable on Windows and/or Mac that is not NTFS
, and that is what you try to mount, chances are that you are trying to mount an exfat
drive.
For that to work, you need to install exfat-utils
(and exfat_fuse
that will automatically be installed as a dependency).
You can check the filesystem type by file
command:
file -sL /dev/sd*
The usage of -s
is explained in file - Linux/Unix command and here is an excerpt:
"This is useful for determining the filesystem types of the data in raw disk partitions, which are block special files."
Besides, I mounted successfully without specifying -t type
.