LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 09-22-2003, 03:00 PM   #1
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Rep: Reputation: 30
cardreader troubles


Hi,

I ran in some trouble starting to activate a card reader.

I have an asus portable L300D with amd 1800+
Dual boot Redhat 9 and winme. Reader SCANDISK imagemate 2 slots usb.

For now, I already mounted an externel usb drive, a 1394 la cie writer, the windows c-drive all without trouble.

When I tried to mount the SCANDISK reader (2 slots), I get the message:

mount: wrong fs type, bad option, bad superblock on /dev/sda,
or too many mounted file systems


with dmesg |more I see the folowing:

SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: SanDisk Model: ImageMate CF-SM Rev: 0100
Type: Direct-Access ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4
USB Mass Storage support registered.


In the Hardware Browser under drives I have the following entries:
/dev/hda
hda4 (extended)
hda5 linux swap
hda1 fat 32 (windows)
hda2 ext3 (boot I think)
hda3 ext3 (redhat)
/dev/sda

I find it confusing, that there is only 1 entry for the
card reader. After all you can put 2 different cards in it.

in fstab I have the folowing entries:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda1 /mnt/win_c vfat auto,quiet 0 0
/dev/sda1 /mnt/usb1p vfat noauto,user 0 0
/dev/sda5 /mnt/usb2p vfat noauto,user 0 0
/dev/sda /mnt/scandisk vfat noauto,user 0 0

(sda1 and sda2 are usb drives not connected at the time I am trying to get things to work)

At the moment that I get the error only de linux drives and the window drive is mounted. Flop,cd,1394 and usb are not mounted!

Then I saw the message from master C
Type (as root):
tail -f /var/log/messages
Plug in the device and watch for information regarding the 'sd' that it becomes. Likely it will be /dev/sda1 From there:
CTRL + C
to stop tail, and then:
mount /dev/sda1 /mnt/sdcard

I did so and got the next lines :
Sep 22 21:46:27 localhost kernel: sda: Write Protect is off
Sep 22 21:46:27 localhost kernel: sda: I/O error: dev 08:00, sector 0
Sep 22 21:46:27 localhost kernel: I/O error: dev 08:00, sector 0
Sep 22 21:46:27 localhost kernel: unable to read partition table
Sep 22 21:46:27 localhost devlabel: devlabel service started/restarted


Why I'm getting this errors and how to make things work?
I checked reader and card on windows. No problem.

Any help would be apriciated.

CB
 
Old 09-22-2003, 07:46 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
The USB mass-storage module just doesn't support the device, or at least... not the version you have. RedHat 9.0? 2.4.20? You can hand compile a 2.4.22, but RedHat doesn't add functionality, especially not device drivers, when they put out kernel fixes. Also, I've known the USB subsystem to be able to be patched in.

Who knows, back when 2.4.19 had been out for two days, I plugged in my sandisk reader (just CF), 2.4.18 horked all over it, 2.4.19 read it fine.

Cheers,

Finegan
 
Old 09-23-2003, 11:21 AM   #3
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Original Poster
Rep: Reputation: 30
Unhappy

Yes 2.4.20

Ok I'll first try another, and if nothing works, I still have a flop, where you can put the smartcard in................................. but its very slow...

Thanks anyway.

CB
 
Old 09-24-2003, 05:40 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Let me copy most of your post here and answer things as I go.

When I tried to mount the SCANDISK reader (2 slots),
***** 2 slot card reader is know as a multi-lun device. Requires multi-lun support in the kernel.

***** With the card reader plugged in. What does ' cat /proc/scsi/scsi ' show?

---------------------------------------------------------------
I get the message:

mount: wrong fs type, bad option, bad superblock on /dev/sda,
or too many mounted file systems

***** This is where kudzu messes up, in your /etc/fstab it should have read /dev/sdb1 or something. Not /dev/sda . /dev/sda is the drive itself. /dev/sda1 is a partition on the drive.

***** Things to try also.
Did you have cards plugged in both slots?

---------------------------------------------------------
**** All this below changes as devices are plugged in and what order + kudzu.

In the Hardware Browser under drives I have the following entries:
/dev/hda
hda4 (extended)
hda5 linux swap
hda1 fat 32 (windows)
hda2 ext3 (boot I think)
hda3 ext3 (redhat)
/dev/sda

---------------------------------------------------------------------------
I find it confusing, that there is only 1 entry for the
card reader. After all you can put 2 different cards in it.

***** Multi-lun support is required here.

---------------------------------------------------------------------
***** If kudzu is running then fstab is always going to be changing. The only way around it is to turn kudzu off ' chkconfig -level 345 kudzu off ' Once kudzu is turned off then you can write your own /etc/fstab the way you want it. With kudzu off it will not check for new hardware at startup anymore.

------------------------------------------------------------------
in fstab I have the folowing entries:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda1 /mnt/win_c vfat auto,quiet 0 0
/dev/sda1 /mnt/usb1p vfat noauto,user 0 0
/dev/sda5 /mnt/usb2p vfat noauto,user 0 0
/dev/sda /mnt/scandisk vfat noauto,user 0 0

(sda1 and sda2 are usb drives not connected at the time I am trying to get things to work)


****** This is going to get confusing, please bear with me.

/dev/sda is a single device /dev/sda1 is one partition on the device, like sda2 will be second partition on the same device.

There is no easy way to make a device retain a /dev/sd* marker unless you plugin the all devices in the same order. If you make your /etc/fstab like this.

/dev/sda1 /mnt/usb1 auto noauto,user 0 0
/dev/sdb1 /mnt/usb2 auto noauto,user 0 0
/dev/sdc1 /mnt/usb3 auto noauto,user 0 0

As you plug in each device you will have to mount it manually. You could add the your other option if you had multiple partitions on a device like so. I wouldn't using an external drive with more than one partition. Make it one and make it easy to use.

/dev/sda1 /mnt/usb1 auto noauto,user 0 0
/dev/sda2 /mnt/usbb1 auto noauto,user 0 0
/dev/sdb1 /mnt/usb2 auto noauto,user 0 0
/dev/sdb2 /mnt/usbb2 auto noauto,user 0 0
/dev/sdc1 /mnt/usb3 auto noauto,user 0 0
/dev/sdc2 /mnt/usbc2 auto noauto,user 0 0

So if you plugged in a single partition device then you plug in a multiple partition device it can be easily mounted.

Of course you don't need anything in the /etc/fstab and just issue mount command of what you want when you want it.


Now for multi-lun devices. Look at how my multi card usb reader is showed at the bottom of my ' cat /proc/scsi/scsi ' It is the YE-Data device it says it is attached to scsi 2 channel 0 id 0 lun 0, then each addition card slot is increment by 1. As you can see my card reader has four slots. If you do a ' cat /proc/scsi/scsi and it shows both slots in the cardreader then multi-lun support is there. If not you will need to recompile the kernel and add it.

or

Some devices do not detect right even with multi-lun support. You can issue this command and see if the second slot comes up with ' cat /proc/scsi/scsi ' Issue this comand ' echo "scsi add-single-device 2 0 0 1" > /proc/scsi/scsi ' Where the 2 is what channel your card reader shows in ' cat /proc/scsi/scsi ' , 0 0 is fine, 1 is the next lun. 0 will always be the first lun. Once you can see all luns then to mount the slots is as following. ' mount /dev/sda1 /mnt/usb1 ' , second slot ' mount /dev/sdb1 /mnt/usb2 ' , and so on.

I know this is very strange to read, but there other post I have made on this site related to the same subjects. Look them up and maybe they say it better.

Good luck
Brian1


[brian@lcomp18 brian]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: DDYS-T36950M Rev: SC4D
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi1 Channel: 00 Id: 03 Lun: 00
Vendor: PLEXTOR Model: CD-ROM PX-40TW Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 04 Lun: 00
Vendor: YAMAHA Model: CRW-F1S Rev: 1.0d
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 05 Lun: 00
Vendor: MATSHITA Model: DVD-RAM LF-D200 Rev: A120
Type: CD-ROM ANSI SCSI revision: 04
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: Y-E DATA Model: CF Card Reader Rev: 1.03
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 01
Vendor: Y-E DATA Model: SM Card Reader Rev: 1.03
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 02
Vendor: Y-E DATA Model: MS Card Reader Rev: 1.03
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 03
Vendor: Y-E DATA Model: SD Card Reader Rev: 1.03
Type: Direct-Access ANSI SCSI revision: 02
[brian@lcomp18 brian]#
 
Old 09-25-2003, 12:44 PM   #5
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Original Poster
Rep: Reputation: 30
Thank you, I have made a copy of the story and I'll take some time (and my books) to see if I can get the job done. :-)

Your response gave me some starting points to try it again.

Thanks for the explanation.

CB
 
Old 10-14-2003, 02:51 PM   #6
ksun
Member
 
Registered: Sep 2003
Posts: 52

Rep: Reputation: 15
So for dummies like me (not entirely newbie, but dumb when it comes to the kernel) how do I install multi lun support in, say RH9?

I assume it's not as easy as "modprobe mutli_lun" now is it?
 
Old 10-14-2003, 04:39 PM   #7
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by ksun
So for dummies like me (not entirely newbie, but dumb when it comes to the kernel) how do I install multi lun support in, say RH9?

I assume it's not as easy as "modprobe mutli_lun" now is it?
After some hours searching I found the following :
============================================
compile your kernel with probe all luns on each scsi device =y when you use a multi-slot cardreader.

Was hard to find out for me, so I want to share the knowledge.
(Redhat and Mandrake precompiled Kernels dont have this set and must be reconfigured)
==============================================

So we have to recompile.........................................
Does anybody know a good book about that ?????
Or a good manual ?????
All sugestions are welcome.

CB
 
  


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
fstab and cardreader - help slewis1972 Linux - Software 4 02-03-2005 12:32 PM
mounting cardreader jpostma Linux - Hardware 0 06-19-2004 04:01 PM
Cardreader Kaninchen Linux - Hardware 2 05-26-2004 07:33 AM
USB Cardreader CF RW Tomasfuego Linux - Hardware 9 05-11-2004 03:55 PM
usb cardreader godders48 Mandriva 5 10-04-2003 09:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

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