How to turn on debugging in udev in Red Hat Enterprise Linux?

Solution Verified - Updated

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 quiet and add the parameter rd.udev.log-priority=debug

      grubby --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

Runtime debugging

  • Red Hat Enterprise Linux 6,7,8- Use the udevadm command 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
  • Red Hat Enterprise Linux 5 - Use the udevcontrol command 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

Permanent debugging

  • Red Hat Enterprise Linux 5,6,7,8 - Edit the /etc/udev/udev.conf file and replace line:

      udev_log="err"
      
      with
      
      udev_log="debug"
    

Diagnostic Steps

SBR
Components
Category

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.