Am Freitag, 14. September 2007 schrieb ext Harald Dunkel: > I am not sure about Dirk's suggestion, but AFAIU it wouldn't > work for me. The point is that I would like to use the label > to run cryptsetup. If the udev rule to make a label available > in /dev/usb relies upon /dev/mapper, then this doesn't work. No it does not, see below. > The entry in /dev/mapper doesn't exist when I need it. The entry in /dev/mapper does only exist _after_ cryptsetup has been run successfully. A udev rule creates different or additional names of _your_ choice for the device and its partitions, based on information found in the hardware itself, like manufacturer, serial no., etc. This way you make sure the name is the same whenever you plug in the device. A rule can also run a script, which could then create the mappings for you if the stick contains an encrypted partition. If the rule works in one machine, you can copy it to other machines and it will create the same device names there. I have the following udev rules defined for my usb devices: # USB Harddisk BUS=="scsi", KERNEL=="sd*", ATTRS{model}=="-210 ", ATTRS{vendor}=="IBM-DJSA", SYMLINK="usb/disk%n" # USB Stick 32MB BUS=="scsi", KERNEL=="sd*", ATTRS{model}=="HardDrive ", ATTRS{rev}=="1.11", ATTRS{vendor}=="32MB ", SYMLINK="usb/smallstick%n" # USB Stick SanDisk 1GB SUBSYSTEMS=="usb", KERNEL=="sd*", ATTRS{product}=="Cruzer Micro", ATTRS{serial}=="2005173991167CA2BF93", SYMLINK="usb/stick%n" For a more detailed explanation read: http://www.reactivated.net/writing_udev_rules.html Bye... Dirk -- Dirk Heinrichs | Tel: +49 (0)162 234 3408 Configuration Manager | Fax: +49 (0)211 47068 111 Capgemini Deutschland | Mail: dirk.heinrichs@xxxxxxxxxxxxx Wanheimerstraße 68 | Web: http://www.capgemini.com D-40468 Düsseldorf | ICQ#: 110037733 GPG Public Key C2E467BB | Keyserver: www.keyserver.net
Attachment:
signature.asc
Description: This is a digitally signed message part.