Monday, July 16, 2007

TIP: monitoring while mounting USB devices

Here are a few basic pointers you can consider when having problems mounting your USB flash disk.

Login with your terminal and be ready as root before you plug your USB disk. Fire up your message monitoring command like so

# tail -f /var/log/messages

Plug your USB into any USB ports, and watch the changes with the monitoring command

You are going to see similar lines like these:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jul 16 16:44:03 ver kernel: scsi 6:0:0:0: Direct-Access USB 2.0 Flash Disk 2.00 PQ: 0 ANSI: 2
Jul 16 16:44:03 ver kernel: SCSI device sdc: 2070527 512-byte hdwr sectors (1060 MB)
Jul 16 16:44:03 ver kernel: sdc: Write Protect is off
Jul 16 16:44:03 ver kernel: sdc: assuming drive cache: write through
Jul 16 16:44:03 ver kernel: SCSI device sdc: 2070527 512-byte hdwr sectors (1060 MB)
Jul 16 16:44:03 ver kernel: sdc: Write Protect is off
Jul 16 16:44:03 ver kernel: sdc: assuming drive cache: write through
Jul 16 16:44:03 ver kernel: sdc: sdc1
Jul 16 16:44:03 ver kernel: sd 6:0:0:0: Attached scsi removable disk sdc
Jul 16 16:44:03 ver kernel: sd 6:0:0:0: Attached scsi generic sg3 type 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From the last 3 lines, sdc1 is your working USB without any error:

You can see device and bus details like

# lsusb

and a more verbose

# lsusb -v

Now mount it:

# mkdir /mnt/usb
# mount /dev/sdc1 /mnt/usb

Mounting USB disk as easy as 1, 2, 3.

Try to redo it again using different USB port and carefully watch the messages log. You'll notice the it was detected on different USB ports, take note of that port, say /dev/sdd1, and use it as reference to your mounting command.

You can do this with any USB devices like digicams, webcams, videocams, external USB harddisk and DVD/CD writers etc, it helps.

There you go.

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy