Subject: | |
From: | |
Reply To: | |
Date: | Wed, 3 May 2006 16:54:01 +0100 |
Content-Type: | TEXT/PLAIN |
Parts/Attachments: |
|
|
On Tue, 2 May 2006, michal wlasenko wrote:
> hey folks,
>
> i've got a problem with the usb memory drive on SL3, kernel 2.4.
> basically what happens when i stick a device to the port, is that the
> system sees it:
>
> bash-2.05b# lsusb
<snip>
On SL3 (and earlier RH systems) we have a little script we ask users to
run if their usb device isn't recognised automatically. It checks the usb
(etc) modules are loaded, and if they are does:
kudzu -c hd -b usb -p
kudzu -c hd -b scsi -p
(we grep the output for just the info I need)
printf "\nLooking for scsi disk partition info:\n"
for i in $(kudzu -c hd -b scsi -p |egrep 'device' | sed 's/device: //')
do
grep " $i" /proc/partitions
done
We also check if /proc/scsi/scsi shows anything.
On SL3 (and anything using kudzu/updfstab), you need to ensure that a
matching description for the hardware is present in the updfstab.conf
file. I believe that the default updfstab.conf just does:
include /etc/updfstab.conf.default
so you can add your own descriptions before (or after) the standard ones.
To avoid confusion with the system provided defaults we use a definition
with a different name than any in the .default file, e.g.
# the devices we will permit access to via mtools as u: etc..
device usbdisk {
# make a symlink
symlink true
# we expect to find a partition table
partition 1
....
# these are the definitions from updfstab.conf.default for
# "flash", which we are a superset of...
match hd CompactFlash
match hd ImageMate
match hd Flash
match hd JumpDrive
match hd MuVo
match hd ClipDrive
...
match hd "Maxtor OneTouch"
match hd "Vbtm Store 'n' Go"
match hd "Wd 2500BB External"
# Add more match lines before this
}
This does 2 things, we create symlinks so that /dev/usbdisk* can be
referred to from mtools.conf and of course the updfstab code adds/removed
lines in /etc/fstab on hotplug events so users can mount /mnt/usbdisk etc.
The extra lines we add to mtools.conf are just:
# for the usb pen drives (1st, 2nd etc)
drive u: file="/dev/usbdisk" mtools_skip_check=1
drive v: file="/dev/usbdisk1" mtools_skip_check=1
drive w: file="/dev/usbdisk2" mtools_skip_check=1
so the first usb device can be accessed as u: the 2nd as v: etc.
I believe that things are *quite* different in SL4 because updfstab (etc)
has been replaced by the new HAL setup (though I might well be wrong!)
-- Jon
|
|
|