How can I debug issues that occur during the initial ramfs (initramfs)?

Solution Verified - Updated

Environment

Red Hat Enterprise Linux (RHEL) 6

Issue

Red Hat Enterprise Linux 6 is having an issue during boot up that occurs before switchroot.

Resolution

The following boot parameters are available to assist with debugging boot issues.

  • rdshell

    • Drop to a shell, if the initramfs fails. This is helpful if the ramfs is unable to determine the location of the root file-system and will allow you to create /dev/root manually to continue the boot up process.
  • rdinitdebug

    • set -x for the dracut shell, so that dracut shell commands are printed as they are executed. With dracut >= 002-11, you can inspect the rdinitdebug output with less /init.log or dmesg | less commands.
  • rdbreak=[pre-udev|pre-mount|mount|pre-pivot]

    • drop the shell on defined breakpoint. entering 'exit' into the shell will move to the next breakpoint, allowing for debugging throughout the boot up process (until switchroot)
  • rdudevinfo

    • set udev to loglevel info. Takes precedence over /etc/udev/udev.conf
  • rdudevdebug

    • set udev to loglevel debug. Takes precedence over /etc/udev/udev.conf
  • rdnetdebug

    • debug network scripts in dracut. Output is written to /tmp

For more information you can also visit: Content from fedoraproject.org is not included.How to debug Dracut problems.
Note, the information on this page is not published by the Red Hat, but by a third-party. Red Hat is not responsible for the content of this document.

Root Cause

Red Hat Enterprise Linux 6 bundles a small ram-based initial root filesystem into the kernel. This is different from previous versions of RHEL that used a small ram-based disk. The new file-system allows for debugging options to be passed on the kernel line that are executed at the dracut shell.

Diagnostic Steps

Add the boot parameters to the kernel parameter in the grub menu (at boot time) or by modifying the /etc/grub/grub.conf file.

	kernel /vmlinuz-2.6.32-131.17.1.el6.x86_64 ro root=/dev/mapper/vg_rhel6-lv_root rd_LVM_LV=vg_rhel6/lv_root rd_LVM_LV=vg_rhel6/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet rdshell
  • note the rdshell added to the end of the line as an example.
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.