Originally Posted by xr4ti
dmesg output after connecting says:
usb 5-3: configuration #1 chosen from 1 choice
scsi15 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 12
usb-storage: waiting for device to settle before scanning
Somewhere in the dmesg output it should identify the device as a drive, like sd[something], such as sda, sdb, sdc, and so on.
Let's say is shows up as "sdc."
It is being seen as /dev/sdc, since devices are seen to be in /dev.
The next step is to create directory in either /mnt or /media to which to mount the device. You can call it anything you want, for example, "joe." (The traditional way is to use /mnt; the current way is to use /media.)
So we create a directory
We can test this by entering this command, which links the device in /dev to the mountpoint in /mnt:
mount /dev/sdc /mnt/joe
If we got it right, the file list shown by dir should reflect the contents of the media in the drive (there must be valid media in the drive for this test to work; a commercial audio CD is not valid media for this purpose).
We unmount the device with
If the test worked, we enter a line in fstab like this:
/dev/sdc /mnt/joe auto rw,user,noauto 0 0
This translates to
"Mount the device seen as /dev/sdc to /mnt/joe, auto detect the file type, make it read/write, allow any user to mount the drive, do not mount it automatically."
See the link I provided earlier for the meaning of "0 0."
We should then be able to mount device with
and see its contents with a dir
For comparison, here is the dmesg output for my external USB HDD. Since it is already mounted and partitioned, the partitions also show. Note that it is seen as sdb; the remainder of that line refers to how the partitions are seen:
[ 8.340046] scsi 2:0:0:0: Direct-Access MICRONET FANTOM DRIVE 2.10 PQ: 0 ANSI: 4
[ 8.341262] sd 2:0:0:0: [sdb] 3907029168 512-byte hardware sectors (2000399 MB)
[ 8.342139] sd 2:0:0:0: [sdb] Write Protect is off
[ 8.342143] sd 2:0:0:0: [sdb] Mode Sense: 21 00 00 00
[ 8.342146] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 8.343261] sd 2:0:0:0: [sdb] 3907029168 512-byte hardware sectors (2000399 MB)
[ 8.344528] sd 2:0:0:0: [sdb] Write Protect is off
[ 8.344532] sd 2:0:0:0: [sdb] Mode Sense: 21 00 00 00
[ 8.344535] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 8.344579] sdb: sdb1 sdb2 < sdb5 >
Here are the relevant lines from /etc/fstab (since this is a hard drive, and not a CD/DVD drive, I am mounting the individual partitions and I want them to mount automatically on reboot, hence the numbers after sdb and the "auto"):
/dev/sdb1 /media/sdb1 ext3 rw,user,auto 0 1
/dev/sdb5 /media/sdb5 ext3 rw,user,auto 0 1
I would not have understood a word of this five years ago.