LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-22-2003, 11:06 PM   #1
lewisdw
LQ Newbie
 
Registered: Nov 2003
Posts: 26

Rep: Reputation: 15
Question how to access 'drives'


I'm running Fedora. How do I mount/use USB memory devices? I inserted such a device in a USB port. dmesg gives the following:

hub 3-3:1.0: new USB device on port 1, assigned address 3
ehci_hcd 0000:00:02.2: qh dd9a6180 (#0) state 1
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 1 proto 2 vid 0x03F0 pid 0x1004
hub 3-3:1.0: new USB device on port 4, assigned address 4
ehci_hcd 0000:00:02.2: qh dd9a6280 (#0) state 1
scsi6 : SCSI emulation for USB Mass Storage devices
Vendor: I0MEGA Model: Mini 64*IOM Rev: 3.04
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi6, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi6, channel 0, id 0, lun 0, type 0
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4
updfstab: numerical sysctl 1 23 is obsolete.


How do I now access that device? Would this also work for a USB digital camera?

Thanks
 
Old 11-23-2003, 12:15 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,495

Rep: Reputation: 193Reputation: 193
I assume it's a usb zip drive. If that's the case, create a mount point for it:

# mkdir /mnt/zip

and then to mount it do:

# mount -t vfat /dev/sda4 /mnt/zip

To see if it worked do:

# ls /mnt/zip

That should list the contents of the zip disk.

To allow ordinary users to be able to mount the zip drive and have read/write access to the zip drive edit fstab by inserting the following line:

/dev/sda4 /mnt/zip vfat user,exec,noauto,defaults,umask=0,rw 0 0
 
Old 11-23-2003, 12:21 AM   #3
lewisdw
LQ Newbie
 
Registered: Nov 2003
Posts: 26

Original Poster
Rep: Reputation: 15
I tried that. Using /dev/sda4:
[root@localhost /]# mount -t vfat /dev/sda4 /mnt/usbdrive
mount: /dev/sda4 is not a valid block device


It's not a zip drive. It's a usb memory device (pen drive, etc). 64MB.
 
Old 11-23-2003, 12:32 AM   #4
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
Maybe try

# mount -t vfat /dev/sda6 /mnt/usbdrive

You could try to do something similar with a USB camera but be careful though. My digital camera hard locked when I plugged it into my PC and tried to access it under linux.
 
Old 11-23-2003, 12:36 AM   #5
lewisdw
LQ Newbie
 
Registered: Nov 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Same result:
[root@localhost /]# mount -t vfat /dev/sda6 /mnt/usbdrive
mount: /dev/sda6 is not a valid block device


How do you determine the device name to use (ie /dev/sdaX)? In the output I provided earlier, all I see is sda (no number), and it's emulating SCSI for it.
 
Old 11-23-2003, 12:42 AM   #6
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
It does say something in the following two lines:

Attached scsi removable disk sda at scsi6, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi6, channel 0, id 0, lun 0, type 0

That was where my guess came from.
 
Old 11-23-2003, 12:47 AM   #7
lewisdw
LQ Newbie
 
Registered: Nov 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Well, it worked with /dev/sda1. Don't know if this is normal, but I just tried it and it's working fine.

As for the camera, I just tried it, and this is the dmesg:

USB Mass Storage device found at 4
updfstab: numerical sysctl 1 23 is obsolete.
SCSI device sda: 127840 512-byte hdwr sectors (65 MB)
sda: Write Protect is off
sda: Mode Sense: 00 46 00 00
sda: assuming drive cache: write through
SCSI device sda: 127840 512-byte hdwr sectors (65 MB)
sda: Write Protect is off
sda: Mode Sense: 00 46 00 00
sda: assuming drive cache: write through
sda: sda1
FAT: invalid media value (0xb9)
VFS: Can't find a valid FAT filesystem on dev sda.
FAT: invalid media value (0xb9)
VFS: Can't find a valid FAT filesystem on dev sda.
FAT: invalid media value (0xb9)
VFS: Can't find a valid FAT filesystem on dev sda.
NTFS driver 2.1.4 [Flags: R/O MODULE].
FAT: invalid media value (0xb9)
VFS: Can't find a valid FAT filesystem on dev sda.
cdrom: This disc doesn't have any tracks I recognize!
cdrom: This disc doesn't have any tracks I recognize!
hub 2-0:1.0: new USB device on port 3, assigned address 8
scsi7 : SCSI emulation for USB Mass Storage devices
Vendor: Sony Model: Sony DSC Rev: 2.10
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sdb: 126848 512-byte hdwr sectors (65 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 32 00 00
sdb: assuming drive cache: write through
SCSI device (ioctl) reports ILLEGAL REQUEST.
SCSI device sdb: 126848 512-byte hdwr sectors (65 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 32 00 00
sdb: assuming drive cache: write through
SCSI device sdb: 126848 512-byte hdwr sectors (65 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 32 00 00
sdb: assuming drive cache: write through
sdb:<3>Buffer I/O error on device sdb, logical block 0
Buffer I/O error on device sdb, logical block 0
unable to read partition table
sdb:<3>Buffer I/O error on device sdb, logical block 0
unable to read partition table
Attached scsi removable disk sdb at scsi7, channel 0, id 0, lun 0
Attached scsi generic sg1 at scsi7, channel 0, id 0, lun 0, type 0
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 8
updfstab: numerical sysctl 1 23 is obsolete.
SCSI device (ioctl) reports ILLEGAL REQUEST.
SCSI device sdb: 126848 512-byte hdwr sectors (65 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 32 00 00
sdb: assuming drive cache: write through
SCSI device sdb: 126848 512-byte hdwr sectors (65 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 32 00 00
sdb: assuming drive cache: write through
sdb:<3>Buffer I/O error on device sdb, logical block 0
Buffer I/O error on device sdb, logical block 0
unable to read partition table
SCSI device sdb: 126848 512-byte hdwr sectors (65 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 32 00 00
sdb: assuming drive cache: write through
SCSI device sdb: 126848 512-byte hdwr sectors (65 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 32 00 00
sdb: assuming drive cache: write through
sdb:end_request: I/O error, dev sdb, sector 0
Buffer I/O error on device sdb, logical block 0
end_request: I/O error, dev sdb, sector 0
Buffer I/O error on device sdb, logical block 0
unable to read partition table

The error messages in the above output concern me, should they? This camera works fine under Windows XP. Anyway, what should I try for mounting it?
 
Old 11-23-2003, 12:51 AM   #8
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
I'd unmount that immediately. There's something mentioned about sg0 for the USB drive in the output you've listed. Maybe give this a go:

# mount -r /dev/sg0 /mnt/usbdrive

Let mount try to figure out what filesystem is on it.
 
Old 11-23-2003, 01:16 AM   #9
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,495

Rep: Reputation: 193Reputation: 193
As root run this:

# fdisk -l

That will list all partitions that linux recognizes including usb storage devices. From that you can deduce the device file. For example, here's the relevant output for my external usb hard drive:

Quote:
Disk /dev/scsi/host1/bus0/target0/lun0/disc: 122.9 GB, 122941341696 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/scsi/host1/bus0/target0/lun0/part2 * 2 13090 105137392+ 5 Extended
/dev/scsi/host1/bus0/target0/lun0/part5 2 13090 105137361 b Win95 FAT32
The "/dev/scsi" is your first clue since all usb storage devices run under scsi emulation. I have an extended partition with a FAT32 logical drive which is designated /dev/sda5(note the part5 at the end of the /dev/scsi line). I think you get the idea.

As for your camera, it looks like there's some proprietary interface between linux and the storage media. I wouldn't try writing to it if I were you.

Last edited by kilgoretrout; 11-23-2003 at 01:21 AM.
 
  


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
can't access usb drives emg SUSE / openSUSE 6 07-22-2005 09:50 PM
how can I access remote drives? spicychicken Linux - Software 3 12-13-2004 08:07 PM
FC2 can't access CDROM drives kipper Fedora 2 11-08-2004 02:44 PM
Cannot Access Disk Drives lgldsr Linux - Hardware 8 08-10-2004 08:18 PM
access to cd drives??? themightybuck Linux - Newbie 4 10-15-2002 03:26 AM


All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration