systemd/rules.d
Roland Hieber 3af66c089b udev: generate system-unique storage symlinks using device path
When the same disk image is written to multiple storage units, for
example an external SD card and an internal eMMC, the symlinks in
/dev/disk/by-{label,uuid,partlabel,partuuid}/ are no longer unique, and
will point to the device that is probed last.

Adressing partitions via labels and UUIDs is nice to work with, and
depending on the use case, it might also be more robust than using the
symlinks in /dev/disk/by-path/ containing the partition number. Combine
the two approaches to create unique symlinks containing both the device
path as well as the respective UUIDs or labels, and throw in a symlink
using the devpath and the partition number for the sake of completeness.

For an exemplary GPT-partitioned disk at "platform-2198000.mmc" with a
partition containing an ext4 file system, this might create symlinks of
the following form:

  /dev/disk/by-path/platform-2198000.mmc-part/by-partnum/1
  /dev/disk/by-path/platform-2198000.mmc-part/by-partuuid/e5a75233-3b90-4aec-8075-b4dd7132b48d
  /dev/disk/by-path/platform-2198000.mmc-part/by-partlabel/rootfs
  /dev/disk/by-path/platform-2198000.mmc-part/by-uuid/b2c92f24-8215-4680-b931-f423aae5f1c9
  /dev/disk/by-path/platform-2198000.mmc-part/by-label/rootfs

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
2023-12-06 22:22:08 +01:00
..
50-udev-default.rules.in udev: add new builtin net_driver 2023-11-01 16:00:19 +00:00
60-autosuspend.rules
60-block.rules
60-cdrom_id.rules
60-dmi-id.rules rules: split out DMI related rules from udev-default.rules 2023-06-20 14:44:36 +02:00
60-drm.rules
60-evdev.rules
60-fido-id.rules
60-infiniband.rules
60-input-id.rules
60-persistent-alsa.rules
60-persistent-input.rules
60-persistent-storage-mtd.rules rules: add mtd/by-name symlinks 2023-10-17 11:43:30 +02:00
60-persistent-storage-tape.rules
60-persistent-storage.rules.in udev: generate system-unique storage symlinks using device path 2023-12-06 22:22:08 +01:00
60-persistent-v4l.rules
60-sensor.rules
60-serial.rules
64-btrfs.rules.in Drop split-usr and unmerged-usr support 2023-07-28 19:34:03 +01:00
70-camera.rules
70-joystick.rules
70-memory.rules
70-mouse.rules
70-power-switch.rules
70-touchpad.rules
70-uaccess.rules.in
71-seat.rules.in Drop split-usr and unmerged-usr support 2023-07-28 19:34:03 +01:00
73-seat-late.rules.in
75-net-description.rules
75-probe_mtd.rules
78-sound-card.rules
80-drivers.rules
80-net-setup-link.rules
81-net-dhcp.rules
82-net-auto-link-local.rules hwdb,rules: mark host-to-host network devices as only requiring link local addressing 2023-10-30 18:57:41 +01:00
90-iocost.rules
90-vconsole.rules.in
99-systemd.rules.in rules: go to the end of rules indeed when dm is suspended 2023-11-29 09:57:55 +01:00
meson.build rules: add mtd/by-name symlinks 2023-10-17 11:43:30 +02:00
README

Files in this directory contain configuration for systemd-udevd.service, a
daemon that manages symlinks to device nodes, permissions of devices nodes,
emits device events for userspace, and renames network interfaces.

See man:udev(7) for an overview of the configuration file format, and
man:systemd-udevd.service(8) for a description of service itself.

Use 'systemd-analyze cat-config udev/rules.d' to display the effective config.