LFS 6.3: USB Drives

Ken Moffat ken at linuxfromscratch.org
Wed May 7 15:33:02 PDT 2008


On Tue, May 06, 2008 at 07:40:39PM -0400, Baho Utot wrote:
> How does LFS 6.3 handle USB pen drives?
> 
 Wrong list (it's not an issue with the book itself).  If this
reply doesn't adequately point you to a solution, please take this to
-support.  Thanks.
> I have connected a USB pen drive and I see it in /sys/bus/usb/devices
> but it fails to make a device in the dev directory.
> 
> I find some devices in dev named usbdev3.1_ep00 and usbdev3.1_ep81 which
> comes from inserting the device into a USB port.
> 
> Should the kernel create a device /dev/sda1 as it does in Fedora 8?
> 
> Am I missing some config file in udev?
> 
 I'm not on an LFS box at the moment (it's an old clfs install, so
no guarantees that the rules are at all similar).  Depending on the
version of the rules, you _might_ get a /dev/sdX1, but that isn't in
itself particularly useful (it might be sda1 now, and sdb1 next
time) - please see
http://www.linuxfromscratch.org/lfs/view/stable/chapter07/symlinks.html
for a discussion of this.

 In my own case, I finally got around to sorting out my current
camera, and memory sticks, a few days ago.  I offer the following
rule as an example (it should all be on one line) - it creates a
/dev/stick symlink, which can then be referenced from /etc/fstab,
provided there is only one stick connected at a time.

 People who insist on using hal no doubt have other ways of doing
this.

BUS=="usb", SYSFS{product}=="USB Flash Memory", KERNEL=="sd?1",
NAME="%k" SYMLINK="stick", MODE="0660", GROUP="users",
OPTIONS="last_rule"

 To decide which information you want to use in your rule, run
'udevinfo -a -p /sys/class/usb_device/usbdevX.X | less' until you
find something which looks like your memory stick.  For any google
users who end up here, that path was correct in 2.6.22, it might
change with newer kernels ;-)

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce



More information about the lfs-book mailing list