1

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?

Braiam
  • 35,991
Indra
  • 141
  • 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
  • @FaheemMitha How to do that? and why this happen in Linux. Is there something that I can do on the drive to make it work in every system. – Indra Sep 13 '14 at 17:47
  • @IndrajithIndraprastham each system needs to be configured. Are you saying you want details on how to add an entry to /etc/fstab? – Faheem Mitha Sep 13 '14 at 17:49
  • @FaheemMitha It is impossible to configure every system. I am promoting Linux over windows in my college and there are many systems including laptops. And I find this really disappointing that I cannot mount a drive in Linux normally. It was working perfectly before i got the replaced ultra edition. Changing the drive filesystem or partition table wont help? I want to make changes on the drive so that it works in every Linux machine. Hope you get my problem. – Indra Sep 13 '14 at 17:57
  • @IndrajithIndraprastham You want to change the drive so that it mounts itself automatically on ever linux system you plug it into? Sorry, that isn't going to happen unless you have already configured those machines, or unless they already have some software installed which will do it automatically. I think what you need is software that will configure your drive automatically once installed. I don't know if this is possible. I have heard of such things, but have never configured this myself. – Faheem Mitha Sep 13 '14 at 18:01
  • Sorry. I suggest you do a search on the site (or the net in general) for "automatically mounting external drives". See e.g. http://unix.stackexchange.com/q/11472/. Also some links mentioned here: http://unix.stackexchange.com/questions/111358/automount-usb-drive#comment172399_111358 – Faheem Mitha Sep 13 '14 at 18:01

2 Answers2

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
    
Faheem Mitha
  • 35,108
0

Many searches and attempts with lots of different software .. in the end I have found that in this case..

  • connect elements to usb port
  • open the file-system GUI (disk/folder), select 'other locations'
  • repeat for all usb ports, without mounting/unmounting necessary as my hd did not even ID respond to lsusb or sudo fdisk -l,
  • upon return to original usb port the hd appears

this seems like i haven't tried everything and i was "lucky" as i agree this is a super non-tech way.. but i have found it to be the most consistent out of all other google-search/stack-searched etc.. techniques, PLUS for whatever reason i do not need to sudo mount in the terminal..?!?

anyway, some good options here if this does not work in your situation

running dmesg in the terminal with each new port connection also ID'd consistent failure prior to the return to the original usb-port attempt

  • connect hd through each port
[12077.405153] usb 1-1-port4: attempt power cycle
[12078.013009] usb 1-1.4: new full-speed USB device number 12 using ehci-pci
[12078.428897] usb 1-1.4: device not accepting address 12, error -32
[12078.508929] usb 1-1.4: new full-speed USB device number 13 using ehci-pci
[12078.928992] usb 1-1.4: device not accepting address 13, error -32
[12078.929228] usb 1-1-port4: unable to enumerate USB device

re-connect to original port

[12401.860608] usb 4-1: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[12401.884232] usb 4-1: New USB device found, idVendor=1058, idProduct=10b8, bcdDevice=10.12
[12401.884284] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[12401.884289] usb 4-1: Product: Elements 10B8
[12401.884292] usb 4-1: Manufacturer: Western Digital
[12401.884296] usb 4-1: SerialNumber: 575834314142345232535935
[12401.886519] usb-storage 4-1:1.0: USB Mass Storage device detected
[12401.886828] scsi host2: usb-storage 4-1:1.0
[12402.905140] scsi 2:0:0:0: Direct-Access     WD       Elements 10B8    1012 PQ: 0 ANSI: 6
[12402.905620] sd 2:0:0:0: Attached scsi generic sg2 type 0
[12402.907088] sd 2:0:0:0: [sdb] Spinning up disk...
[12403.928367] .....ready
[12408.025013] sd 2:0:0:0: [sdb] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
[12408.025568] sd 2:0:0:0: [sdb] Write Protect is off
[12408.025574] sd 2:0:0:0: [sdb] Mode Sense: 47 00 10 08
[12408.026065] sd 2:0:0:0: [sdb] No Caching mode page found
[12408.026076] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[12408.157584] sd 2:0:0:0: [sdb] Attached SCSI disk
[12408.575173] EXT4-fs (sdb): mounted filesystem with ordered data mode. Opts: (null)
rdfleay
  • 29
  • 2