source: udev/60-persistent.rules@ 6f2a536

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 6f2a536 was 1f7827a2, checked in by Jim Gifford <clfs@…>, 19 years ago

r1012@server (orig r1010): jim | 2006-01-06 10:33:15 -0800

r1291@server: jim | 2006-01-06 10:31:33 -0800
Updates based on Alex's findings. Thank You Alex


  • Property mode set to 100644
File size: 2.9 KB
RevLine 
[7e161ea]1########################################################################
2#
[1f7827a2]3# Description : 60-persistent.rules
[7e161ea]4#
5# Authors : Based on Open Suse Udev Rules
6# kay.sievers@suse.de and hare@suse.de
7#
8# Adapted to : Jim Gifford
9# LFS
10#
11# Version : 00.01
12#
13# Notes :
14#
15########################################################################
16
17# persistent disk links: /dev/disk/{by-id,by-uuid,by-label,by-path}
18# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare@suse.de>
19
[1f7827a2]20ACTION!="add", GOTO="persistent_end"
21SUBSYSTEM!="block", GOTO="persistent_end"
[7e161ea]22
23# skip rules for inappropriate block devices
[1f7827a2]24KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end"
[7e161ea]25
26# never access removable ide devices, the drivers are causing event loops on open()
[1f7827a2]27BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}="1", GOTO="persistent_end"
[7e161ea]28
29# by-id (hardware serial number)
[1f7827a2]30KERNEL=="hd*[!0-9]", IMPORT{program}="/sbin/ata_id --export $tempnode"
31KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
32KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
[7e161ea]33
[1f7827a2]34KERNEL=="sd*[!0-9]|sr*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394"
35KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/usb_id -x"
36KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -s %p -d $tempnode"
37KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="", IMPORT{program}="/sbin/scsi_id -g -x -a -s %p -d $tempnode"
38KERNEL=="dasd*[!0-9]", IMPORT{program}="/sbin/dasd_id --export $tempnode"
39KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
[7e161ea]40
41# for partitions import parent information
[1f7827a2]42KERNEL=="sd*[0-9]|dasd*[0-9]", IMPORT{parent}=="ID_*"
43KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
[7e161ea]44
45# by-path (shortest physical path)
[1f7827a2]46KERNEL=="*[!0-9]|sr*", ENV{ID_TYPE}=="?*", IMPORT{program}="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
47KERNEL=="sr*", GOTO="persistent_end"
48KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
49KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
[7e161ea]50
51# by-label/by-uuid (filesystem properties)
[1f7827a2]52KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_end"
[7e161ea]53IMPORT{program}="/sbin/vol_id --export $tempnode"
[1f7827a2]54ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
55ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
[7e161ea]56
57# BIOS Enhanced Disk Device
[1f7827a2]58KERNEL=="*[!0-9]", IMPORT{program}="/sbin/edd_id --export $tempnode"
59KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
60KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
[7e161ea]61
[1f7827a2]62KERNEL=="dm-[0-9]*", ACTION=="add", PROGRAM="/sbin/dmsetup info -c --noopencount --noheadings -o name -j %M -m %m", SYMLINK="disk/by-name/%c"
[7e161ea]63
64LABEL="persistent_end"
Note: See TracBrowser for help on using the repository browser.