Cannot mount usb hard drive

I'm using Ubuntu 18.04 and I am trying to mount a usb hard drive.

The fdisk output:

Disk /dev/sdb: 465.8 GiB, 500107837440 bytes, 976773120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disklabel type: dos
Disk identifier: 0x003a4817

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1  *     2048 976773119 976771072 465.8G  7 HPFS/NTFS/exFAT

I have installed exfat-fuse and exfat-utils. When I try to mount, I get the following message:

 $ sudo mount /dev/sdb /media/usb-drive
   mount: /media/usb-drive: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error.

If I specify exfat in particular

 $ sudo mount /dev/sdb /media/usb-drive -t exfat
   FUSE exfat 1.2.8
   ERROR: exFAT file system is not found.

Is the filesystem not exFAT?

Moreover, when I try to look at it in gparted:

mount error in gparted

I am not sure what is going on. Any help would be appreciated.


Solution 1:

Firstly, an easier way of mounting is to use:

mount -t auto /dev/sdb /media/usb-drive

This way you are spared the magical incantations of specifying a partition type.

Secondly, you may have errors on the drive and/or the partition table may be damaged. This happened to me when using dd to erase the first MB of a USB on /dev/sdd and I accidentally used /dev/sdb. This wiped out the first 1 MB of my second hard disk containing the MBR (Master Boot Record) and partition table.

TestDisk can be downloaded here and has versions for Windows and Linux. It goes through every byte of your hard drive to analyze what partition type it is and rebuilds the partition tables. I used TestDisk to successfully recover all my data.

From the website, TestDisk can:

  • Fix partition table, recover deleted partition
  • Recover FAT32 boot sector from its backup
  • Rebuild FAT12/FAT16/FAT32 boot sector
  • Fix FAT tables
  • Rebuild NTFS boot sector
  • Recover NTFS boot sector from its backup
  • Fix MFT using MFT mirror
  • Locate ext2/ext3/ext4 Backup SuperBlock
  • Undelete files from FAT, exFAT, NTFS and ext2 filesystem
  • Copy files from deleted FAT, exFAT, NTFS and ext2/ext3/ext4 partitions.