LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 10-11-2003, 07:50 AM   #1
cromwell
LQ Newbie
 
Registered: Oct 2003
Location: Munich, Bavaria
Distribution: SuSE 8.2, Kernel 2.4.20
Posts: 4

Rep: Reputation: 0
USB CF Card Reader/Write not a valid block device


Hi there,

I looked around in several support forums and googled a while, but didn't get a solution for my problem:

- I want to mount a 6in1 Card Reader Writer (Hama 00046944) as an USB
mass storage device
- When I want to mount the card reader with the fstab entry:
/dev/sda1 /media/cfread vfat defaults,user 0 0
at the exisiting mount point /media/cfreader
I get "/dev/sda1 is not a valid block device"

(BTW, I tried ths with sdb, sdc and sdd as well)

I want to know, if there is any solution to this problem, or if I should simply give up. I really appreciate any help, even if it says "don't buy cheap card readers".

I can provide the following information on my fruitless efforts:
Linux version: SuSe 8.2, Kernel 2.4.20

Messages from the console:
Oct 11 12:25:52 OFNsOWN kernel: usb-uhci.c: interrupt, status 3, frame# 949
Oct 11 12:25:52 OFNsOWN kernel: sda : READ CAPACITY failed.
Oct 11 12:25:52 OFNsOWN kernel: sda : status = 1, message = 00, host = 0, driver = 08
Oct 11 12:25:52 OFNsOWN kernel: Info fld=0x0, Current sd00:00: sns = f0 2
Oct 11 12:25:52 OFNsOWN kernel: ASC=3a ASCQ= 0
Oct 11 12:25:52 OFNsOWN kernel: Raw sense data:0xf0 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
Oct 11 12:25:52 OFNsOWN kernel: sda : block size assumed to be 512 bytes, disk size 1GB.
Oct 11 12:25:52 OFNsOWN kernel: sda: test WP failed, assume Write Enabled
Oct 11 12:25:52 OFNsOWN kernel: I/O error: dev 08:00, sector 2
Oct 11 12:25:52 OFNsOWN kernel: I/O error: dev 08:00, sector 0
Oct 11 12:25:52 OFNsOWN kernel: unable to read partition table
Oct 11 12:25:52 OFNsOWN kernel: I/O error: dev 08:00, sector 0

usbview shows for mass storage the following entry:
Mass Storage Device
Manufacturer: Generic
Serial Number: 9206051
Speed: 12Mb/s (full)
USB Version: 1.10
Device Class: 00(>ifc )
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 8
Number of Configurations: 1
Vendor Id: 058f
Product Id: 9360
Revision Number: 1.00

Config Number: 1
Number of Interfaces: 1
Attributes: 80
MaxPower Needed: 100mA

Interface Number: 0
Name: usb-storage
Alternate Number: 0
Class: 08(stor.)
Sub Class: 6
Protocol: 50
Number of Endpoints: 2

Endpoint Address: 01
Direction: out
Attribute: 2
Type: Bulk
Max Packet Size: 64
Interval: 0ms

Endpoint Address: 82
Direction: in
Attribute: 2
Type: Bulk
Max Packet Size: 64
Interval: 0ms

/proc/usb/devices shows:

C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 98mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=hid
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=10ms
T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=058f ProdID=9360 Rev= 1.00
S: Manufacturer=Generic
S: Product=Mass Storage Device
S: SerialNumber=9206051

/proc/devices shows:
Character devices:
1 mem
2 pty
3 ttyp
4 ttyS
5 cua
6 lp
7 vcs
10 misc
13 input
14 sound
21 sg
108 ppp
116 alsa
128 ptm
136 pts
162 raw
180 usb
203 cpu/cpuid
226 drm

Block devices:
2 fd
3 ide0
7 loop
8 sd
11 sr
22 ide1
65 sd
66 sd

sg_utils -i shows:
dev/sg0: scsi0 channel=0 id=0 lun=0 [em] type=5
HL-DT-ST CD-RW GCE-8400B 1.00 [wide=0 sync=0 cmdq=0 sftre=0 pq=0x0]
/dev/sg1: scsi1 channel=0 id=0 lun=0 [em] type=0
Generic USB SD Reader 1.00 [wide=0 sync=0 cmdq=0 sftre=0 pq=0x0]

sg_map shows:
/dev/sg0 /dev/scd0
/dev/sg1 /dev/sda

I hope I included every necessary information.

Thanks for all the help
Oliver F. Nandico
--
--------------------+---------------------------------------------------
Oliver F. Nandico |eMail: news at O-F-N dot de
Josephsburgstr. 55B |Phone: +49 89 68008586
81673 München |
Germany |
 
Old 10-11-2003, 11:13 AM   #2
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
Try adding the following line in your fstab:
none /proc/bus/usb usbdevfs defaults 0 0

I stumbled across that while googling for something else yesterday. I don't actually have a USB card reader, but I intend to buy one (for SmartMedia cards). Looking forward to your posts with interest.
 
Old 10-11-2003, 11:37 AM   #3
cromwell
LQ Newbie
 
Registered: Oct 2003
Location: Munich, Bavaria
Distribution: SuSE 8.2, Kernel 2.4.20
Posts: 4

Original Poster
Rep: Reputation: 0
Firstly, I want to thank you for the answer.

Well, the usbdevfs file system is the file system showing the usb devices in the proc file system.
You need to mount it to use usbview for example (and of course I did mount it)

Unfortunately this has nothing to do with the actual device (the scsi removable disk device)
mounted (at least I try) on top of the usb mass storage device.

So, this hasn't solved the problem. I think I saw a similar misleading post somewhere yesterday.
 
Old 10-11-2003, 12:04 PM   #4
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
Thanks for the info on usbdevfs.

Did you try mounting from /dev/sda rather than /dev/sda1? What about mounting directly from /dev/sg1?
 
Old 10-12-2003, 11:16 AM   #5
cromwell
LQ Newbie
 
Registered: Oct 2003
Location: Munich, Bavaria
Distribution: SuSE 8.2, Kernel 2.4.20
Posts: 4

Original Poster
Rep: Reputation: 0
Lightbulb Solved: USB CF Card Reader/Write not a valid block device

My problem with the CF Card Reader is solved:

The trick was to configure the kerner opt "Probe all LUNS" for SCSI support.

The Kernel Configuration for SCSI
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_SD_EXTRA_DEVS=40
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=y
# CONFIG_BLK_DEV_SR_VENDOR is not set
CONFIG_SR_EXTRA_DEVS=32
CONFIG_CHR_DEV_SCH=y
CONFIG_CHR_DEV_SG=y

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_DEBUG_QUEUES=y
CONFIG_SCSI_MULTI_LUN=y <--- This is the crucial one
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y

Just to be complete my USB configuration flags:
#
# USB support
#
CONFIG_USB=y
CONFIG_USB_DEBUG=y

#
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_UHCI=y
# CONFIG_USB_UHCI_ALT is not set
CONFIG_USB_OHCI=y

#
# USB Device Class drivers
#
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_BLUETOOTH is not set
# CONFIG_USB_MIDI is not set
CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_DEBUG=y
CONFIG_USB_STORAGE_DATAFAB=y
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
CONFIG_USB_STORAGE_HP8200e=y
CONFIG_USB_STORAGE_SDDR09=y
CONFIG_USB_STORAGE_SDDR55=y
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_ACM is not set
# CONFIG_USB_SPEEDTOUCH is not set
# CONFIG_USB_PRINTER is not set

The sg_scan -i shows the following:
/dev/sg0: scsi0 channel=0 id=0 lun=0 [em] type=5
HL-DT-ST CD-RW GCE-8400B 1.00 [wide=0 sync=0 cmdq=0 sftre=0 pq=0x0]
/dev/sg1: scsi1 channel=0 id=0 lun=0 [em] type=0
Generic USB SD Reader 1.00 [wide=0 sync=0 cmdq=0 sftre=0 pq=0x0]
/dev/sg2: scsi1 channel=0 id=0 lun=1 [em] type=0
Generic USB CF Reader 1.01 [wide=0 sync=0 cmdq=0 sftre=0 pq=0x0]
/dev/sg3: scsi1 channel=0 id=0 lun=2 [em] type=0
Generic USB SM Reader 1.02 [wide=0 sync=0 cmdq=0 sftre=0 pq=0x0]
/dev/sg4: scsi1 channel=0 id=0 lun=3 [em] type=0
Generic USB MS Reader 1.03 [wide=0 sync=0 cmdq=0 sftre=0 pq=0x0]

with the CF Reader of the 4in1 CardReader showing up as the third device /dev/sg2

sg_map shows:
/dev/sg0 /dev/scd0
/dev/sg1 /dev/sda
/dev/sg2 /dev/sdb
/dev/sg3 /dev/sdc
/dev/sg4 /dev/sdd

The console shows no the follwing messages:
Oct 12 15:57:52 OFNsOWN kernel: sda : READ CAPACITY failed.
Oct 12 15:57:52 OFNsOWN kernel: sda : status = 1, message = 00, host = 0, driver = 08
Oct 12 15:57:52 OFNsOWN kernel: Info fld=0x0, Current sd00:00: sense key Not Ready
Oct 12 15:57:52 OFNsOWN kernel: Additional sense indicates Medium not present
Oct 12 15:57:52 OFNsOWN kernel: sda : block size assumed to be 512 bytes, disk size 1GB.
Oct 12 15:57:52 OFNsOWN kernel: sda: test WP failed, assume Write Enabled
Oct 12 15:57:52 OFNsOWN kernel: I/O error: dev 08:00, sector 0
Oct 12 15:57:52 OFNsOWN kernel: unable to read partition table
Oct 12 15:57:52 OFNsOWN kernel: sdc : READ CAPACITY failed.
Oct 12 15:57:52 OFNsOWN kernel: sdc : status = 1, message = 00, host = 0, driver = 08
Oct 12 15:57:52 OFNsOWN kernel: Info fld=0x0, Current sd00:00: sense key Not Ready
Oct 12 15:57:52 OFNsOWN kernel: Additional sense indicates Medium not present
Oct 12 15:57:52 OFNsOWN kernel: sdc : block size assumed to be 512 bytes, disk size 1GB.
Oct 12 15:57:52 OFNsOWN kernel: sdc: test WP failed, assume Write Enabled
Oct 12 15:57:52 OFNsOWN kernel: I/O error: dev 08:20, sector 0
Oct 12 15:57:52 OFNsOWN kernel: unable to read partition table
Oct 12 15:57:52 OFNsOWN kernel: sdd : READ CAPACITY failed.
Oct 12 15:57:52 OFNsOWN kernel: sdd : status = 1, message = 00, host = 0, driver = 08
Oct 12 15:57:52 OFNsOWN kernel: Info fld=0x0, Current sd00:00: sense key Not Ready
Oct 12 15:57:52 OFNsOWN kernel: Additional sense indicates Medium not present
Oct 12 15:57:52 OFNsOWN kernel: sdd : block size assumed to be 512 bytes, disk size 1GB.
Oct 12 15:57:52 OFNsOWN kernel: sdd: test WP failed, assume Write Enabled
Oct 12 15:57:52 OFNsOWN kernel: I/O error: dev 08:30, sector 0
Oct 12 15:57:52 OFNsOWN kernel: unable to read partition table

!!! Note: The messages show errors on /dev/sda /dev/sdc and /dev/sdd, which is
!!! ok, as no cards sit in these slots.
!!! But: No error messages on /sdb (Success!!!)

So now you know that the CF Card Reader has to be configured as /dev/sdb1

Mount -t vfat /dev/sdb1 /media/cfread (<- my mountpoint) does the rest.

I hope everybody else running into the same problems will profit from this information

O.F.N.
 
Old 10-12-2003, 05:02 PM   #6
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
Thanks!
 
Old 12-10-2003, 11:38 AM   #7
dhbiker
Member
 
Registered: Dec 2003
Location: Bristol
Distribution: Slackware 10.2
Posts: 196

Rep: Reputation: 30
Hi there,
I'm having the same problem with a USB CF storage device (SanDisc Cruzer 256Mb). Could you run me through how to set up the kernel so it thinks sda is a valid block device, which it happily did before I plugged that darned stick in
Thanks
Rob
 
Old 12-27-2003, 09:32 PM   #8
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
I just picked up one these newfangled USB 6-in-1 multi-card readers from Acomdata for CompactFlash, SmartMedia / X-Media, SD/MMC and Sony Memorystick. You can actually detect and mount these devices without having to recompile the kernel.

To detect it, add the following kernel option to your /etc/lilo.conf: append="max_scsi_luns=6". This enables multi-LUN probing on the SCSI devices without having to recompile the kernel with the "Probe all LUNS" SCSI option.

To mount SmartMedia, your kernel needs the SDDR09 and SDDR55 usb storage modules compiled in; both Knoppix and Slackware enable these by default. Check your /usr/src/linux/.config or /boot/config file for CONFIG_USB_STORAGE_SDDR09=y and CONFIG_USB_STORAGE_SDDR55=y.

Mount as follows: mount -t vfat /dev/sdc1 /mnt/sdc1 (the SmartMedia device is detected on my system as /dev/sdc).

I've posted more details at www.knoppix.net.

Last edited by spurious; 12-27-2003 at 09:59 PM.
 
Old 01-04-2004, 03:20 PM   #9
dhbiker
Member
 
Registered: Dec 2003
Location: Bristol
Distribution: Slackware 10.2
Posts: 196

Rep: Reputation: 30
Hi Spurious,
Sounds promising, I've looked in .config and SDDR09 and SDDR55 are both enabled, I'm not using lilo though, I'm using grub, where should I put the kernel option (append="max_scsi_luns_6")? grub.conf doesn't look to me like the right place to put it below is what my grub.conf looks like:-

root (hd0,4)
install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) /boot/grub/stage2 0x8000 (hd0,4)/boot/grub/menu.lst
quit

should I put the line into menu.lst instead? That is the file that contains things like noapic etc. ?
 
Old 01-06-2004, 02:58 AM   #10
Defaultman
LQ Newbie
 
Registered: Jan 2004
Posts: 11

Rep: Reputation: 0
Quote:
Originally posted by dhbiker
where should I put the kernel option (append="max_scsi_luns_6")? grub.conf doesn't look to me like the right place to put it below is what my grub.conf looks like:-

root (hd0,4)
install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) /boot/grub/stage2 0x8000 (hd0,4)/boot/grub/menu.lst
quit

should I put the line into menu.lst instead? That is the file that contains things like noapic etc. ?
Append the "max_scsi_luns=6" to the kernel line. I have it like this in my grub.conf:
Code:
kernel /boot/vmlinuz-2.6.0-1 ro root=/dev/hda1 LABEL=/ rhgb hdg=noprobe max_scsi_luns=6
I'm using Fedora core 1 with 2.6.0 kernel btw.

However I want to jump this thread because I have similar setup, Soyo 6-in-1 reader connected to USB which I can't get to work.

I too have SDDR09 and 55 enabled and I just tried the max_scsi_luns kernel paramters but I still can't see the CF drive or mount it. My dsmesg says:

Code:
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: SOYO      Model: CF/MD             Rev: 0204
  Type:   Direct-Access                      ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
drivers/usb/core/usb.c: registered new driver usb-storage
USB Mass Storage support registered.
It doesn't assign it to any device as far as I can tell.

I have these modules loaded (snipped the ones that could matter):
Code:
usb_storage            55200  0
scsi_mod              102840  2 sg,usb_storage
hid                    22912  0
ehci_hcd               21060  0
ohci_hcd               15616  0
usbcore                93852  6 usb_storage,hid,ehci_hcd,ohci_hcd
Is there some scsi module I still require or perhaps something for the modprobe.conf? In my old 2.4 kernel I could mount the CF drive from sda1.

This is the output when I do sg_scan and try to mount the device it suggests:

Code:
[root@localhost linux-2.6.0]# sg_scan -i
/dev/sg0: scsi0 channel=0 id=0 lun=0 [em]  type=0
    SOYO      CF/MD             0204 [wide=0 sync=0 cmdq=0 sftre=0 pq=0x0]
[root@localhost linux-2.6.0]# mount -t vfat /dev/sg0 /mnt/usb/
mount: /dev/sg0 is not a block device
[root@localhost linux-2.6.0]#

Last edited by Defaultman; 01-06-2004 at 03:17 AM.
 
Old 01-06-2004, 10:11 PM   #11
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
I've only played with the 2.6.0-test11 kernel on my Knoppix box, but I did compile the "Probe all LUNS" under SCSI options (ie. CONFIG_SCSI_MULTI_LUN=y in your .config). This worked.

If the "max_scsi_luns" kernel option in lilo/grub doesn't work with kernel 2.6, then I guess we'll have to recompile the 2.6 kernel.
 
  


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
Valid block device for USB memory stick on SUSE 9.2 amala Linux - Hardware 5 12-24-2004 12:20 PM
mount-problem usb harddisk: not a valid block device micha Mandriva 2 11-21-2004 10:29 AM
USB Pen Drive, /dev/sda1 is not a valid block device Aeiri Linux - Hardware 3 08-13-2004 10:32 AM
SDB1 IS NOT A VALID BLOCK DEVICE - CF reader help woodo Linux - Software 12 07-07-2004 09:52 AM
usb thumbdrive not valid block device cjdock Linux - Hardware 1 02-07-2004 04:11 AM


All times are GMT -5. The time now is 06:40 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