7

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.

basil
  • 171
  • You are trying to mount /dev/sdb, that is wrong. You need ot mount /dev/sdb1. – Pilot6 Mar 12 '19 at 21:59
  • And I don't think it's exfat. Most likely it's ntfs. – Pilot6 Mar 12 '19 at 22:00
  • I get the same message either way. Says "ntfs signature is missing" – basil Mar 12 '19 at 22:37
  • Boot into Windows, or connect the drive to a Windows machine, and try and run chkdsk on the drive. Do NOT run ntfsfix in Ubuntu on it. – heynnema Mar 12 '19 at 23:47
  • @heynnema is there another approach to this? Unfortunately, I have no Windows machines – basil Mar 13 '19 at 19:26
  • 1
    Not if it's ntfs. Since you supplied such little information... it's difficult to make other recommendations. What was on the drive? Where was it used? Did it mount in Ubuntu before? Do you have backups of what used to be on the drive? – heynnema Mar 13 '19 at 19:47
  • It was formatted on a previous installation. Contains a tarball of important files I wanted to bring over. – basil Mar 13 '19 at 20:26
  • What if you run this: sudo ntfsfix /dev/sdb1? – Philippe Delteil Apr 09 '19 at 16:59

2 Answers2

4

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.
0

You need to enable USB 3 and/or USB charging in BIOS.

I noticed that there was no sound from the HDD, which does sound with Windows, so I figured out that it was a power problem, not a software one.