UDev


Table of Contents

Using UDEV 
Using udev 
Persistent block device naming 
Contents 
by-label 
Enabling persistent naming in boot manager 
Disk not listed in /dev/disk/by-uuid 
Disk not listed in /dev/disk/by-uuid 
UDev urls 
Most helpful urls 
UDEV Primer 
UDEV micro howto 
1. UDEV 
2. DEVFS 

Using UDEV 

http://linux.togaware.com/survivor/Using_UDEV.html http://www.linuxtopia.org/online_books/linux_beginner_books/debian_linux_desktop_survival_guide/Using_UDEV.shtml

Debian Packages: udev hotplug

A problem that plagued earlier versions of the GNU/Linux kernel was that each time a USB device (and other devices) was connected a different mount point would be assigned. This issue was addressed in the 2.6 kernels using udev with hotplug. With udev, naming rules (e.g., in /etc/udev/rules.d/local.rules) are used to provide stable names for use in /etc/fstab. Udev uses information exported by the kernel drivers to the sysfs filesystem (usually mounted on /sys) to identify specific devices and to then associate them with specific names in /dev.

The key to using udev is with the rules that are defined to identify and distinguish the different USB devices that may be connected. A tutorial for writing udev rules is available from http://www.reactivated.net/udevrules.php.

The first step is to identify the USB device in some way. The udevinfo command can be used to identify a device path, which can then be used to identify information about the device on that path. For example, to identify a specific Flash Memory device which is recognised in GNU/Linux as a SCSI device, connect the device and run the command:

$ udevinfo -a -p $(udevinfo -q path -n /dev/sdc)

The /dev/sdc path here is whatever the dmesg command identifies. Select some identifying piece of information, like the product identifier (the line that (each rule must be on a single line).

Subsections

  • Flash Memory
  • Camera
  • iPod
  • Card Reader
  • MP3 Player o iRiver H340 o iRiver ifp796
  • Ethernet Cards
  • Examples