Ubuntu – (re) mount usb device

mountusb

I just can't seem to figure out the exact mount-command to re-mount my phone. It used to automatically appear, but for some reason in stopped. I need help to get the mount-statement right.

The device is listed in lsusb

Bus 001 Device 002: ID 1058:1100 Western Digital Technologies, Inc. 
Bus 001 Device 003: ID 4971:1014 SimpleTech 
Bus 002 Device 003: ID 04e8:685c Samsung Electronics Co., Ltd 
Bus 006 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver

And dmesg nicely tells about the device getting connected:

[ 8469.512061] usb 2-2: new high-speed USB device number 3 using ehci_hcd
[ 8469.645304] usb 2-2: New USB device found, idVendor=04e8, idProduct=685c
[ 8469.645310] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 8469.645315] usb 2-2: Product: Galaxy Nexus
[ 8469.645318] usb 2-2: Manufacturer: samsung
[ 8469.645321] usb 2-2: SerialNumber: 0146A5B31900D012

How do i glue this together to a working mount-command?

Best Answer

Figure out its uuid:

(At least once, under whatever circumstances, if nothing helps, by mounting it on a friends machine). First, let's get the current id. (that can change again, on another time)

mount | grep ^/dev

You should somewhere should recognize its actual name here,

/dev/sda4...
/dev/sda5 on /boot ...
/dev/sdc1 on /media/frank/iPhoneWhatsoever...
/dev/sdc2 on /media/frank/my BackupDrive...

Now, say, it's sdb1. Let's figure out its truly unique uuid:

$> ll /dev/disk/by-uuid/ | grep sdc1

Should get you a fairly long string (often hex, sometimes with dashes)

lrwxrwxrwx [...]  366A2F886A2F003A -> ../../sdc1

manual mount

directory must pre-exist, not taken care of. so generate it (only once, ever):

sudo mkdir /media/myFx

And here we go

mount /dev/disk/by-uuid/366A2F886A2F003A /media/myFX

manual unmount

sudo umount /dev/disk/by-uuid/366A2F886A2F003A

Additionally if not done yet, add it to /etc/fstab. For that or for mount command (see man pages) you might want to use additional parameters, if there are problems with your preferred user rights, a ‘rare’ drive format etc... Just as a sketch:

sudo mount -t ntfs -o umask=007,gid=046,uid=0,nls=utf8 /dev/disk/by-uuid/366A2F886A2F003A /media/myFX

Related Question