LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-18-2004, 10:42 AM   #1
fatherg
Member
 
Registered: Mar 2004
Posts: 55

Rep: Reputation: 15
smart media card support


Hi,

My specs are as follows:
Freshly installed Slackware 10
Celeron 2.8Ghz
768MB DDR

I have a USB card reader that supports 4 types of cards, including smart media which is what I'm intending to use it for. I recompiled my kernel for the first time and there where no problems surprisingly and in the x-based gui for customizing the kernel I did enable the card reader... at this point when I turn my computer on w/ the card reader plugged in nothing happens. I guess I figured once I put in support for the device it would automatically show up plug&play style... what do I need to do get this device to show up?

Thanks!
G
 
Old 12-19-2004, 02:20 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.
Plug it in and look into the kernel logs (/var/log/messages). If everything's set correctly, you should see messages about detecting new device. Can you see them?
 
Old 12-19-2004, 05:30 PM   #3
Nightfrost
Member
 
Registered: Jun 2004
Location: Sweden
Distribution: ArchLinux
Posts: 201

Rep: Reputation: 30
have you checked dmesg to see if the kernel detects it?

Also, I think you might need some other stuff built into your kernel (or as modules) such as ECHI, UHCI/OHCI, you should probably also have "probe all luns on each...." under scsi device support enabled...
 
Old 12-20-2004, 10:25 AM   #4
fatherg
Member
 
Registered: Mar 2004
Posts: 55

Original Poster
Rep: Reputation: 15
I tried this:

fatherg@darkstar:~$ su
Password:
root@darkstar:/home/fatherg# /var/log/messages
bash: /var/log/messages: Permission denied

root@darkstar:/home/fatherg# dmesg | grep usb.c:
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb.c: new USB bus registered, assigned bus number 1
usb.c: new USB bus registered, assigned bus number 2
usb.c: new USB bus registered, assigned bus number 3
usb.c: new USB bus registered, assigned bus number 4
usb.c: USB device 2 (vend/prod 0x7cc/0x340) is not claimed by any active driver.
usb.c: USB device 2 (vend/prod 0x46d/0xc016) is not claimed by any active driver.
usb.c: registered new driver usb-storage
usb.c: registered new driver usbmouse
usb.c: registered new driver hiddev
usb.c: registered new driver hid

root@darkstar:/home/fatherg#
root@darkstar:/home/fatherg# dmesg | grep OHCI
usb-ohci.c: USB OHCI at membase 0xf0e7a000, IRQ 9
usb-ohci.c: USB OHCI at membase 0xf0e7c000, IRQ 5
usb-ohci.c: USB OHCI at membase 0xf0e7e000, IRQ 10
ohci1394_0: OHCI-1394 1.0 (PCI): IRQ=[9] MMIO=[ef000000-ef0007ff] Max Packet=[2048]

When I tried to grep UHCI and ECHI there was nothing found. Does anything look f'd up? I'm going to look at recompiling my kernel here in a few minutes.

Last edited by fatherg; 12-20-2004 at 10:28 AM.
 
Old 12-20-2004, 10:32 AM   #5
Nightfrost
Member
 
Registered: Jun 2004
Location: Sweden
Distribution: ArchLinux
Posts: 201

Rep: Reputation: 30
Not sure what to make out from your dmesg; it might be alright. issue this command in shell

Code:
tail -s 3 -f /var/log/messages
it will show you everything that gets added to messages with 3 second-intervals. Plug in your card reader and keep your eye on the screen. it should tell you what you need.

Also try, fdisk -l to see what storage devices you have.
 
Old 12-20-2004, 12:12 PM   #6
fatherg
Member
 
Registered: Mar 2004
Posts: 55

Original Poster
Rep: Reputation: 15
root@darkstar:/home/fatherg# fdisk -l

Disk /dev/hdc: 30.7 GB, 30758289408 bytes
255 heads, 63 sectors/track, 3739 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 * 1 3738 30025453+ 7 HPFS/NTFS

Disk /dev/hdd: 33.8 GB, 33820286976 bytes
16 heads, 63 sectors/track, 65531 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 203 102280+ 83 Linux
/dev/hdd2 204 62411 31352832 83 Linux
/dev/hdd3 62412 65531 1572480 82 Linux swap

root@darkstar:/home/fatherg# tail -s 3 -f /var/log/messages
Dec 20 11:07:44 darkstar pppd[1615]: local IP address 4.240.201.120
Dec 20 11:07:44 darkstar pppd[1615]: remote IP address 63.215.26.196
Dec 20 11:07:44 darkstar pppd[1615]: primary DNS address 209.244.0.3
Dec 20 11:07:44 darkstar pppd[1615]: secondary DNS address 209.244.0.4
Dec 20 11:09:35 darkstar kernel: sda: Unit Not Ready, sense:
Dec 20 11:09:35 darkstar kernel: sda: I/O error: dev 08:00, sector 0
Dec 20 11:09:35 darkstar kernel: Device not ready. Make sure there is a disc in the drive.
Dec 20 11:09:35 darkstar kernel: sda: Unit Not Ready, sense:
Dec 20 11:09:35 darkstar kernel: sda: I/O error: dev 08:00, sector 0
Dec 20 11:09:35 darkstar kernel: Device not ready. Make sure there is a disc in the drive.

****
Dec 20 11:10:04 darkstar kernel: usb.c: USB disconnect on device 00:03.3-1 address 2

Dec 20 11:10:06 darkstar kernel: hub.c: new USB device 00:03.3-1, assigned address 3
****

the last part is when I plugged in the device.

Last edited by fatherg; 12-20-2004 at 12:13 PM.
 
Old 12-20-2004, 12:15 PM   #7
Nightfrost
Member
 
Registered: Jun 2004
Location: Sweden
Distribution: ArchLinux
Posts: 201

Rep: Reputation: 30
From here on, I don't really know anymore. Someone more knowleadgable needs to take over from now..

(you do have a card inserted in your reader, right? )
 
Old 12-20-2004, 02:29 PM   #8
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
It looks that the reader is detected and when you insert a card you can mount /dev/sda1 (probably) and read it.
 
Old 12-20-2004, 06:28 PM   #9
fatherg
Member
 
Registered: Mar 2004
Posts: 55

Original Poster
Rep: Reputation: 15
haha I'm dumb. I didn't try to put the media card in yet because I didn't know if the reader was being detected, when I get home from work tonight I'll give your advise a shot, thanks for helping a noob like me!
 
Old 12-20-2004, 06:46 PM   #10
Nightfrost
Member
 
Registered: Jun 2004
Location: Sweden
Distribution: ArchLinux
Posts: 201

Rep: Reputation: 30
Quote:
haha I'm dumb. I didn't try to put the media card in yet because I didn't know if the reader was being detected, when I get home from work tonight I'll give your advise a shot, thanks for helping a noob like me!
we've all been there at some point
 
Old 12-20-2004, 07:23 PM   #11
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
To help you out, did you enable lun support in when compiling the kernel. Most Multi-Slot card readers need this so all slots can be mounted. If not enabled then only one port ( who knows which one ) will be accessible. Do a search on this site for multilun for more info.

Brian1
 
Old 12-21-2004, 08:58 AM   #12
fatherg
Member
 
Registered: Mar 2004
Posts: 55

Original Poster
Rep: Reputation: 15
cannot mount /dev/sda1... here is a copy of my /etc/fstab

/dev/hdd3 swap swap defaults 0 0
/dev/hdd2 / ext2 defaults 1 1
/dev/hdc1 /windows ntfs ro 1 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

and here is my /etc/mtab

/dev/hdd2 / ext2 rw 0 0
proc /proc proc rw 0 0
/dev/hdc1 /windows ntfs ro 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw 0 0

fatherg@darkstar:/proc/bus/usb$ ls
001/ 002/ 003/ 004/ devices drivers

It has 4 different card slots so this must me my device *yay* it's already mounted however, and it doesn't show any data in any of the directories. I tried to mount the seperate directories but it appears that they are not mount points. Still reasearching multi-lun support... would that be why it's not working?

Last edited by fatherg; 12-21-2004 at 09:08 AM.
 
Old 12-21-2004, 04:11 PM   #13
Nightfrost
Member
 
Registered: Jun 2004
Location: Sweden
Distribution: ArchLinux
Posts: 201

Rep: Reputation: 30
First of all to check if you have the lun-thing go to your kernel directory and write 'make menuconfig' or 'make xconfig' (do the same thing you did when you configured your kernel), and check out "Device drivers"/"scsi device support". Under that heading you'll find "probe all luns on each scsi device".

Now, according to your log which you posted earlier the correct device is sda. make sure you have a few mount points in /mnt such as /sda1 /sda2 /sda3 and /sda4. Now, I will assume you have your memory card formatted as FAT32. Right this as root:

Code:
mount -o umask=000 /dev/sda1 /mnt/sda1
this will mount whatever is in /dev/sda1 (IF it something is formatted in fat), at /mnt/sda1.

If that doesn't work try sda2, sda3, and sda5 as well.

If everything seems to work, you can add the proper line in /etc/fstab
 
Old 12-21-2004, 05:55 PM   #14
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
This is very long and can be confusing, I may make mistakes but will correct as I see or here input.

Most Cardreaders mount each slot as a seperate device. Not all, but most I have seen.
Lets verify a few things first from a clean boot and no USB devices plugged in.

Type ' cat /proc/bus/usb/devices ' will show your USB Ports and what they are. The above output like ' cat /proc/bus/usb/001/001 ' or what ever is some generic stuff.

Example of my ' cat /proc/bus/usb/devices '
Code:
[crusher58@lcomp58 ~]$ cat /proc/bus/usb/devices
T:  Bus=06 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.10-rc2 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:02:05.1
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.10-rc2 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:02:05.0
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.10-rc2 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.2
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.10-rc2 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.1
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.10-rc2 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1d.0
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=090a ProdID=1046 Rev= 2.01
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=256mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=255ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 4
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.10-rc2 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:02:05.2
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms
Now with no devices plugged in type ' cat /proc/scsi/scsi '. There should be nothing.

Now I plug in my mp3 player which is also a sdcard reader. This is my output from ' cat /proc/scsi/scsi. It is identified as Newtrend
Code:
[crusher58@lcomp58 ~]$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: NEWTREND Model:  MMC READER BULK Rev: 2.01
  Type:   Direct-Access                    ANSI SCSI revision: 02
Now when I plugin my 3 slot USB card reader with no media cards in it, the output of ' cat /proc/scsi/scsi. This the same output as above sense there is no media present.
Code:
[crusher58@lcomp58 ~]$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: NEWTREND Model:  MMC READER BULK Rev: 2.01
  Type:   Direct-Access                    ANSI SCSI revision: 02
Now I plugin my compact flash media card in and I get the following output from ' cat /proc/scsi/scsi '. It is idenitfied as General Model Flash Disk Drive. It is a 3 in 1 media USB mediareader
Code:
[crusher58@lcomp58 ~]$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: NEWTREND Model:  MMC READER BULK Rev: 2.01
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: General  Model: Flash Disk Drive Rev: 2.05
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 01
  Vendor: General  Model: Flash Disk Drive Rev: 2.05
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 02
  Vendor: General  Model: Flash Disk Drive Rev: 2.05
  Type:   Direct-Access                    ANSI SCSI revision: 02
Looking at the above output you can see the mp3 device is scsi0 which will map as /dev/sda and since there is only one partition then it is /dev/sda1. Mount command for me would be ' mount -t vfat /dev/sda1 /media/sda1. If I had two partitions on it I would also mount the second partition as ' mount -t vfat /dev/sda2 /media/sda2

Now looking at the above again the cardreader is on scsi1. It shows three luns attached to scsi1. Luns is another story but if you did not have multilun support in the kernel then you would only see one lun. If I mount using ' mount -t vfat /dev/sdb1 /media/sdb1 ' it does not mount. It says there is no media present. So I try ' mount -t vfat /dev/sdc1 /media/sdc1 ' and it mounts. So for me /dev/hdc is the compact flash slot for me and apparently /dev/sdb is one of the other slots.

Now I insert a sdcard in the cardreader and try ' mount -t vfat /dev/sdb1 /media/sdb1 '. It does not mount. So that means that /dev/sdb is neither the compact flash or sdcard slot. I try mounting /dev/sdd1 ' mount -t vfat /dev/sdd1 /media/sdd1 ' and sdcard mounts fine.

So here is the following from my system.
/dev/sda is my mp3 player
/dev/sdb is the smartmedia slot. No way of testing for me since I have no smartmedia cards, but should work fine.
/dev/sdc is the compact flash slot
/dev/sdd is the sdcard slot

All of the above works this way for me with lun support in the kernel. Now for you if you have no other usb devices plugged in then you would start your way from /dev/sda to /dev/sdd.

Okay if it is one of the rare devices that does not require multilun support then you mount each slot as the following.
mount -t vfat /dev/sda1 /dev/sda1
mount -t vfat /dev/sda2 /dev/sda2
mount -t vfat /dev/sda3 /dev/sda3
mount -t vfat /dev/sda4 /dev/sda4

Here is Example of my fstab file.
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/hda8               /                       ext3    defaults        1 1
/dev/hda2               /boot                   ext3    defaults        1 2
/dev/hda12              /cdrw                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda5               /dvdrw                  ext3    defaults        1 2
/dev/hda10              /home                   ext3    defaults        1 2
none                    /proc                   proc    defaults        0 0
/dev/hda3               /storage1               ext3    defaults        1 2
none                    /sys                    sysfs   defaults        0 0
/dev/hda9               /usr                    ext3    defaults        1 2
/dev/hda6               /var                    ext3    defaults        1 2
/dev/hda7               /vfat                   vfat    defaults        0 0
/dev/hda11              swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              iso9660,udf noauto,owner,rw 0 0
/dev/cdrom1             /mnt/cdrom1             iso9660,ufs noauto,owner,rw 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner 0 0
/dev/sda1               /mnt/sda1               auto    umask=222,users,noauto,owner,rw   0 0 
/dev/sdb1               /mnt/sdb1               auto    umask=222,users,noauto,owner,rw   0 0 
/dev/sdc1               /mnt/sdc1               auto    umask=222,users,noauto,owner,rw   0 0
/dev/sdd1               /mnt/sdd1               auto    umask=222,users,noauto,owner,rw   0 0
/dev/sde1               /mnt/sde1               auto    umask=222,users,noauto,owner,rw   0 0
/dev/sdf1               /mnt/sdf1               auto    umask=222,users,noauto,owner,rw   0 0
/dev/sdg1               /mnt/sdg1               auto    umask=222,users,noauto,owner,rw   0 0
192.168.1.18:/storage1  /mnt/lcomp18_storage1   nfs     umask=222,users,noauto,owner,rw 0 0
192.168.1.18:/storage3  /mnt/lcomp18_storage3   nfs     umask=222,users,noauto,owner,rw 0 0
Then I created mount device Icons on my KDE desktop and mapped them to each /dev. Now all I have to do is start from the bottom and increment till it mounts. But I know where my devices are and which one to mount with 95% of the time.

You can get info on what media is what and which /dev it is at by running ' fdisk -l ' Example of my ' fdisk -l ' with the mp3 and cardreader with compact flash and sdcard plugged in.
Code:
[root@lcomp58 crusher58]# fdisk -l
bash: fdisk: command not found
[root@lcomp58 crusher58]# /sbin/fdisk -l

Disk /dev/hda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         917     7365771    7  HPFS/NTFS
/dev/hda2             918         942      200812+  83  Linux
/dev/hda3             943        1962     8193150   83  Linux
/dev/hda4            1963        7296    42845355    f  W95 Ext'd (LBA)
/dev/hda5            1963        2599     5116671   83  Linux
/dev/hda6            2600        3236     5116671   83  Linux
/dev/hda7            3237        3618     3068383+   c  W95 FAT32 (LBA)
/dev/hda8            3619        4128     4096543+  83  Linux
/dev/hda9            4129        5658    12289693+  83  Linux
/dev/hda10           5659        5913     2048256   83  Linux
/dev/hda11           5914        6044     1052226   82  Linux swap
/dev/hda12           6045        6159      923706   83  Linux

Disk /dev/sda: 125 MB, 125960192 bytes
8 heads, 32 sectors/track, 961 cylinders
Units = cylinders of 256 * 512 = 131072 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         961      122959+   b  W95 FAT32

Disk /dev/sdc: 31 MB, 31129600 bytes
4 heads, 32 sectors/track, 475 cylinders
Units = cylinders of 128 * 512 = 65536 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         475       30374+   4  FAT16 <32M

Disk /dev/sdd: 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/sdd1   *           1         244        7792    1  FAT12
[root@lcomp58 crusher58]#
Some info as you play.

When you unplug a device the /proc/scsi/scsi sometimes does not erase the link to scsi0 or whatever for a period of time. So if you unplug the device as scsi0 then plug it right back in it will be scs1. But the mount point for it does not change. If it mounted on /dev/sda, unplugit then plug back in, it will still mount at /dev/sda.

So /dev/sda is first scsi/usb/firewire/whatever media device you plugin and so on. So if you plug in a usb harddrive first then your cardreader then your media slots will be one dev higher.

Another example I plug in my mp3 player ( /dev/sda )and then my card reader ( /dev/sdb, /dev/sdc, /dev/sdd ). All works fine. So I shutdown for the night and start up again tomorrow but I leave the mp3 and card reader plugged in. Depending if I had plugged my mp3 in USB port 1 and the cardreader in USB port 0 then my mp3 player will be /dev/sdd instead of /dev/sda since port 0 reads devices first then port 1 and so on. So mp3 will be /dev/sdd and cardreader will be /dev/sda, /dev/sdb, /dev/sdc. Believe me this can cause major confusion for the beginner.

Now with the usage of udev, you can define a usb device to always be a specific /dev. Lots of info on the net and here for this type of setup.

Brian1
 
Old 12-22-2004, 05:53 AM   #15
Nightfrost
Member
 
Registered: Jun 2004
Location: Sweden
Distribution: ArchLinux
Posts: 201

Rep: Reputation: 30
just two point of clarification:

if your mem-card is formatted as a superfloppy, it will be mapped to /dev/sdX. In other words if it is formatted without partitions it will not have any number in the dev-name. I remember having an SD-card like this which caused me a lot of confusion. But you'll know when you do 'fdisk -l'.

Also, 'umask=000', which I posted before in the mount command gives r/w access for all users, so from a security point of view it might not be a good idea.


While we're at it, I also have question for Brian1; if I enter a card in my cardreader after bootup, it will not show up if I 'fdisk -l'. I have to explicitly enter 'fdisk -l /dev/sdX' in order to get devices on that device listed. Sometimes I can't even mount it before I've done 'fdisk -l /dev/sdX'. It doesn't matter how long I wait after I've plugged it in. If I have the card in at bootup, I won't have this problem. I have hotplug installed, as well as multiple lun support in the kernel. Do you know why this might be? Thanks.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fc3: media card reader/writer support? pcandpc Linux - Hardware 2 10-23-2005 09:55 AM
Smart Media Card Problems sprflyzapp Linux - Hardware 2 09-26-2005 07:56 AM
smart media card in PCMCIA adapter larry.barnes SUSE / openSUSE 20 03-21-2005 08:26 AM
RSA Smart Card (pcmcia) support for linux? bingbong Linux - Enterprise 2 01-20-2005 05:33 PM
Smart Media reader szarak Mandriva 3 08-28-2003 02:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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