How to turn on debugging in udev in Red Hat Enterprise Linux?
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 5
- udev
Issue
- How to turn on verbose debugging in udev in Red Hat Enterprise Linux?
- How do I debug udev?
Resolution
Boot-time debugging
-
Red Hat Enterprise Linux 7 or 8 - Edit the GRUB kernel boot line, remove the parameters
rhgb quietand add the parameterrd.udev.log-priority=debuggrubby --args="rd.udev.log-priority=debug" --remove-args="rhgb quiet" --update-kernel /boot/vmlinuz-$(uname -r) Then to check on this run: grubby --info /boot/vmlinuz-$(uname -r)- rd.udev.log-priority=debug will write the udev debug logs in journal log. you can see the debug logs by "journalctl -r -u systemd-udevd".
-
Red Hat Enterprise Linux 6 - Navigate to kernel menu entry that you are booting from and replace the following parameters.
vi /etc/grub.conf Replace `rhgb quiet` with `rdudevdebug` on the `kernel /vmlinuz...` menu entry line- NOTE: More extensive debugging can be enabled by adding an extra parameter after
rdudevdebug:
vi /etc/grub.conf Replace `rhgb quiet` with `rdudevdebug rdudevlog_priority=debug`- The second parameter,
rdudevlog_priority=debug, will create the udev debug file/dev/.udev/udev.log
- NOTE: More extensive debugging can be enabled by adding an extra parameter after
Runtime debugging
- Red Hat Enterprise Linux 6,7,8- Use the
udevadmcommand to enable/disable debug logging:- To enable udev debug logging:
# udevadm control --log-priority=debug
- To disable udev debug logging:
# udevadm control --log-priority=err
- To enable udev debug logging:
- Red Hat Enterprise Linux 5 - Use the
udevcontrolcommand to enable/disable debug logging:- To enable udev debug logging:
# /sbin/udevcontrol log_priority=debug
- To disable udev debug logging:
# /sbin/udevcontrol log_priority=err
- To enable udev debug logging:
Permanent debugging
-
Red Hat Enterprise Linux 5,6,7,8 - Edit the
/etc/udev/udev.conffile and replace line:udev_log="err" with udev_log="debug"
Diagnostic Steps
- How can I debug issues that occur during the initial ramfs?
- How to add debug messages to the boot process in Red Hat Enterprise Linux
SBR
Product(s)
Components
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.