LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 08-01-2005, 09:46 AM   #1
COKE CAN
Member
 
Registered: Jul 2005
Location: Yorktown, VA
Distribution: debianSARGE
Posts: 100

Rep: Reputation: 15
Mounting USB storage devices


How do I go about adding a usb drive to Linux to make it as easily accessable as the cdrom, etc?
 
Old 08-01-2005, 10:29 AM   #2
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 53
Plug it in and type dmesg and something like the following should be at the bottom:
Code:
usb 1-1.4: new full speed USB device using uhci_hcd and address 5
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
  Vendor: BUFFALO   Model: ClipDrive         Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
 sda: sda1
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
usb-storage: device scan complete
Then add a mountpoint, for instance: mkdir /pen
and set permissions with: chmod ug+rwx /pen and chgrp users /pen
to: ls -ld /pen
drwxrwx--- 2 root users 4096 Feb 28 16:35 /pen

Then add a line in /etc/fstab for it, for sda1 mine is:
/dev/sda1 /pen vfat noauto,users,exec,noatime,umask=000 0 0

You can then mount with: mount /pen
and unmount with: umount /pen
Add a desktop icon if you like.
 
1 members found this post helpful.
Old 08-01-2005, 10:31 AM   #3
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,475

Rep: Reputation: 87
Don't know what you mean by as easily accessible as the CDRom but this is the comman line I use to mount USB flashdrives on my FC3 system:

mount -a -t vfat /dev/sda1 /mnt/flashdisk -o user,exec,dev,suid,rw,umask=000

after creating the /mnt/flashdisk mountpoint, of course.
 
Old 08-01-2005, 10:48 AM   #4
COKE CAN
Member
 
Registered: Jul 2005
Location: Yorktown, VA
Distribution: debianSARGE
Posts: 100

Original Poster
Rep: Reputation: 15
When I say easily accessable I am referring to how you can open your home directory and click on the cdrom icon.
 
Old 08-01-2005, 11:05 AM   #5
COKE CAN
Member
 
Registered: Jul 2005
Location: Yorktown, VA
Distribution: debianSARGE
Posts: 100

Original Poster
Rep: Reputation: 15
Code:
hub.c: new USB device 00:1f.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x5dc/0xa410) is not claimed by any active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: LEXAR     Model: JUMPDRIVE SPORT   Rev: 1000
  Type:   Direct-Access                      ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
usb.c: USB disconnect on device 00:1f.2-2 address 2
I adeed this to /etc/fstab:

Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda5       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   iso9660 ro,user,noauto  0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/sda1       /pen            vfat    rw,user,noauto  0       0
I ran mount /pen:

Code:
# mount /pen
[mntent]: warning: no final newline at the end of /etc/fstab
mount: /dev/sda1 is not a valid block device
laptop:/home/cokecan# Mutex destroy failure: Device or resource busy
ICE default IO error handler doing an exit(), pid = 28353, errno = 0
 
Old 08-01-2005, 01:42 PM   #6
slithy
Member
 
Registered: Jun 2005
Distribution: Debian "Etch"
Posts: 48

Rep: Reputation: 15
Forget about all that for right now. Plug your flashdrive in, open up your terminal and as root do:
Code:
cd /dev
Code:
ls | grep sd
You should see some results like sda, sdb, or sda1. There should only be one if you have one USB Mass Storage Device hooked up. If you already have a folder in your /mnt directory for where you would like to mount the drive, skip this next step, if not
Code:
mkdir /mnt/removable
Now for the command that will actually mount the drive.
Code:
mount /dev/sda(or whatever yours was called) /mnt/removable
If this doesn't work and you have a FAT32 partition on your flashdrive try,

Code:
mount -t vfat /dev/sda(or whatever yours was called) /mnt/removable
 
Old 08-01-2005, 01:49 PM   #7
COKE CAN
Member
 
Registered: Jul 2005
Location: Yorktown, VA
Distribution: debianSARGE
Posts: 100

Original Poster
Rep: Reputation: 15
I have a usb drive and a usb mouse hooked up on my laptop. I got this while running
Code:
ls | grep sd
Code:
ptysd
sda
sda1
sda10
sda11
sda12
sda13
sda14
sda15
sda2
sda3
sda4
sda5
sda6
sda7
sda8
sda9
sdb
 
Old 08-01-2005, 01:50 PM   #8
COKE CAN
Member
 
Registered: Jul 2005
Location: Yorktown, VA
Distribution: debianSARGE
Posts: 100

Original Poster
Rep: Reputation: 15
Code:
# mount /dev/sda1 /mnt/removable
mount: you must specify the filesystem type
 
Old 08-01-2005, 01:59 PM   #9
COKE CAN
Member
 
Registered: Jul 2005
Location: Yorktown, VA
Distribution: debianSARGE
Posts: 100

Original Poster
Rep: Reputation: 15
Code:
# mount -t vfat /dev/sda1 /mnt/removable
mount: /dev/sda1 is not a valid block device
 
Old 08-01-2005, 02:02 PM   #10
slithy
Member
 
Registered: Jun 2005
Distribution: Debian "Etch"
Posts: 48

Rep: Reputation: 15
Quote:
Code:
hub.c: new USB device 00:1f.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x5dc/0xa410) is not claimed by any active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: LEXAR     Model: JUMPDRIVE SPORT   Rev: 1000
  Type:   Direct-Access                      ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
usb.c: USB disconnect on device 00:1f.2-2 address 2
From looking at your dmesg, I would say that this isn't a mount problem. After you plug in your usb flashdrive, the last few lines in dmesg should tell whether the drive is sda1 or whatever. Unless you didn't copy all of the dmesg pertaining to the flashdrive. Find out what the device is and then we can work on moutning it.

Quote:
Code:
usb 1-1.4: new full speed USB device using uhci_hcd and address 5
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
  Vendor: BUFFALO   Model: ClipDrive         Rev: 2.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 512000 512-byte hdwr sectors (262 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
 sda: sda1
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
usb-storage: device scan complete
In this example posted up by another user, you can see that his drive is sda
 
Old 08-01-2005, 02:07 PM   #11
COKE CAN
Member
 
Registered: Jul 2005
Location: Yorktown, VA
Distribution: debianSARGE
Posts: 100

Original Poster
Rep: Reputation: 15
Code:
hub.c: new USB device 00:1f.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x5dc/0xa410) is not claimed by any active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: LEXAR     Model: JUMPDRIVE SPORT   Rev: 1000
  Type:   Direct-Access                      ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
usb.c: USB disconnect on device 00:1f.2-2 address 2
e100: eth0 NIC Link is Down
e100: eth0 NIC Link is Up 100 Mbps Full duplex
e100: eth0 NIC Link is Down
e100: eth0 NIC Link is Up 10 Mbps Half duplex
e100: eth0 NIC Link is Down
e100: eth0 NIC Link is Up 100 Mbps Full duplex
ISO 9660 Extensions: Microsoft Joliet Level 1
ISOFS: changing to secondary root
orinoco_lock() called with hw_unavailable (dev=cd235000)
unloading Kernel Card Services
Linux Kernel Card Services 3.1.22
  options:  [pci] [cardbus] [pm]
PCI: Found IRQ 5 for device 02:00.0
PCI: Sharing IRQ 5 with 01:00.0
PCI: Found IRQ 11 for device 02:00.1
PCI: Sharing IRQ 11 with 00:1f.3
PCI: Sharing IRQ 11 with 00:1f.5
PCI: Sharing IRQ 11 with 00:1f.6
Yenta ISA IRQ mask 0x0698, PCI irq 5
Socket status: 30000410
Yenta ISA IRQ mask 0x0698, PCI irq 11
Socket status: 30000006
cs: IO port probe 0x0100-0x04ff: excluding 0x200-0x20f 0x378-0x37f 0x4d0-0x4d7
cs: IO port probe 0x0800-0x08ff: clean.
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0a00-0x0aff: clean.
cs: memory probe 0xa0000000-0xa0ffffff: clean.
hermes.c: 4 Dec 2002 David Gibson <hermes@gibson.dropbear.id.au>
orinoco.c 0.13d (David Gibson <hermes@gibson.dropbear.id.au> and others)
orinoco_cs.c 0.13d (David Gibson <hermes@gibson.dropbear.id.au> and others)
eth1: Station identity 001f:0006:0001:0003
eth1: Looks like an Intersil firmware version 1.3.6
eth1: Ad-hoc demo mode supported
eth1: IEEE standard IBSS ad-hoc mode supported
eth1: WEP supported, 104-bit key
eth1: MAC address 00:09:5B:4B:4E:AF
eth1: Station name "Prism  I"
eth1: ready
eth1: index 0x01: Vcc 5.0, irq 3, io 0x0100-0x013f
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
sda: Unit Not Ready, sense:
Info fld=0xa00 (nonstd), Current 00:00: sense key Not Ready
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready
sda : block size assumed to be 512 bytes, disk size 1GB.
 /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0
 I/O error: dev 08:00, sector 0
 unable to read partition table
sda: Unit Not Ready, sense:
Info fld=0xa00 (nonstd), Current 00:00: sense key Not Ready
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: test WP failed, assume Write Enabled
 /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0
 I/O error: dev 08:00, sector 0
 unable to read partition table
sda: Unit Not Ready, sense:
Info fld=0xa00 (nonstd), Current 00:00: sense key Not Ready
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: test WP failed, assume Write Enabled
 /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0
 I/O error: dev 08:00, sector 0
 unable to read partition table
sda: Unit Not Ready, sense:
Info fld=0xa00 (nonstd), Current 00:00: sense key Not Ready
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: test WP failed, assume Write Enabled
 /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0
 I/O error: dev 08:00, sector 0
 unable to read partition table
That is everything from the beginning where it first mentions the USB device
 
Old 08-01-2005, 03:03 PM   #12
slithy
Member
 
Registered: Jun 2005
Distribution: Debian "Etch"
Posts: 48

Rep: Reputation: 15
What happens when you do a
Code:
mount -t vfat /dev/sda /mnt/removable(or where ever you want it mounted)?
 
Old 08-01-2005, 03:08 PM   #13
COKE CAN
Member
 
Registered: Jul 2005
Location: Yorktown, VA
Distribution: debianSARGE
Posts: 100

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by slithy
What happens when you do a
Code:
mount -t vfat /dev/sda /mnt/removable(or where ever you want it mounted)?
Quote:
Originally posted by COKE CAN
Code:
# mount -t vfat /dev/sda1 /mnt/removable
mount: /dev/sda1 is not a valid block device
 
Old 08-01-2005, 03:17 PM   #14
slithy
Member
 
Registered: Jun 2005
Distribution: Debian "Etch"
Posts: 48

Rep: Reputation: 15
From looking at your dmesg, sda is your flashdrive, not sda1, so again try
Code:
mount -t vfat /dev/sda /mnt/removable
Do you know if your filesystem on the flashdrive is FAT32?
 
Old 08-01-2005, 03:27 PM   #15
COKE CAN
Member
 
Registered: Jul 2005
Location: Yorktown, VA
Distribution: debianSARGE
Posts: 100

Original Poster
Rep: Reputation: 15
I have no clue
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB storage devices difficult to mount and use jaakkop Slackware 4 11-16-2005 04:03 PM
mounting usb storage devices blues patitoconejita Linux - Hardware 7 03-29-2005 07:24 AM
USB storage devices? Valael Fedora 1 08-17-2004 04:24 PM
Automatically Mounting USB Storage Devices??? nalmo Linux - General 6 08-13-2004 03:15 PM
usb mass storage devices rukinhas Mandriva 1 11-18-2003 07:23 PM


All times are GMT -5. The time now is 04:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration