14

I have a WD MyPassport that is NTFS formatted with only 1 partition, and works perfectly fine on Windows. It was working well with Ubuntu until a few days ago (points 3 and 4 explains what changes I might have made).

I'm using an Ubuntu 15.04 64bit with 3.19.0-32-generic.

The HDD is getting detected, but I am unable to mount it.

  1. Here is how it shows up on the Disks application

    screenshot of Disks

  2. lsusb shows the hard disk info. Connecting to a different USB port does not help

    Bus 002 Device 002: ID 1058:0741 Western Digital Technologies, Inc.
    
  3. My internal HDD has one ext4 and two NTFS partitions, and they show up fine on fstab, but my external HDD does not

    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda3 during installation
    UUID=964a0a16-e279-4551-a71f-0b8594a42170 /               ext4    errors=remount-ro 0       1
    /dev/disk/by-uuid/280E83930E835928 /mnt/280E83930E835928 auto nosuid,nodev,nofail,x-gvfs-show,noauto 0 0
    /dev/disk/by-uuid/8A9CAF0D9CAEF33D /media/usr/part1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
    /swap   swap    swap    defaults        0       0
    
  4. The /swap partition is actually created by me using fallocate and mkswap for hibernation using swap file as described in the Debian Wiki Hibernation Manual. Perhaps my HDD issues have something to do with this - I am not able to figure that out

  5. Output of some commands upon request

    • $sudo fdisk -l

      Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 4096 bytes
      I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      Disklabel type: dos
      Disk identifier: 0x397a8933
      
      Device     Boot     Start        End    Sectors   Size Id Type
      /dev/sda1  *         2048     718847     716800   350M  7 HPFS/NTFS/exFAT
      /dev/sda2          718848  471861247  471142400 224.7G  7 HPFS/NTFS/exFAT
      /dev/sda3       471861248  786434047  314572800   150G  6 FAT16
      /dev/sda4       786434048 1953521663 1167087616 556.5G  7 HPFS/NTFS/exFAT
      
      Disk /dev/sdb: 1.8 TiB, 2000365289472 bytes, 3906963456 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: dos
      Disk identifier: 0x0005f107
      
      Device     Boot Start        End    Sectors  Size Id Type
      /dev/sdb1        2048 3906963455 3906961408  1.8T  7 HPFS/NTFS/exFAT
      
    • blkid gave no output for the external disk /dev/sdb1

      $ sudo blkid /dev/sdb1
      $
      
  6. BIG EDIT - ABLE TO MOUNT HDD VIA COMMAND LINE. How to automount?

    • Created a directory /media/usr/external/ and ran sudo mount -t ntfs-3g /dev/sdb1 /media/usr/external. HDD mounted perfectly.
    • Disks application now recognizes the mounted HDD Disks application now recognizes the mounted HDD
    • I tried to change the Mount options to make it similar to my internal HDD (turning Automatic Mount Options ON did not help). The Mount at Startup option made no difference when checked. mount options This is what my fstab looks like now (removed swap entry)

      # /etc/fstab: static file system information.
      #
      # Use 'blkid' to print the universally unique identifier for a
      # device; this may be used with UUID= as a more robust way to name devices
      # that works even if disks are added and removed. See fstab(5).
      #
      # <file system> <mount point>   <type>  <options>       <dump>  <pass>
      # / was on /dev/sda3 during installation
      UUID=964a0a16-e279-4551-a71f-0b8594a42170 /               ext4    errors=remount-ro 0       1
      /dev/disk/by-uuid/280E83930E835928 /mnt/280E83930E835928 auto nosuid,nodev,nofail,x-gvfs-show,noauto 0 0
      /dev/disk/by-uuid/8A9CAF0D9CAEF33D /media/usr/part1 auto nosuid,nodev,nofail,x-gvfs-show 0 0
      
    • After disconnecting and reconnecting the HDD - it does not automount. Trying to mount from Nautilus gives me the following error. Only root can mount

How do I go about automounting my HDD, now that the mounting problems have been solved? Earlier I never had to sudo for mounting - it just connected.

3l4ng
  • 886
  • can you [edit] your post and post the output of this commandsudo fdisk -l – Neil Nov 09 '15 at 23:23
  • Your unknown Partitioning must be something Windows specific, maybe something like "dynamic partitions". What does Windows say about it? – ubfan1 Nov 10 '15 at 00:41
  • What's the output of sudo blkid /dev/sd1? – David Foerster Nov 10 '15 at 12:10
  • @Neil - posted the output of sudo fdisk -l – 3l4ng Nov 11 '15 at 10:56
  • @DavidFoerster - I assumed you meant /dev/sdb1 which is the external HDD, However, neither sudo blkid /dev/sd1 nor sudo blkid /dev/sdb1 gave any output.

    I did get UUIDs and PARTUUIDs for my internal HDD /dev/sda. Do you want me to post them?

    – 3l4ng Nov 11 '15 at 10:58
  • @ubfan1 - the HDD was working fine with Ubuntu up until a few days ago. – 3l4ng Nov 11 '15 at 10:59
  • @3l4ng: I meant the first partition of your internal drive. It just turned out to appear at path /dev/sdb1 in the Gnome Disks screenshot at the top of your question. – David Foerster Nov 11 '15 at 14:06
  • @DavidFoerster - thank you for the clarification, but there was no output either way. What does this indicate? – 3l4ng Nov 11 '15 at 17:26
  • I'm not sure. I don't have a plausible explanation, that covers 1) Windows being able to read the file system, 2) fdisk reading the partition table without complaint, and 3) none of Gnome Disks, blkid and the NTFS driver recognizing the file system header. My best explanation is an issue with the USB stack between the external drive case and your Linux system. – David Foerster Nov 11 '15 at 21:35
  • I recommend to look for issue reports about drive cases with the sam USB ID (which you can find out with lsusb). – David Foerster Nov 11 '15 at 21:42
  • @DavidFoerster - was able to mount manually. However, cannot get automount working. Please see point #6 – 3l4ng Nov 19 '15 at 07:10

3 Answers3

22

This will solve the problem:

  • Install ntfs-3g using: sudo apt install ntfs-3g
  • Run sudo fdisk -l to figure out where the mount point is
  • Run sudo ntfsfix -b /dev/{mount_point}
karel
  • 114,770
SKullZzZz
  • 485
3

I tried ntfs-3g but had no luck. In the end, I plugged the drive into a Windows 10 PC and ran chkdsk. It fixed the problem and the drive works in Ubuntu machines now.

In windows, click the start button and type cmd Open the cmd app (like a terminal in Linux)

chkdsk E: /f

Remember to replace the E with the letter that your drive mapped to when you plugged it in.

1
sudo mkdir /media/External-HDD
sudo apt-get install ntfs-3g -y
sudo mount -t ntfs-3g /dev/sdb1 /media/External-HDD
David Foerster
  • 36,264
  • 56
  • 94
  • 147
Alex Lowe
  • 471