LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mounting usb card reader (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-usb-card-reader-344656/)

hylke 07-19-2005 09:56 AM

mounting usb card reader
 
Hello
I've just bought an usb card reader, but somehow I can't mout it.
What I did was:
Quote:

root@Hylke:/home/hylke# mount /dev/sda
mount: wrong fs type, bad option, bad superblock on /dev/sda,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Output from dmesg:
Quote:

hub.c: new USB device 00:10.4-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x402/0x5635) 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: USB2.0 Model: SMARTMEDIA/XD Rev:
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
sda: Unit Not Ready, sense:
Current 00:00: sns = 70 2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sda : READ CAPACITY failed.
sda : status = 1, message = 00, host = 0, driver = 08
Current sd00:00: sns = 70 2
ASC=3a ASCQ= 0
Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 0x00 0x00
sda : block size assumed to be 512 bytes, disk size 1GB.
sda: I/O error: dev 08:00, sector 0
I/O error: dev 08:00, sector 0
unable to read partition table
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
According to some tutorial on this website, I do have all the required modules.
Any idea what could be wrong?
Thanx Hylke

Lleb_KCir 07-19-2005 03:18 PM

did you edit your fstab, did you make the directory you want to mount the USB stick to?

Tinkster 07-19-2005 03:23 PM

You do have SOME media in the card-reader, right?
Without one there's nothing to mount...


Cheers,
Tink

hylke 07-20-2005 03:17 AM

Quote:

Originally posted by Lleb_KCir
did you edit your fstab, did you make the directory you want to mount the USB stick to?
Yes, I already had an entry for that because I put music on my mp3 player.

Quote:

You do have SOME media in the card-reader, right?
Without one there's nothing to mount...


Cheers,
Tink
Yup, but does it matter that I can put like 4 different cards in it?

And it does work, because I've tested it on my dads pc with Windows, and it worked fine.

Tinkster 07-20-2005 03:55 AM

Which modules are loaded?

hylke 07-20-2005 04:53 AM

Quote:

Originally posted by Tinkster
Which modules are loaded?
Quote:

hylke@Hylke:~$ lsmod
Module Size Used by Tainted: P
usb-storage 62336 0
snd-pcm-oss 36704 1
snd-mixer-oss 12152 0 [snd-pcm-oss]
nfsd 68112 8
uhci 24284 0 (unused)
ehci-hcd 17516 0 (unused)
usbcore 58860 1 [usb-storage uhci ehci-hcd]
snd-via82xx 12928 2
gameport 1420 0 [snd-via82xx]
snd-ac97-codec 52472 0 [snd-via82xx]
snd-pcm 54504 0 [snd-pcm-oss snd-via82xx snd-ac97-codec]
snd-timer 13412 0 [snd-pcm]
snd-mpu401-uart 3200 0 [snd-via82xx]
snd-rawmidi 12320 0 [snd-mpu401-uart]
snd-seq-device 3812 0 [snd-rawmidi]
snd 31268 1 [snd-pcm-oss snd-mixer-oss snd-via82xx snd-ac97-codec snd-pcm snd-timer snd-mpu401-uart snd-rawmidi snd-seq-device]
snd-page-alloc 4712 0 [snd-mixer-oss snd-via82xx snd-pcm snd-timer snd-rawmidi snd-seq-device snd]
soundcore 3396 4 [snd]
via-rhine 12368 1
mii 2272 0 [via-rhine]
crc32 2880 0 [via-rhine]
nvidia 3643836 6
ide-scsi 9392 0
apm 9452 2

tredegar 07-20-2005 08:39 AM

Ahhh, card readers that can handle multiple card types.....

Your kernel needs to be compiled for someting like "Handle multiple SCSI LUN's or ID's": This was an option (not selected by default) in my 2.4 kernel - which needed a recompile to enble this, but my 2.6 kernel already had this set.

Now, the different "slots" / "card types" come out as /dev/sda, sdb, sdc, sde etc. So the slot your card takes will not necessarily be /dev/sda.

The other thing to bear in mind is that you should plug your memory stick /mp3 player into the reader before you plug the usb cable into your PC, otherwise, well, it doesn't work.

Hope this helps.

Edit:
Having had a chance to get back to my linux box, the way to check if your (2.4x.x, not so sure about 2.6.x.x, but it is probably the same) kernel will support a milticard USB reader is to:

Open a terminal
Become root
cd /usr/src/linux
make menuconfig
Scroll down with the arrow key to SCSI Support----> and press Enter
On the next page, check that "Probe all LUNs on each SCSI device" is marked as either a module (in which case you'll have to make sure it is loaded) or built-in. If neither, you'll have to enable it, and recompile your kernel: This cannot be too difficult, because I managed it!

Meanwhile, exit from the menuconfig by pressing Escape.

HTH

oneandoneis2 07-20-2005 09:03 AM

Lastly, /dev/sda is the device, and you usually want to mount a partition: Try mounting "/dev/sda1"

hylke 07-20-2005 12:36 PM

Ok, thanx.I'Il recompile my kernel.

And about that sda1, if I would do that, mount would say something like:
invalid block device
I'Il let you know when it didn't worked out.
Hylke

Tinkster 07-20-2005 01:17 PM

You only need to recompile if there's no sd_mod and sg
Try the following:
modprobe sg
modprobe sd_mod

After that chances are that you can see ANY of the things
you plug into the reader.

If the modules above do load (namely the sd one) just do
an (still as root)
fdisk -l


Cheers,
Tink

hylke 07-21-2005 03:22 AM

Quote:

Originally posted by Tinkster
You only need to recompile if there's no sd_mod and sg
Try the following:
modprobe sg
modprobe sd_mod

After that chances are that you can see ANY of the things
you plug into the reader.

If the modules above do load (namely the sd one) just do
an (still as root)
fdisk -l


Cheers,
Tink

It's still not working after recompiling my kernel with the LUN thing enabled(and some other changes I always wanted to change but was to lazy to do so).
So I gues it is because I don't have the modules sg and sg_mod.
I've tried searching it using make menuconfig but I couldn't find what things I should enable(as module) in my kernel.
Could you please tell me?
Thanx Hylke

Tinkster 07-21-2005 01:10 PM

SCSI hard-drive support, and SCSI generic support.

hylke 07-22-2005 05:39 AM

Both SCSI disk support and SCSI generic support are built-it in my kernel(so not as a module).
So they should work right?
Does anyone have some other ideas to fix it?
Thanx Hylke

tredegar 07-22-2005 09:36 AM

Hylke,

You seem to have done everything right so far, so I am surprised that you have not got it working yet.

Now you have recompiled your kernel to include "Probe all SCSI LUNs", and made sure the appropriate modules are loaded or built-in, what do you see appear at the end of/var/log/messages when you plug your card into the cardreader, and then plug your card reader into the USB port (it is very important to do things in that order!)?

hylke 07-23-2005 04:47 AM

Ok.
So I first put my card in my card reader and then plugged my cardreader in my usb port.
After that I did:
cat /var/log/messages | cat
my output(I deleted some lines because they had nuthin' to do with it)
Quote:

Jul 23 11:43:00 Hylke kernel: hub.c: new USB device 00:10.4-6, assigned address 2
Jul 23 11:43:03 Hylke kernel: Initializing USB Mass Storage driver...
Jul 23 11:43:03 Hylke kernel: usb.c: registered new driver usb-storage
Jul 23 11:43:03 Hylke kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Jul 23 11:43:03 Hylke kernel: sda: Unit Not Ready, sense:
Jul 23 11:43:03 Hylke kernel: sda: I/O error: dev 08:00, sector 0
Jul 23 11:43:03 Hylke kernel: USB Mass Storage support registered.
Would it work better if I had the 2.6 kernel?
Hylke


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