LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-30-2003, 07:01 AM   #1
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Rep: Reputation: 31
Flashcard mount problem


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

and these are the outputs of diagnosis.

lsmod shows:
usb-storage 72952 0
usb-uhci 24652 0 (unused)
usbcore 72992 1 [scanner usb-storage usb-uhci]
scsi_mod 91796 6 [sr_mod ide-scsi scsimon usb-storage sd_mod advansys]

cdrecord -scanbus
scsibus1:
1,0,0 100) 'XH6747 ' ' CF' '2.1D' Removable Disk
1,1,0 101) *
1,2,0 102) *
1,3,0 103) *
1,4,0 104) *
1,5,0 105) *
1,6,0 106) *
1,7,0 107) *
scsibus2:
2,0,0 200) 'ASUS ' 'CRW-4816A ' '1.0 ' Removable CD-ROM
2,1,0 201) *
2,2,0 202) *
2,3,0 203) *
2,4,0 204) *
2,5,0 205) *
2,6,0 206) *
2,7,0 207) *

cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: XH6747 Model: CF Rev: 2.1D
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: ASUS Model: CRW-4816A Rev: 1.0
Type: CD-ROM ANSI SCSI revision: 02

xcdroast setup menu shows:

Removable Disk Bus,Id [1,0]
CD-ROM Bus,Id [2,0] ASUS CRW-4816A
CD-ROM Bus,Id [ATAPI:0,0] ASUS DVD-ROM
CD-ROM Bus,Id [ATAPI:1,0] ASUS CRW-4816A

eroaster setup shows:
Detect Recorder: /dev/scd0 Channel: 2 IO: 0 Lun: 0

Can someone tell me what I'm doing wrong?
 
Old 08-30-2003, 07:23 AM   #2
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
What model and manufacturer is the card reader?

I use defaults,noauto,user,umask=022 in my fstab... This sounds like a driver problem. what does 'dmesg' (type dmesg in a console) give you?
 
Old 08-30-2003, 07:45 AM   #3
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
These are the lines towards the end of dmesg:

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.
 
Old 08-30-2003, 07:59 AM   #4
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
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.
 
Old 08-30-2003, 11:04 AM   #5
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
what happens if you do 'mount -t fat /dev/sda1 /home/usb-falshcard'...

Check whether you have the modules 'fat' and 'vfat' loaded, you need these since flashcards use the windows/dos fat32 filesystem.

greetings, kamstrup
 
Old 08-30-2003, 05:04 PM   #6
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
[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.

Thank you for your interest.
 
Old 08-31-2003, 06:02 AM   #7
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
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.

Else you might be able to get more info at: http://www.qbik.ch/usb/devices/

good luck, kamstrup

PS: remember to post a solution if you get it to work...
 
Old 08-31-2003, 07:15 PM   #8
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
Thanks kamstrup for your suggestions. lsmod shows:

vfat 11820 1 (autoclean)
fat 37944 0 (autoclean) [msdos vfat]

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.

Cheers
 
Old 08-31-2003, 08:26 PM   #9
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
I had an 8MB card in the reader, and "fdisk -l /dev/sda" returned:

Disk /dev/sda: 8 MB, 8028160 bytes
2 heads, 32 sectors/track, 245 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 244 7792 1 FAT12

Doing a "google" on FAT12 revealed:

FAT12 Floppies and very small hard disk volumes
FAT16 Small to moderate- sized hard disk volumes
FAT32 Medium-sized to very large hard disk volumes

so I rebooted with a 32MB flashcard in the reader, and did "fdisk -l /dev/sda" again:

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

Bingo, I says to myself, BUT:

# 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
 
Old 09-01-2003, 03:12 AM   #10
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
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?

greetings, kamstrup
 
Old 09-01-2003, 03:49 AM   #11
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
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.
 
Old 09-01-2003, 04:06 AM   #12
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
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.
 
Old 09-01-2003, 08:00 AM   #13
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
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'll be back, kamstrup
 
Old 09-01-2003, 06:23 PM   #14
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 408

Original Poster
Rep: Reputation: 31
Hi kamstrup

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.
 
Old 09-02-2003, 03:54 AM   #15
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
This sounds really odd to me...

Do you have "//home/usb-flashcard" with the double "/" in you fstab or was that a copy-paste mistake?

Is the cf-card/reader working at all? - have you tried it in other OS'es or on other computers where it worked?

What is the fabricant and model name of the reader?

greetings, kamstrup
 
  


Reply



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
Mount problem - device already mounted or mount point busy zahoo Linux - General 7 08-28-2009 05:02 PM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
mount:not a directory. Suse dvd mount problem tzanis Linux - General 8 11-06-2005 11:30 AM
weird kernel problem and fs mount problem intense Slackware 5 03-16-2004 12:36 PM
before I take this flashcard reader back to the store GOBY Linux - Hardware 5 03-10-2003 07:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:32 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
Open Source Consulting | Domain Registration