Cannot mount USB devices

Slack Rat slacker-MOdoAOVCFFcswetKESUqMA at public.gmane.org
Wed May 19 14:59:42 UTC 2010


Thomas Milne a écrit profondement:

| I installed some newer gvfs packages, specifically gvfs-fuse, and now
| I'm having trouble mounting anything.
| 

TRY THIS

First make a simple script to save repeated typing  and/or to call up the UUID
listing if you forget the exact syntax

call it 'getuuid' and put it in /usr/local/bin or wherever you put
your scripts

barebones script;
ls -l /dev/disk/by-uuid

The following examples are from part of my system - modify them to suit yourself

Execute getuuid

It shows this: [your list may not be ordered as I Cooked this ;)]
total 0
lrwxrwxrwx 1 root root 10 2010-05-18 15:16 7AC4B6EDC4B6AAB1-> ../../sda1
lrwxrwxrwx 1 root root 10 2010-05-18 15:16 1ADB-0F8C -> ../../sda2
lrwxrwxrwx 1 root root 10 2010-05-18 15:16 2eb54981-5631-462c-950f-b66a86748239 -> ../../sda3
lrwxrwxrwx 1 root root 10 2010-05-18 15:16 b64f9ecb-b643-4221-955d-9d7f3c04191f -> ../../sda4

lrwxrwxrwx 1 root root 10 2010-05-18 19:17 3947f95b-5be5-4ab3-a562-3121af3fe269 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2010-05-18 19:17 d4738dee-116a-4c17-9c17-703f4044ed2c -> ../../sdb2
lrwxrwxrwx 1 root root 10 2010-05-18 19:17 ccc5f159-5506-46cf-bc70-9a69a1a71d1a -> ../../sdb3
lrwxrwxrwx 1 root root 10 2010-05-18 19:17 0fe8cbfe-e87b-4a12-9a36-e0956968c934 -> ../../sdb4

lrwxrwxrwx 1 root root 10 2010-05-18 19:17 4B2E-30DD -> ../../sdc1
lrwxrwxrwx 1 root root 10 2010-05-18 19:17 1b7548e1-47c9-4cff-a915-0f7be5c18dd0 -> ../../sdc2
lrwxrwxrwx 1 root root 10 2010-05-18 19:17 bd8d3706-0b44-4ba0-bbfa-88796b36bc7d -> ../../sdc3



At this stage you should be able to figure out which drive is which - if
not do them one by one so you are sure

Now physically mark them - I have several but only show two USB plus the
internal here as an example - a bit of paper stuck on with adhesive tape
is great


Now I use scripts to mount/umount because drives get moved from box
to box

SDA is internal and I mount it in fstab which looks like this

# INTERNAL HARD DRIVE - sda3 is / and sda4 is swap
UUID=7AC4B6EDC4B6AAB1                           /mnt/sda1        ntfs        defaults         1   0
UUID=1ADB-0F8C                                  /mnt/sda2        vfat        defaults         1   1
UUID=2eb54981-5631-462c-950f-b66a86748239       /                ext4        defaults         1   1
UUID=b64f9ecb-b643-4221-955d-9d7f3c04191f       swap             swap        defaults         0   0
# INTERNAL CD DRIVE
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
# EXTERNAL HARD DRIVES mount by scripts in /usr/local/bin
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
 
For sdb and sdc I use the following scripts

SDB - note I don't use the driveID for the mount points as the driveiD
can change [no /mnt/sdb1 etc or all kinds of horribles can happen]

#! /bin/sh 
mkdir -p /mnt/b1 1>/dev/null 2>&1
 [use something you will recognize instead of 'b1' etc]
mkdir -p /mnt/b2  1>/dev/null 2>&1
mkdir -p /mnt/b3  1>/dev/null 2>&1
mkdir -p /mnt/b4  1>/dev/null 2>&1
		mount -t ext3 UUID=3947f95b-5be5-4ab3-a562-3121af3fe269 /mnt/b1
		mount -t ext3 UUID=d4738dee-116a-4c17-9c17-703f4044ed2c /mnt/b2		
		mount -t ext3 UUID=ccc5f159-5506-46cf-bc70-9a69a1a71d1a /mnt/b3	     
		mount -t ext3 UUID=0fe8cbfe-e87b-4a12-9a36-e0956968c934 /mnt/b4	     
# EOF

AND SDC

#! /bin/sh
mkdir -p /mnt/c1  1>/dev/null 2>&1
mkdir -p /mnt/c2  1>/dev/null 2>&1
mkdir -p /mnt/c3  1>/dev/null 2>&1
		mount -t vfat UUID=4B2E-30DD /mnt/c1
		mount -t ext3 UUID=1b7548e1-47c9-4cff-a915-0f7be5c18dd0 /mnt/c2		
		mount -t ext3 UUID=bd8d3706-0b44-4ba0-bbfa-88796b36bc7d  /mnt/c3	     

# EOF

You will be able to figurre out for yourself how to unmount them

Good Luck

Slackrat
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list