Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am having trouble mounting a flash card reader on my Mandrake 9.1. I followed the Susan Macchia's instructions at: http://linux-sxs.org/hardware/flashreaders.html and it worked (once only). After the first success, whenever I enter "mount /home/usb-flashcard" as su, I get "Input/output error" - the terminal prompt does not return, and after a while, the system freezes.
My fstab includes these lines:
none /mnt/cdrom2 supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-15,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/dev/sda1 /home/usb-flashcard auto noauto,user,umask=0,exec 0 0
Mounted devfs on /dev
Freeing unused kernel memory: 136k freed
Real Time Clock Driver v1.10e
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 15:32:56 Mar 14 2003
usb-uhci.c: High bandwidth mode enabled
PCI: Assigned IRQ 9 for device 00:1f.2
PCI: Setting latency timer of device 00:1f.2 to 64
usb-uhci.c: USB UHCI at I/O 0xa400, IRQ 9
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Found IRQ 9 for device 00:1f.4
PCI: Setting latency timer of device 00:1f.4 to 64
usb-uhci.c: USB UHCI at I/O 0xa000, IRQ 9
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
usbdevfs: remount parameter error
hub.c: new USB device 00:1f.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0xeaf/0x1) is not claimed by any active driver.
hub.c: new USB device 00:1f.4-2, assigned address 2
hub.c: USB hub found
hub.c: 4 ports detected
hub.c: new USB device 00:1f.4-2.3, assigned address 3
usb.c: USB device 3 (vend/prod 0x4a9/0x2206) 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: XH6747 Model: CF Rev: 2.1D
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
SCSI device sda: 15680 512-byte hdwr sectors (8 MB)
sda: Write Protect is off
/dev/scsi/host1/bus0/target0/lun0: p1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
usb.c: registered new driver usbscanner
scanner.c: 0.4.10:USB Scanner Driver
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,66), internal journal
Adding Swap: 987956k swap-space (priority -1)
scsi2 : SCSI host adapter emulation for IDE ATAPI devices
Vendor: ASUS Model: CRW-4816A Rev: 1.0
Type: CD-ROM ANSI SCSI revision: 02
hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.12
Attached scsi CD-ROM sr0 at scsi2, channel 0, id 0, lun 0
sr0: scsi3-mmc drive: 48x/48x writer cd/rw xa/form2 cdda tray
MSDOS FS: IO charset iso8859-15
MSDOS FS: Using codepage 850
EXT2-fs warning (device ide0(3,69)): ext2_read_super: mounting ext3 filesystem as ext2
8139too Fast Ethernet driver 0.9.26
PCI: Found IRQ 9 for device 02:0d.0
eth0: RealTek RTL8139 Fast Ethernet at 0xd2a3a000, 00:05:1c:9b:b3:56, IRQ 9
eth0: Identified 8139 chip type 'RTL-8139C'
inserting floppy driver for 2.4.21-0.13mdk
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 45e1.
PCI: Found IRQ 5 for device 02:0a.0
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
parport0: irq 7 detected
lp0: using parport0 (polling).
Splash status on console 0 changed to off
The card reader is sold by Dick Smith Electronics - I don't know the real manufacturer - it worked ok when I had SuSE 8.2 on the same computer.
This part appears to recognise the device and the 8MB card that is in it:
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: XH6747 Model: CF Rev: 2.1D
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
SCSI device sda: 15680 512-byte hdwr sectors (8 MB)
sda: Write Protect is off
/dev/scsi/host1/bus0/target0/lun0: p1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
[root@localhost john]# mount /dev/sda1 -t vfat /home/usb-flashcard
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
or too many mounted file systems
[root@localhost john]# mount /dev/sda1 -t fat /home/usb-flashcard
mount: fs type fat not supported by kernel
On the occassion that it worked, I could "mount /home/usb-flashcard" and "umount /home/usb-flashcard" several times. It was after I rebooted that it would not work again! So I believe I have all the modules, etc. I wonder if I have a conflict somewhere that I am unable to recognise.
This sounds like you don't have the modules 'fat' and 'vfat' loaded. Do they come up in the list when you 'lsmod'? If they don't just 'insmod fat; insmod vfat'.
If they are loaded it is possible that you are dealing with a problem in the usb-storage driver and that you have to go googling for another driver.
Because it worked during one session after I had been experimenting, (I don't know what it was that I did to achieve it), I don't think it is a driver problem,
Looking in the /dev directory, there was no sda1 block device, so I created one using: "mknod /dev/sda1 b 8 0" and also "mknod /dev/sda2 b 8 0". (Not sure if these were the correct major/minor numbers). I them attempted to mount each in turn with:
# mount -t vfat /dev/sda1 /home/usb-flashcard
mount: wrong fs type, bad option, bad superblock on /dev/sda1, or too many mounted file systems
I can read the card in Windows, which indicates it's a fat file system.
In my /dev directory, I now have:
/dev/scd0
/dev/sda
/dev/sda1 (made as above)
/dev/sda2 (made as above)
/dev/usb/scanner0
/dev/scsi/host1/bus0/target0/luno/cd
/dev/scsi/host2/bus0/target0/luno/disc (I have a scsi card without any device attached at present)
From all the postings, flashcard mounting seems to be a common ploblem. I will post the solution to my problem if/when I find it.
Oh.... It sounds like much the same problem I had...
Try removing the usb-storage driver and removing the /dev/sda you created yourself; then 'modprobe sd_mod' and 'modprobe usb-storage'.
This should create the /dev/sda1 when you plug in the reader.
Have you tried to plug the reader in with the card already in it?
Well, I did:
removed sda1 and sda2
modprobe -r usb-storage
modprobe sd_mod
modprobe usb-storage
This rewrote the line in fstab as: /dev/sda1 /mnt/removable auto user,kudzu,noauto,umask=0,exec 0 0
There was no sda1 in /dev
I rebooted, with a 32MB flashcard in the usb-connected reader, and the boot-up display recorded the detection of new hardware. When boot-up completed, now there was a sda1 in /dev. Next I did: # mount /mnt/removable and got:
/dev/sda1: Input/output error
Unplugging the reader restored the terminal prompt (I've learned that if I don't unplug it, the system locks up, and I have to resort to pressing hardware reset.
In addition to the above, fdisk -l sda does not give any info. In other words, fdisk -l sda returns only a prompt, unlike previous responses listed in previous postings.
Try making your fstab entry like this:'
/dev/sda1 /mnt/WHATEVER auto defaults,noauto,user,umask=022
I have also experienced problems when booting with the reader plugged in. But if I just boot up, put a flash card in the reader and then plug it in, everything works fine... I can't change cards without first unplugging the reader though.
I tried that, but the boot sequence said there was an error in line 14 in fstab, so I now have this:
/dev/sda1 //home/usb-flashcard auto user,noauto,umask=022,exec 0 0
On a fresh boot, if I try mounting using:
# mount -t vfat /dev/sda1 /home/usb-flashcard
mount: wrong fs type, bad option, bad superblock on /dev/sda1, or too many mounted file systems
and "fdisk -l /dev/sda" can't find anything.
Next, I deleted the /dev/sda1 (previously made using "mknod /dev/sda1 b 8 0"), and then:
# mknod /dev/sda1 b 8 1
Then I did:
# fdisk -l /dev/sda
Disk /dev/sda: 32 MB, 32112640 bytes
4 heads, 32 sectors/track, 490 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 489 31280 4 FAT16 <32M
and I could mount the card using:
# mount -t vfat /dev/sda1 /home/usb-flashcard
I unmounted it, and tried mounting it using:
# mount /home/usb-flashcard
mount: can't find /home/usb-flashcard in /etc/fstab or /etc/mtab
I could still mount/umount it using the long command. If I reboot, I'm back to the beginng again!
Sometimes, when fdisk can't find the /dev/sda the system locks up, and I have to press 'reset'
All this points to a problems with /dev/sda1 super block(?)
Incidentals:
I can only look at the card if I am in su mode.
I like using directory that is not in /mnt because of the delay checking the floppy and CD roms.
I removed the "kudzu" statement from my fstab because it caused confusions - on each boot, my mount directory would be deleted or created depending on whether the reader was connected; and I was not able the mount it anyway.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.