The Moose and Squirrel Files

October 25, 2008

Mounting USB Flash Drives in Linux

Filed under: linux — Tags: , — networknerd @ 10:00 am

Working with USB flash drives in linux can often be a little bit frustrating compared with windows. Often when a USB thumb drive is inserted it doesn’t mount.

The trick is to use the dmesg command to find the device name assigned to the flash drive.

dmesg | tail -17

usb 1-7: new high speed USB device using ehci_hcd and address 3
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
Vendor: USB       Model: Flash Disk        Rev: V1.1
Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdb: 2015232 512-byte hdwr sectors (1032 MB)
sdb: Write Protect is off
sdb: Mode Sense: 23 00 00 00
sdb: assuming drive cache: write through
SCSI device sdb: 2015232 512-byte hdwr sectors (1032 MB)
sdb: Write Protect is off
sdb: Mode Sense: 23 00 00 00
sdb: assuming drive cache: write through
sdb: sdb1
Attached scsi removable disk sdb at scsi2, channel 0, id 0, lun 0
usb-storage: device scan complete

After the device name is found it is a simple matter to mount it as usual

mount /dev/sdb1 /media/usb

Advertisements

Blog at WordPress.com.