The Fidelix Linux Distribution

Simple, Stable, and Secure

MDEV(1) User Commands MDEV(1)

mdev - manual page for mdev 1.31.1

mdev [-s] | [-df]

BusyBox v1.31.1 (2020-04-30 13:38:01 EDT) multi-call binary.

mdev -s is to be run during boot to scan /sys and populate /dev. mdev -d[f]: daemon, listen on netlink.

-f: stay in foreground.

echo /sbin/mdev >/proc/sys/kernel/hotplug

It uses /etc/mdev.conf with lines

[-][ENV=regex;]...DEVNAME UID:GID PERM [>|=PATH]|[!] [@|$|*PROG]

where DEVNAME is device name regex, @major,minor[-minor2], or environment variable regex. A common use of the latter is to load modules for hotplugged devices:

$MODALIAS=.* 0:0 660 @modprobe "$MODALIAS"

If /dev/mdev.seq file exists, mdev will wait for its value to match $SEQNUM variable. This prevents plug/unplug races. To activate this feature, create empty /dev/mdev.seq at boot.

If /dev/mdev.log file exists, debug log will be appended to it.

April 2020 Fidelix 1.0