DebuggingUdev
This page is part of the debugging series — pages with debugging details for a variety of Ubuntu packages. |
General notes
- The default names for devices come from the kernel.
Our naming policy is to follow the standard devices.txt suggested names, applying them where the kernel driver uses a mnemonic name.
We do not supply special names, no, you cannot have /dev/pony.
However if ponies are a class of devices that share a common subsystem or driver, and are commonly addressed in this way, you could have /dev/pony0.../dev/ponyN
- The numbers on the end of the enumerated devices are assigned by the kernel on a first-come, first-served basis.
- This means every time you boot, the numbers swap around.
- This is not a bug.
We counter the above by creating symlinks with device-unique names (serial numbers, UUIDs, etc.) e.g. /dev/disk/by-uuid and /dev/input/by-id
- udev does not mount your disks, HAL, gnome-volume-manager and pmount do that.
- udev doesn't pick which module gets loaded, modprobe does that.
Common symptoms
/dev/null with wrong permissions: udev failed to start in the real filesystem, make sure that the udevd from the initramfs was killed, and that there is only one udev startup script.
3-minute hang on boot: one of the devices rules is failing, check /var/log/udev as noted below.
- often this is ifup, hdparm, etc.
Useful things
sudo udevadm monitor -e ... this should be run for any problems when a device is plugged in, or removed. It will output UEVENT blocks for the event from the kernel, and a following UDEV block; these are timestamped so you know how long it takes to process. The UDEV block contains more information, which udev adds through various helper programs.
/var/log/udev, this is the output from above for the boot process. Especially note whether a UDEV block takes a long amount of time to appear, or doesn't appear at all.
- To see the actions udevd is taking, you can run it in verbose debug mode:
- sudo pkill udevd
- sudo udevd --debug-trace --verbose --suppress-syslog
- To get more debug info from udev,
edit /usr/share/initramfs-tools/scripts/init-top/udev, and change the line starting udev by adding --debug, removing --daemon (using & instead), and sending stdout and stderr into a file called /dev/.udev.debug . For instance:
/sbin/udevd --debug --resolve-names=never > /dev/.udev.debug 2>&1 &
- then run sudo update-initramfs -k all -u
- After reboot, /dev/.udev.debug will have the udev debug info.
Known bugs
Description of known issues, how to recognise them and stock responses/actions.
Open
Bug# |
Description |
Action |
TBD. |
TBD. |
TBD. |
Closed
Bug# |
Description |
Action |
TBD. |
TBD. |
TBD. |
Non-bugs
TBD.
DebuggingUdev (last edited 2017-01-30 00:30:05 by lfaraone)