0

I am using Debian. I cannot mount Western Digital My Passport Ultra on my system. I have tried sudo mount /dev/sdbx /media/hdd. It worked fine for me. But the problem is that I have to repeat this process every time I restart my system. And it is hard for my friends to mount it on their Linux machine as well. (works fine on Windows!)

Why is it not mounting automatically even after reformatting the drive to NTFS from Linux? What is the permanent solution?

  • 1
    Set up a udev rule. – HalosGhost Sep 13 '14 at 17:29
  • I need to do that in every system where I use this drive? – Indra Sep 13 '14 at 17:31
  • No. There are plenty of Linux distributions that auto-mount drives for you. Debian has tools to do this, I'm sure. But, if you want to know how those tools actually accomplish this process, it's probably with udev rules. – HalosGhost Sep 13 '14 at 17:33
  • I was using mypassport for one year in the same machine, it mounts automatically. The drive had some problems and I got it replaced with 'mypassport ultra'. Now it wont mount automatically in linux. WD is silent in case of Linux. And it mounts perfectly in windows. I believe that what windows can do, Linux can do better. – Indra Sep 13 '14 at 17:38
  • 1
    A semi-manual method is to add an entry in /etc/fstab, using the drive's UUID. This is easy to set up. As @HalosGhost says, there are other better ways to do this, but this is what I have been using. – Faheem Mitha Sep 13 '14 at 17:42
2

The package usbmount, which I already had installed, works for me. This calls udev to mount and unmount drives.

It was not working for my external hard drive. I checked why, and it turns out it only mount and unmount filesystems that are listed in the variable FILESYSTEMS, which is defined in /etc/usbmount/usbmount.conf. However, my drive uses the NTFS filesystem, but ntfs was not in that list. Once I added it, the drive worked.

Another package that looks promising is udevil. I haven't got this working yet. If I do, I'll add information about it here.

NOTES:

  1. Set VERBOSE=yes in /etc/usbmount/usbmount.conf for more information.

    # If set to "yes", more information will be logged via the syslog
    # facility.
    VERBOSE=yes
    
  2. udev is quite chatty. This is what is written to /var/log/syslog when the drive is plugged in.

    Sep 14 01:26:16 orwell kernel: [733993.628022] usb 4-1: new high-speed USB device number 7 using ehci_hcd
    Sep 14 01:26:17 orwell kernel: [733993.813808] usb 4-1: New USB device found, idVendor=1058, idProduct=0820
    Sep 14 01:26:17 orwell kernel: [733993.813811] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
    Sep 14 01:26:17 orwell kernel: [733993.813813] usb 4-1: Product: My Passport 0820
    Sep 14 01:26:17 orwell kernel: [733993.813814] usb 4-1: Manufacturer: Western Digital
    Sep 14 01:26:17 orwell kernel: [733993.813815] usb 4-1: SerialNumber: 575835314143335739373437
    Sep 14 01:26:17 orwell kernel: [733993.814396] scsi14 : usb-storage 4-1:1.0
    Sep 14 01:26:17 orwell mtp-probe: checking bus 4, device 7: "/sys/devices/pci0000:00/0000:00:16.2/usb4/4-1"
    Sep 14 01:26:17 orwell mtp-probe: bus: 4, device: 7 was not an MTP device
    Sep 14 01:26:18 orwell kernel: [733994.812729] scsi 14:0:0:0: Direct-Access     WD       My Passport 0820 1007 PQ: 0 ANSI: 6
    Sep 14 01:26:18 orwell kernel: [733994.813084] scsi 14:0:0:1: Enclosure         WD       SES Device       1007 PQ: 0 ANSI: 6
    Sep 14 01:26:18 orwell kernel: [733994.813595] sd 14:0:0:0: Attached scsi generic sg5 type 0
    Sep 14 01:26:18 orwell kernel: [733994.813681] ses 14:0:0:1: Attached Enclosure device
    Sep 14 01:26:18 orwell kernel: [733994.813753] ses 14:0:0:1: Attached scsi generic sg6 type 13
    Sep 14 01:26:23 orwell kernel: [733999.846168] sd 14:0:0:0: [sdf] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
    Sep 14 01:26:23 orwell kernel: [733999.847672] sd 14:0:0:0: [sdf] Write Protect is off
    Sep 14 01:26:23 orwell kernel: [733999.847675] sd 14:0:0:0: [sdf] Mode Sense: 47 00 10 08
    Sep 14 01:26:23 orwell kernel: [733999.848793] sd 14:0:0:0: [sdf] No Caching mode page found
    Sep 14 01:26:23 orwell kernel: [733999.848795] sd 14:0:0:0: [sdf] Assuming drive cache: write through
    Sep 14 01:26:23 orwell kernel: [733999.853234] sd 14:0:0:0: [sdf] No Caching mode page found
    Sep 14 01:26:23 orwell kernel: [733999.853236] sd 14:0:0:0: [sdf] Assuming drive cache: write through
    Sep 14 01:26:23 orwell kernel: [733999.868615]  sdf: sdf1
    Sep 14 01:26:23 orwell kernel: [733999.873548] sd 14:0:0:0: [sdf] No Caching mode page found
    Sep 14 01:26:23 orwell kernel: [733999.873552] sd 14:0:0:0: [sdf] Assuming drive cache: write through
    Sep 14 01:26:23 orwell kernel: [733999.873554] sd 14:0:0:0: [sdf] Attached SCSI disk
    Sep 14 01:26:23 orwell usbmount[18897]: loaded usbmount configurations
    Sep 14 01:26:23 orwell usbmount[18897]: trying to acquire lock /var/run/usbmount/.mount.lock
    Sep 14 01:26:23 orwell usbmount[18897]: acquired lock /var/run/usbmount/.mount.lock
    Sep 14 01:26:23 orwell usbmount[18897]: /dev/sdf does not contain a filesystem or disklabel
    Sep 14 01:26:23 orwell usbmount[18921]: loaded usbmount configurations
    Sep 14 01:26:23 orwell usbmount[18921]: trying to acquire lock /var/run/usbmount/.mount.lock
    Sep 14 01:26:23 orwell usbmount[18921]: acquired lock /var/run/usbmount/.mount.lock
    Sep 14 01:26:23 orwell usbmount[18921]: /dev/sdf1 contains filesystem type ntfs
    Sep 14 01:26:23 orwell usbmount[18921]: mountpoint /media/usb1 is available for /dev/sdf1
    Sep 14 01:26:23 orwell usbmount[18921]: executing command: mount -tntfs -osync,noexec,nodev,noatime,nodiratime /dev/sdf1 /media/usb1
    Sep 14 01:26:24 orwell ntfs-3g[18952]: Version 2012.1.15AR.5 external FUSE 29
    Sep 14 01:26:24 orwell ntfs-3g[18952]: Mounted /dev/sdf1 (Read-Write, label "My Passport", NTFS 3.1)
    Sep 14 01:26:24 orwell ntfs-3g[18952]: Cmdline options: rw,noexec,nodev,sync,noatime,nodiratime
    Sep 14 01:26:24 orwell ntfs-3g[18952]: Mount options: rw,noexec,nodev,sync,nodiratime,allow_other,nonempty,noatime,fsname=/dev/sdf1,blkdev,blksie=4096
    Sep 14 01:26:24 orwell ntfs-3g[18952]: Ownership and permissions disabled, configuration type 7
    Sep 14 01:26:24 orwell usbmount[18921]: executing command: run-parts /etc/usbmount/mount.d
    Sep 14 01:26:24 orwell usbmount[18921]: usbmount execution finished
    
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.