LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices

Reply
 
Search this Thread
Old 07-20-2004, 04:23 AM   #1
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Blog Entries: 14

Rep: Reputation: 35
SuSE 9.1: USB sticks won't hotplug


I am trying to use two different USB sticks (one is a standard stick, one is a wristwatch) with SuSE 9.1. If I insert them before booting, everything is fine and they are installed with the following entries in mtab:

Code:
/dev/sdc1 /media/usb-storage-odd-USB-FlashDisk:0:0:0p1 subfs rw,noexec,nosuid,nodev,snyc,fs=floppyfss,procuid 0 0
/dev/sdg1 /media/usb-storage-20020509145305401:0:0:3 subfs rw,noexec,nosuid,nodev,snyc,fs=floppyfss,procuid 0 0
The former is the stick, the latter the watch.

When I plug any of the items in when the system is already up, nothing at all happens, their lights will stay off and I can't mount them by hand. If I copy the above lines into fstab and then plug the devices in, they can be mounted, but after a reboot they cannot be mounted anymore - if I insert them before booting, mtab will then include the above entries from fstab and a new one for the item inserted before boot, it will even create a new directory in /media/ for it. The fstab entries will produce errors during boot if the devices are not present.

Hotplug appears to be enabled, as just after runlevel 5 is reached during booting something provokes the message 'Hotplug is already enabled - to disable, use "NOHOTPLUG=1" at boot prompt' (quoted from memory, might not be 100% exact).

Does anyone have an idea what I can do to either have them mounted automatically when I plug them in or at least have them mounted by hand when the system is already up?

Robin
 
Old 07-21-2004, 01:11 AM   #2
Vlad-A
Member
 
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 32
Hi,

I suggest you disable the submounter and mount "manually"
First perform an YAST online update (YOU).

Create then two directories under /media that will have more meaningfull names. e.g:

mkdir /media/usb-stick
mkdir /media/watch

Add following entries to your /etc/fstab (or change the existing ones for your usb devices /dev/sdc1 and /dev/sdg1)
/dev/sdc1_____/media/usb-stick___auto_____rw,noauto,users,exec,umask=0000,sync___0_0
/dev/sdg1_____/media/watch_____auto_____rw,noauto,users,exec,umask=0000,sync___0_0

Sorry for the "_". Since space characters get somehow messed up, I am using "_" to represent a space character.

Open your
/etc/sysconfig/hotplug

and look there for the parameter:
HOTPLUG_USE_SUBFS

I am sure it's set to yes (HOTPLUG_USE_SUBFS=yes)

You *need* to set it to no
HOTPLUG_USE_SUBFS=no

Reboot your system (the watch and the stick shall not be plugged-in, although it does not hurt if they are. It's just for testing)

After the system is up and running, plug-in your devices.

Check with
/sbin/lsusb
or usbview
whether the devices are recognized as attached or not.

Check with lsmod if the modules
usb-storage
scsi_mod
are loaded.

If not load them manually
modprobe usb-storage

Mount now your devices
mount /media/usb-stick
mount /media/watch

If this works, cd into /media/usb-stick and /media/watch and ls
to see if you can see the contens (of course you need to have some files
on those devices.)

If everything works you can delete the automatically created directories under /media
usb-storage-odd-USB-FlashDisk:0:0:0p1
usb-storage-20020509145305401:0:0:3
etc. since you do not need them anymore.

Last edited by Vlad-A; 07-21-2004 at 01:14 AM.
 
Old 07-22-2004, 04:57 PM   #3
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Blog Entries: 14

Original Poster
Rep: Reputation: 35
I have done as you suggested, and both usb_storage (sic) and scsi_mod are loaded. When I first plugged in the stick just now, its light went on (which is more than it did before), but before and after the output of lsusb looked exactly the same, and I couldn't mount the stick - I got the message 'medium not present'. I disconnected it again and tried the watch, but trying to mount it (its light won't go on) results in the shell not returning to a prompt - not even ctrl-z or ctrl-c will do anything. If I plug the stick back in the light doesn't go on again.

BTW there are files on both of them.

Robin
 
Old 07-23-2004, 02:34 AM   #4
Vlad-A
Member
 
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 32
Hello,

1) Check your kernelversion
uname -r

I have: 2.6.5-7.95-default

2) Check the version of your hotplug package
rpm -qa|grep hotplug

You should have at least:
hotplug-0.44-32.22
hotplugctl-0.08-256


If you have older versions of hotplug or kernel , then please run YOU-YAST Online update !!!!

3)

Can you please also change your /etc/fstab in the way that submounter is not used for your CD/DVD devices either.

So if you see something like:
/dev/dvd____ /media/dvd_____subfs__fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8__0_0
change it to:
/dev/dvd____ /media/dvd___auto___ro,noauto,users,exec,iocharset=utf8__0_0

Again: a _ represents a space character

So we are replacing subfs with the auto entry for filesystem type. Also the subfs related entries like, procuid, fs=cdfss, etc. are removed

4) Check with
mount
if there are already filesystems (e.g. CD, DVD, Memorycards) mounted with the supermounter (subfs).
If yes unmount them.

5)
Make sure that you are inserting the USB-Stick directly into a USB Port on your computer and not through a externel HUB.
You may also consider to test, without other USB devices attached.

6) *Prior* insertin the USB Stick check your var/log/messages.
tail /var/log/messages

7) Check with modprobe the scsi_mod module

In my case it's
scsi_mod ____110540__5_st,sr_mod,sg,sd_mod,usb_storage
(_ represents a space)
Make sure that also sd is loaded (sd=SCSI DISK)

8) Insert the stick

9) Check again your /var/log/messages

tail /var/log/messages

You shall now see new entries like:

Jul 23 07:30:18 v-server kernel: SCSI device sde: 253952 512-byte hdwr sectors (130 MB)
Jul 23 07:30:18 v-server kernel: sde: assuming Write Enabled
Jul 23 07:30:18 v-server kernel: sde: assuming drive cache: write through
Jul 23 07:30:18 v-server kernel: sde: sde1
Jul 23 07:30:18 v-server kernel: Attached scsi removable disk sde at scsi1, channel 0, id 0, lun 0
Jul 23 07:30:19 v-server kernel: Attached scsi generic sg4 at scsi1, channel 0, id 0, lun 0, type 0
Jul 23 07:30:19 v-server kernel: USB Mass Storage device found at 2
Jul 23 07:30:20 v-server /etc/hotplug/block.agent[12506]: new block device /block/sde
Jul 23 07:30:20 v-server /etc/hotplug/block.agent[12544]: new block device /block/sde/sde1

In my case, the usb-stick is /dev/sde
The partition I mount is /dev/sde1 (sde is the device itself and sde1 is the filesystem)


10) Now try to mount the stick

11) you may also consider to remove the subfs module prior manual mounting with
modprobe -r subfs
 
Old 07-23-2004, 06:29 PM   #5
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Blog Entries: 14

Original Poster
Rep: Reputation: 35
Thanks for the reply.

Walking through your suggestions I have found out that apparently the following is happening, causing my problems:

If I connect the watch, it is correctly identified as sdc1 and I can mount it as /dev/sdc1 - after unmounting I can connect the stick and also mount it as sdc1. If (after a reboot) I connect the stick, it is found as sdg1, and likewise after connecting the watch, the watch is also mountable as sdg1. I have checked the content of the mounted drives, and they are different. So apparently I seem to have to live with the fact that the first stick I mount decides the identity for the other. As I'm not going to use them all that often (and not together) that won't be much to worry about.

Nevertheless I have copied both your mails as HowTos for future problems, so that I don't forget what to do if I switch or upgrade systems in the future. Thanks a lot!

Robin
 
Old 07-27-2004, 12:06 PM   #6
nettey
LQ Newbie
 
Registered: Jul 2004
Posts: 19

Rep: Reputation: 0
i hate to sound stupid here, BUT....how do i know what device my usb storage is on?? sda?sda1? sga?? where does it tell you this? what command do i use? its def there, i unplug it run /sbin/lsusb and its not listed. then i plug it in, run it again and it shows. i just need to see what device its using so i can edit the fstab file to see it. as in /dev????

thanks
annette
 
Old 07-27-2004, 01:11 PM   #7
Vlad-A
Member
 
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 32
First of all you need to disable the supermounter for USB devices. If you browse this thread then you will find how.
Again:

Fisrst update your SuSE Linux with YOU and then disable submount by editing
/etc/sysconfig/hotplug

Look there for the parameter:
HOTPLUG_USE_SUBFS

You *need* to set it to no, so
HOTPLUG_USE_SUBFS=no
Reboot your system

Do not plug in your USB stick
Take a look on your /var/log/messages and remember the last entry.
cat /var/log/messages

Now plug in your USB stick and again take a look on your /var/log/messages with
cat /var/log/messages

You will see something like:
Jul 23 07:30:18 v-server kernel: SCSI device sde: 253952 512-byte hdwr sectors (130 MB)
Jul 23 07:30:18 v-server kernel: sde: assuming Write Enabled
Jul 23 07:30:18 v-server kernel: sde: assuming drive cache: write through
Jul 23 07:30:18 v-server kernel: sde: sde1
Jul 23 07:30:18 v-server kernel: Attached scsi removable disk sde at scsi1, channel 0, id 0, lun 0
Jul 23 07:30:19 v-server kernel: Attached scsi generic sg4 at scsi1, channel 0, id 0, lun 0, type 0
Jul 23 07:30:19 v-server kernel: USB Mass Storage device found at 2
Jul 23 07:30:20 v-server /etc/hotplug/block.agent[12506]: new block device /block/sde
Jul 23 07:30:20 v-server /etc/hotplug/block.agent[12544]: new block device /block/sde/sde1

In the above output you can see that a new device was added /block/sde and /block/sde/sde1

This means that in the above given case the device is /dev/sde1

Again: sde is the device but sde1 is the partition you shall mount
In your case it may be sda and sda1.

lsusb will *not* give you the /dev entry since lsusb just scans the bus.
 
Old 07-27-2004, 01:17 PM   #8
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
Quote:
Originally posted by nettey
i hate to sound stupid here, BUT....how do i know what device my usb storage is on?? sda?sda1? sga??
I used this page to set mine up yesterday: http://www.cs.sfu.ca/%7Eggbaker/personal/cf-linux .
When I installed the Sg3_utils and ran sg_map it showed me which devices my USB reader used. Since I have a multi-reader, I had to try them all to figure out which device matched each card, but that wasn't too hard. One warning, the device will be labelled sda, sdb, etc., but you also need to add the partition number to it to get it to work; sda1, sdb1, etc.
 
Old 07-28-2004, 01:37 AM   #9
nettey
LQ Newbie
 
Registered: Jul 2004
Posts: 19

Rep: Reputation: 0
alright. first of all Vlad, thank you so much for even going this far in helping me. i have done your steps and this is the output when i use cat /var/log/messages:

Jul 27 13:16:32 linux kernel: usb 1-2.2: new full speed USB device using address 6
Jul 27 13:16:32 linux kernel: usb 1-2.2: Product: LEXAR MEDIA
Jul 27 13:16:32 linux kernel: usb 1-2.2: Manufacturer: LEXAR MEDIA
Jul 27 13:16:32 linux kernel: usb 1-2.2: SerialNumber: 1.00
Jul 27 13:16:32 linux /etc/hotplug/usb.agent[6633]: need a device for this command
Jul 27 13:16:37 linux kernel: Initializing USB Mass Storage driver...
Jul 27 13:16:37 linux kernel: usb-storage: probe of 1-2.2:1.0 failed with error -5
Jul 27 13:16:37 linux kernel: usbcore: registered new driver usb-storage
Jul 27 13:16:37 linux kernel: USB Mass Storage support registered.
Jul 27 13:20:47 linux su: (to root) annette on /dev/pts/1
Jul 27 13:20:47 linux su: pam_unix2: session started for user root, service su
Jul 27 13:24:13 linux su: (to root) annette on /dev/pts/3
Jul 27 13:24:13 linux su: pam_unix2: session started for user root, service su
Jul 27 13:24:13 linux su: pam_unix2: session finished for user root, service su
Jul 27 13:24:13 linux su: (to root) annette on /dev/pts/3
Jul 27 13:24:13 linux su: pam_unix2: session started for user root, service su
Jul 27 13:24:14 linux su: pam_unix2: session finished for user root, service su
Jul 27 13:24:59 linux kernel: osst :I: Tape driver with OnStream support version 0.99.1
Jul 27 13:24:59 linux kernel: osst :I: $Id: osst.c,v 1.70 2003/12/23 14:22:12 wriede Exp $

seems its there, but cant be assigned a device for some reason. what now? have i reached a dead end? help!!

thanks man! i also tried the sg3utils that the other guy mentioned and nothing. i have no sg devices found! i keep getting a command line when i use the sg_scan comand.

annette
 
Old 07-28-2004, 03:04 AM   #10
Vlad-A
Member
 
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 32
Hello Annette,

well let's see:

1) Did you disable the supermounter process ?

Log in as root

2) As far I can remember, you have a line in your /etc/fstab that relates to your usb stick
something like /dev/sda.......

Can you please delete this line in your /etc/fstab and all other lines related to USB Keys.


3) Which kernel are you running
uname -r

and what the version of hotplug ?
rpm -qa|grep hotplug


Prior inserting the USB Memory

4) Check with lsmod if the modules
usb-storage
scsi_mod
are loaded.

If not load them manuall with modprobe

5) Check if the
SCSI Disk module is loaded

So in the output of lsmod you shall take a look on the line containing scsi_mod

It should look like:
scsi_mod ____110540__5_st,sr_mod,sg,sd_mod,usb_storage
(_ represents a space)

Make sure that also sd_mod is loaded (sd=SCSI DISK)

If not load manually

If everything is there, insert your stick

7) Check with mount that the stick is *not* already mounted by the supermounter

8) Check /var/log/messages

9) Now mount manually
- Create a subdirectory e.g.
mkdir /media/usb-mem

mount /dev/sda1 -t auto /media/usb-mem

This sda1 is just en example. In your case it might be /dev/sdb1, /dev/sdc1 or whatever

Last edited by Vlad-A; 07-28-2004 at 03:07 AM.
 
Old 07-28-2004, 08:37 AM   #11
nettey
LQ Newbie
 
Registered: Jul 2004
Posts: 19

Rep: Reputation: 0
>>1) Did you disable the supermounter process ?
>>Log in as root
>> 2) As far I can remember, you have a line in your /etc/fstab that relates to your usb stick
>>something like /dev/sda.......
well...i still am not sure what the device is! i cant see that anywhere

>>Can you please delete this line in your /etc/fstab and all other lines related to USB >>Keys.
ok...deleted all info about the flash(this is what i called it)

>>3) Which kernel are you running
>>uname -r

2.6.5-7.95-smp (i have multiprocessors)

>> and what the version of hotplug ?
>> rpm -qa|grep hotplug

hotplugctl-0.08-256
hotplug-0.44-32.22


>> Prior inserting the USB Memory

>>4) Check with lsmod if the modules
>> usb-storage
>> scsi_mod
>> are loaded.
I typed # lsmod and this is the output:
Module Size Used by
osst 54424 0
vfat 19456 0
fat 49824 1 vfat
usb_storage 67904 0
edd 13720 0
joydev 14528 0
sg 41632 0
st 44828 0
sd_mod 25088 0
sr_mod 21028 0
scsi_mod 118340 6 osst,usb_storage,sg,st,sd_mod,sr_mod
ide_cd 42628 0
cdrom 42652 2 sr_mod,ide_cd
nvram 13448 0
usbserial 35952 0
lp 15364 0
thermal 16648 0
processor 21312 1 thermal
fan 8196 0
snd_seq_oss 38656 0
button 10384 0
snd_pcm_oss 65576 0
snd_mixer_oss 24448 1 snd_pcm_oss
snd_seq_midi 13600 0
snd_seq_midi_event 12032 2 snd_seq_oss,snd_seq_midi
snd_seq 65296 6 snd_seq_oss,snd_seq_midi,snd_seq_midi_event
battery 12804 0
ac 8964 0
snd_ens1371 29284 4
snd_rawmidi 31140 2 snd_seq_midi,snd_ens1371
snd_seq_device 12808 4 snd_seq_oss,snd_seq_midi,snd_seq,snd_rawmidi
snd_pcm 112772 2 snd_pcm_oss,snd_ens1371
snd_page_alloc 16136 1 snd_pcm
snd_timer 32132 2 snd_seq,snd_pcm
snd_ac97_codec 69636 1 snd_ens1371
snd 70884 21 snd_seq_oss,snd_pcm_oss,snd_mixer_oss,snd_seq_midi,snd_seq_midi_event,snd_seq,snd_ens1371,snd_rawmid i,snd_seq_device,snd_pcm,snd_timer,snd_ac97_codec
soundcore 13536 1 snd
gameport 8832 1 snd_ens1371
hid 47552 0
usblp 16896 1
ehci_hcd 33412 0
ohci_hcd 24324 0
uhci_hcd 35728 0
via_agp 12928 1
agpgart 36140 1 via_agp
parport_pc 41024 1
parport 44232 2 lp,parport_pc
evdev 13952 0
ipt_TCPMSS 8448 1
ipt_TOS 6656 9
ipt_state 6144 55
ipt_LOG 9856 54
usbcore 116700 10 usb_storage,usbserial,hid,usblp,ehci_hcd,ohci_hcd,uhci_hcd
e100 38400 0
mii 9344 1 e100
ip6t_LOG 9600 2
ip6t_REJECT 11520 3
ip6table_mangle 6784 0
ipt_REJECT 10880 3
iptable_mangle 7040 1
iptable_filter 7040 1
ip_nat_ftp 9328 0
iptable_nat 27684 1 ip_nat_ftp
ip_conntrack_ftp 76336 1 ip_nat_ftp
ip_conntrack 37420 4 ipt_state,ip_nat_ftp,iptable_nat,ip_conntrack_ftp
ip_tables 22400 8 ipt_TCPMSS,ipt_TOS,ipt_state,ipt_LOG,ipt_REJECT,iptable_mangle,iptable_filter,iptable_nat
ip6table_filter 6784 1
ip6_tables 23824 4 ip6t_LOG,ip6t_REJECT,ip6table_mangle,ip6table_filter
ipv6 276348 18 ip6t_REJECT
subfs 12160 2
dm_mod 57472 0
reiserfs 263504 1

>> If not load them manuall with modprobe
I see what you asked to look for...
>> 5) Check if the
>> SCSI Disk module is loaded
um..how do i do this?
>> So in the output of lsmod you shall take a look on the line containing scsi_mod
>> It should look like:
>>scsi_mod ____110540__5_st,sr_mod,sg,sd_mod,usb_storage
>> (_ represents a space)
scsi_mod 118340 6 osst,usb_storage,sg,st,sd_mod,sr_mod

>> Make sure that also sd_mod is loaded (sd=SCSI DISK)
How do i do this??
>> If not load manually

>>If everything is there, insert your stick

>> 7) Check with mount that the stick is *not* already mounted by the supermounter
checked in the /mnt and nothing is in there at all, totally blank directory

>> 8) Check /var/log/messages

>>9) Now mount manually
>> - Create a subdirectory e.g.
>> mkdir /media/usb-mem
did this, called it flash
>> mount /dev/sda1 -t auto /media/usb-mem
did this and tried several diff combos (sga-c,sda-c....and more)
>>This sda1 is just en example. In your case it might be /dev/sdb1, /dev/sdc1 or whatever
i understand it was an example, but why cant i figure out what dev its using?? i have tried to sg scan and no luck, it says i have no devices found. i had no problems mounting this is Fedora.
Annette


__________________
Best Regards,
Vlad

Intel P4 2.8 GHz
512 MB RAM
Intel 845PE Chipset
ATI Radeon 9700 Pro
Creative SB Live! 5.1
2 X 200GB Seagate Barracuda 7200.7 Plus
 
Old 07-28-2004, 09:04 AM   #12
Vlad-A
Member
 
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 32
OK.

1) All modules are loaded. Hotplug Version is OK!

2) Now, checking if something is mounted means that you issue
mount
at the command prompt, and look at the ouput. Checking /mnt directory
will not tell you if something is mounted or not.

So what is the output of
mount

(need the output with unplugged and plugged Flash)

3) Again: did you disable the supermounter ????
(So, setting the parameter HOTPLUG_USE_SUBFS to no in /etc/sysconfig/hotplug and re-booted your system after that)
This is a very *important* information in order to determine teh problem.

4) How does your /etc/fstab looks like ??? Can you post here a copy?

BTW: sd is scsi disk and very likely your flash will be something like /dev/sdX (X=a,b,c...)
I doubt that the device name will be sg.
 
Old 07-28-2004, 09:40 AM   #13
nettey
LQ Newbie
 
Registered: Jul 2004
Posts: 19

Rep: Reputation: 0
>>So what is the output of
>>mount
>>(need the output with unplugged and plugged Flash)

output of unplugged is:
/dev/hdb2 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hdb1 on /boot type ext2 (rw,acl,user_xattr)
/dev/hdc on /media/cdrecorder type subfs (ro,nosuid,nodev,fs=cdfss,procuid,iocharset=utf8)
/dev/fd0 on /media/floppy type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid)usbfs on /proc/bus/usb type usbfs (rw)

now plugged:

/dev/hdb2 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hdb1 on /boot type ext2 (rw,acl,user_xattr)
/dev/hdc on /media/cdrecorder type subfs (ro,nosuid,nodev,fs=cdfss,procuid,iocharset=utf8)
/dev/fd0 on /media/floppy type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid)usbfs on /proc/bus/usb type usbfs (rw)

>>3) Again: did you disable the supermounter ????
>>(So, setting the parameter HOTPLUG_USE_SUBFS to no in /etc/sysconfig/hotplug and re-booted your system after >>that)
>>This is a very *important* information in order to determine teh problem.
yup, followed the steps u posted...here is my hotplug file so u can see...maybe something is wrong in there.
## Path: Hardware/Hotplug
## Description: Common hotplug options
## Type: list(default,off,verbose)
## Default: default
## ServiceRestart:
#####################################################################
# Common Hotplug Options
# ^^^^^^^^^^^^^^^^^^^^^^
#
# This variable controls the amount of output of the hotplug service. With
# 'default' (or '' or 'no') it prints only few messages and errors to syslog.
# Setting it to 'off' it will be absolutely quiet. With 'verbose' (or 'yes') it
# prints some extra debug output. With 'max' it will pollute your sysconfig
# with every single detail.
#
HOTPLUG_DEBUG="no"

## Type: list(syslog,file,console,auto)
## Default: syslog
## ServiceRestart:
#
# The (debug) output and error messges of all hotplug scripts are written to
# syslog by default and will be lost if no syslogd is running. Therefore you
# may change that setting. You may choose one of these:
# syslog all messages go to syslog (default)
# file all messages will be written to /var/run/hotplug
# console all messages will be written to /dev/console
# auto use syslog if syslogd is running and file if not
# Any other value is interpreted as syslog.
#
HOTPLUG_SYSLOG=syslog

## Type: string
## Default: ""
## ServiceRestart:
#
# If there are some types of events you don't want to be handled add it here.
# Multiple types have to be seperated by whitespace.
#
HOTPLUG_SKIP_EVENTS=""

## Type: yesno
## Default: no
## ServiceRestart:
#
# Sometimes there are multiple modules that match a device, but mostly we need
# only one of them. Therefore we stop module loading after the first module of
# the list was succesfully loaded. If you want hotplug to always load all
# modules it gets then set this variable to 'yes'.
#
HOTPLUG_LOAD_MULTIPLE_MODULES=no

## Type: string
## Default: "01 02 06 09 0c"
## ServiceRestart:
#
# When starting coldplug it looks for uninitialized pci devices and generates
# hotplug events (via /etc/hotplug/pci.rc). If only some classes of pci devices
# should be handled, then write these classes to this variable. Look in
# /usr/share/pci.ids for the right number.
# It must only contain class, subclass and prog-if may be skipped. That means
# the numbers must at least have two digits. Seperate multiple numbers by space.
# If this variable is empty, then all classes will be handled.
# default: 01 Mass storage controller
# 02 Network controller
# 06 Bridges
# 09 Input device controller
# 0c Serial bus controller
#
COLDPLUG_PCI_CLASSES_WHITELIST="01 02 06 09 0c"

## Type: string
## Default: ""
## ServiceRestart:
#
# When starting coldplug it looks for uninitialized pci devices and generates
# hotplug events (via /etc/hotplug/pci.rc). If some classes of pci devices
# should be skipped they have to be listed in this variable. Look in
# /usr/share/pci.ids for the right number.
# It must only contain class, subclass and prog-if may be skipped. That means
# the numbers must at least have two digits. Seperate multiple numbers by space.
# If this variable is empty, then all classes will be handled.
#
COLDPLUG_PCI_CLASSES_BLACKLIST=""

## Type: string
## Default: ""
## ServiceRestart:
#
# When hotplug pci.agent looks for a driver it loads any module that advertises
# itself for the given device. Sometimes there are optional modules, that are
# not at all neccessary for the proper usage of the device or that do not work
# properly.
# Sometimes you want pci.agent to load only modules that are in certain
# subdirectories of /lib/modules/<kernel version>/kernel/drivers/. If this
# variable is not empty, only modules from the given subdirectories will be
# loaded. If it is empty, then there is no limitation. Seperate multiple
# subdirectories by space.
# Note, that there is also /etc/hotplug/blacklist, to add single modules.
# default: ???
#
HOTPLUG_PCI_DRIVERTYPE_WHITELIST=""

## Type: string
## Default: "char/watchdog isdn mtd pci/hotplug video"
## ServiceRestart:
#
# When hotplug pci.agent looks for a driver it loads any module that advertises
# itself for the given device. Sometimes there are optional modules, that are
# not at all neccessary for the proper usage of the device or that do not work
# properly.
# Sometimes you want pci.agent to load only modules that are in certain
# subdirectories of /lib/modules/<kernel version>/kernel/drivers/. If this
# variable is not empty, modules from the given subdirectories will be skipped.
# If it is empty, then there is no limitation. Seperate multiple subdirectories
# by space.
# Note, that there is also /etc/hotplug/blacklist, to add single modules.
# default: ???
#
HOTPLUG_PCI_DRIVERTYPE_BLACKLIST="char/watchdog isdn mtd pci/hotplug video"

## Type: yesno
## Default: yes
## ServiceRestart:
#
# When pci.rc scans the pci bus it may trigger several events for network
# interface cards which are processed asyncronously. In some cases it might
# happen that multiple drivers register their interfaces at nearly the same
# time. Then it is mostly unpredictable which interface will become which
# number, because the kernel numbers them in order of registration.
# Therefore we queue pci events for NICs, so that only one driver is
# initializing at one time. And because the pci slots are scanned in a fixed
# order, the interfaces should be named in the same order at every boot.
# If you don't like it, turn it off. (You don't need it, if you use
# PERSISTENT_NAME for every network interface.)
#
HOTPLUG_PCI_QUEUE_NIC_EVENTS=yes

## Type: yesno
## Default: no
## ServiceRestart: coldplug
#
# If you have a machines that supports real pci hotplugging (not cardbus), then
# we have to load additional modules (cuurently just acpiphp).
#
HOTPLUG_DO_REAL_PCI_HOTPLUG=no

## Type: yesno
## Default: no
#
# enable subfs mounts of hotpluged devices
#
HOTPLUG_USE_SUBFS=no

>>4) How does your /etc/fstab looks like ??? Can you post here a copy?
here it is: (i deleted the lines about the flash asu mentioned to do before)
/dev/hdb2 / reiserfs acl,user_xattr 1 1
/dev/hdb1 /boot ext2 acl,user_xattr 1 2
/dev/hdb3 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/cdrecorder /media/cdrecorder subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/dvd /media/dvd auto ro,noauto,users,exec,iocharset=utf8 0 0
/dev/fd0 /media/floppy subfs fs=floppyfss,procuid,nodev,nosuid,sync 0 0
>>BTW: sd is scsi disk and very likely your flash will be something like /dev/sdX (X=a,b,c...)
>>I doubt that the device name will be sg.
i figured it would be sd, but a-c didnt work, so i figured i would try anything!
thanks again, sorry this became a tutorial! and it got so long too.
annette
 
Old 07-28-2004, 10:41 AM   #14
Vlad-A
Member
 
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 32
Hello Annette,

everything looks fine, except that you can not mount the drive.

I have seen some cases where, even th eonly USB device, the FlashCards are recognized as /dev/sdg

Can you also try:

mount /dev/sde1 -t auto /media/flash
mount /dev/sdf1 -t auto /media/flash
mount /dev/sdg1 -t auto /media/flash


also can you please give me the output of
ls /media

(so the content of the /media directory)

BTW: Do you have also another USB drives beside the FlashDrive ?
Do you access the FlashDrive via an USB reader or is this kind of usb-stick
(so it has an USB interface) and you plug it directly into an USB slot ?

Can you read the FlashDrive from another OS (e.g. Windows, or other Linux distribution)

Last edited by Vlad-A; 07-28-2004 at 01:47 PM.
 
Old 07-28-2004, 01:26 PM   #15
Vlad-A
Member
 
Registered: May 2004
Location: Vienna, Austria
Distribution: Open SuSE 11, Mac OS X 10.5
Posts: 299

Rep: Reputation: 32
P.S
1) when you run lsusb then the device is displayed.
We need to know if the class and the subclass of the device is drecognized properly.

1-a) run lsusb
You will get an output similar to this
.....
Bus 004 Device 003: ID 0402:5634 ALi Corp.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 003: ID 03f0:2311 Hewlett-Packard
Bus 002 Device 002: ID 046d:08f0 Logitech, Inc.
.....

1-b) In my case the device ALi Corp. is a USB storage
Now run lsusb -v -d against the ID of the device

In my case:
lsusb -v -d 0402:5634

The output is

Bus 004 Device 003: ID 0402:5634 ALi Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 Interface
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0402 ALi Corp.
idProduct 0x5634
bcdDevice 0.50
iManufacturer 1
iProduct 2 Pen Drive 2.0
iSerial 3 5745160003DA
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type none
wMaxPacketSize 512
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type none
wMaxPacketSize 512
bInterval 0
Language IDs: (length=4)
0409 English(US)


So:
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI

means it's a storage device with SCSI subclass.
USB attached storage is handled in Linux as SCSI storage.

2) You may also try to boot with the flash Card pluged in. Does this change something ?

Here an output from my /var/log/messages after booting with USB Storag epluged in

Jul 28 18:48:59 v-server kernel: Initializing USB Mass Storage driver...
Jul 28 18:48:59 v-server kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Jul 28 18:48:59 v-server kernel: Vendor: DMI Model: MultiFlash Rev: 3.00
Jul 28 18:48:59 v-server kernel: Type: Direct-Access ANSI SCSI revision: 02
Jul 28 18:48:59 v-server kernel: Vendor: DMI Model: MultiFlash Rev: 3.00
Jul 28 18:48:59 v-server kernel: Type: Direct-Access ANSI SCSI revision: 02
Jul 28 18:48:59 v-server kernel: Vendor: DMI Model: MultiFlash Rev: 3.00
Jul 28 18:48:59 v-server kernel: Type: Direct-Access ANSI SCSI revision: 02
Jul 28 18:48:59 v-server kernel: Vendor: DMI Model: MultiFlash Rev: 3.00
Jul 28 18:48:59 v-server kernel: Type: Direct-Access ANSI SCSI revision: 02
Jul 28 18:48:59 v-server kernel: USB Mass Storage device found at 2
Jul 28 18:48:59 v-server kernel: usbcore: registered new driver usb-storage
Jul 28 18:48:59 v-server kernel: USB Mass Storage support registered.
Jul 28 18:48:59 v-server kernel: Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0
Jul 28 18:48:59 v-server kernel: Attached scsi generic sg1 at scsi0, channel 0, id 0, lun 1, type 0
Jul 28 18:48:59 v-server kernel: Attached scsi generic sg2 at scsi0, channel 0, id 0, lun 2, type 0
Jul 28 18:48:59 v-server kernel: Attached scsi generic sg3 at scsi0, channel 0, id 0, lun 3, type 0
Jul 28 18:48:59 v-server kernel: SCSI device sda: 62720 512-byte hdwr sectors (32 MB)
Jul 28 18:48:59 v-server kernel: sda: assuming Write Enabled
Jul 28 18:48:59 v-server kernel: sda: assuming drive cache: write through
Jul 28 18:48:59 v-server kernel: sda1
Jul 28 18:48:59 v-server kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Last edited by Vlad-A; 07-28-2004 at 01:48 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Suse 10rc1 versus USB Sticks mykrob Linux - Hardware 2 09-12-2005 07:22 PM
Problems with Hotplug and USB flash dirve on Suse 9.2 almoser Suse/Novell 24 03-02-2005 07:12 PM
Suse 9, hotplug, USB and Canon 300D ugge Linux - Hardware 1 02-07-2005 02:59 PM
SuSE 8.2 hotplug/usb wrecked! revmyo Linux - Hardware 1 12-15-2003 03:29 PM
Mounting different usb-sticks robertmarkbram Linux - Hardware 3 10-22-2003 08:16 AM


All times are GMT -5. The time now is 04:48 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration