<para>If the boot process does not succeed, you have several options to debug the situation:</para>
<para>Follow the instructions on: <ulink url="http://fedoraproject.org/wiki/How_to_debug_Dracut_problems">http://fedoraproject.org/wiki/How_to_debug_Dracut_problems</ulink></para>
<para/>
<para>
<section><title>Identifying your problem area</title>
<para>
# Remove ''rhgb'' and ''quiet'' from the kernel command line
# Add ''rdshell'' to the kernel command line. This will present a shell should dracut be unable to locate your root device
# Add ''rdshell rdinitdebug'' to the kernel command line so that dracut shell commands are printed as they are executed
# With dracut >= 002-11 [http://koji.fedoraproject.org/koji/buildinfo?buildID=134721], you can inspect the rdinitdebug output with:
#:<pre># less /init.log</pre>
#:<pre># dmesg | less</pre>
<para>If the boot process does not succeed, you have several options to debug the situation. Some of the basic operations are covered here. For more information you should also visit: <ulink url="http://fedoraproject.org/wiki/How_to_debug_Dracut_problems">http://fedoraproject.org/wiki/How_to_debug_Dracut_problems</ulink></para>
<section id="identifying-your-problem-area">
<title>Identifying your problem area</title>
<orderedlist>
<listitem>
<para>Remove ''rhgb'' and ''quiet'' from the kernel command line
</para>
</section>
== Logical Volume Management related problems ==
As well as the information from [[How_to_debug_Dracut_problems#AllInfo|the 'all bug reports' section]], include the following information:
* Include physical volume information by running the command: {{command|lvm pvdisplay}}
* Include volume group information by running the command: {{command|lvm vgdisplay}}
* Include logical volume information by running the command: {{command|lvm lvdisplay}}
== Software RAID related problems ==
As well as the information from [[How_to_debug_Dracut_problems#AllInfo|the 'all bug reports' section]], include the following information:
* If using software RAID disk partitions, please include the output of {{filename|/proc/mdstat}}
== Network root device related problems ==
This section details information to include when experiencing problems on a system whose root device is located on a network attached volume (e.g. iSCSI, NFS or NBD). As well as the information from [[How_to_debug_Dracut_problems#AllInfo|the 'all bug reports' section]], include the following information:
* Please include the output of {{command|ip addr show}}
{{Anchor|Debugging}}
= Debugging dracut =
== Configure a serial console ==
Successfully debugging dracut will require some form of console logging during the system boot. This section documents configuring a serial console connection to record boot messages.
# First, enable serial console output for both the kernel and the bootloader.
#* Open the file {{filename|/etc/grub.conf}} for editing. Below the line ''timeout=5'', add the following:
#*: <pre>
#*:serial --unit=0 --speed=9600
#*:terminal --timeout=5 serial console
#*:</pre>
#* Also in {{filename|/etc/grub.conf}}, add the following boot arguemnts to the ''kernel'' line:
#*: <pre>console=tty0 console=ttyS0,9600</pre>
#* When finished, the {{filename|/etc/grub.conf}} file should look similar to the example below.
#* More detailed information on how to configure the kernel for console output can be found at [http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL].
{{admon/tip|Redirecting non-interactive output|You can redirect all non-interactive output to /dev/kmsg and the kernel will put it out on the console when it reaches the kernel buffer by doing
<pre>exec >/dev/kmsg 2>&1 </dev/console</pre>}}
== Using the dracut shell ==
Dracut offers a shell for interactive debugging in the event dracut fails to locate your root filesystem. To enable the shell:
# Add the boot parameter ''rdshell'' to your bootloader configuration file (e.g. {{filename|/etc/grub.conf}}
# Remove the boot arguments ''rhgb'' and ''quiet''
A sample {{filename|/etc/grub.conf}} bootloader configuration file is listed below.
<pre>default=0
</listitem>
<listitem>
<para>Add ''rdshell'' to the kernel command line. This will present a shell should dracut be unable to locate your root device
</para>
</listitem>
<listitem>
<para>Add ''rdshell rdinitdebug'' to the kernel command line so that dracut shell commands are printed as they are executed
</para>
</listitem>
<listitem>
<para>With dracut >= 002-11, you can inspect the rdinitdebug output with:
<para>In all cases, the following should be mentioned and attached to your bug report:
</para>
<itemizedlist>
<listitem>
<para>The exact kernel command-line used. Typically from the bootloader configuration file (e.g. <filename>/etc/grub.conf</filename>) or from <filename>/proc/cmdline</filename>.</para>
</listitem>
<listitem>
<para>A copy of your disk partition information from <filename>/etc/fstab</filename>, which might be obtained booting an old working initramfs or a rescue medium.</para>
</listitem>
<listitem>
<para>A device listing from device-mapper. This can be obtained by running the command <screen># dmsetup ls --tree</screen></para>
</listitem>
<listitem>
<para>A list of block device attributes including vol_id compatible mode. This can be obtained by running the commands: <screen># blkid -p
# blkid -p -o udev</screen></para>
</listitem>
<listitem>
<para>Turn on dracut debugging (see <filename>the 'debugging dracut' section</filename>), and attach all relevant information from the boot log. This can be obtained by running the command <screen># dmesg|grep dracut</screen></para>
</listitem>
<listitem>
<para>If you use a dracut configuration file, please include <filename>/etc/dracut.conf</filename>
and all files in <filename>/etc/dracut.conf.d/*.conf</filename></para>
<title id="network-root-device-related-problems-title">Network root device related problems</title>
<para>This section details information to include when experiencing problems on a system whose root device is located on a network attached volume (e.g. iSCSI, NFS or NBD). As well as the information from <xref linkend="all-bug-reports"/>, include the following information:
</para>
<itemizedlist>
<listitem>
<para>Please include the output of <screen># /sbin/ifup <replaceable><interfacename></replaceable>
<title id="configure-a-serial-console-title">Configure a serial console</title>
<para>Successfully debugging dracut will require some form of console logging during the system boot. This section documents configuring a serial console connection to record boot messages.
</para>
<orderedlist>
<listitem>
<para>First, enable serial console output for both the kernel and the bootloader.
</para>
</listitem>
<listitem>
<para>Open the file <filename>/etc/grub.conf</filename> for editing. Below the line ''timeout=5'', add the following:
<screen>serial --unit=0 --speed=9600
terminal --timeout=5 serial console</screen></para>
</listitem>
<listitem>
<para>Also in <filename>/etc/grub.conf</filename>, add the following boot arguemnts to the ''kernel'' line:
<para>More detailed information on how to configure the kernel for console output can be found at <ulink url="http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL">http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL</ulink>.
</para>
</listitem>
</orderedlist>
<note>
<title>Redirecting non-interactive output</title>
<para>You can redirect all non-interactive output to <filename>/dev/kmsg</filename> and the kernel will put it out on the console when it reaches the kernel buffer by doing<screen># exec >/dev/kmsg 2>&1 </dev/console</screen></para>
</note>
</section>
<section id="using-the-dracut-shell">
<title id="using-the-dracut-shell-title">Using the dracut shell</title>
<para>Dracut offers a shell for interactive debugging in the event dracut fails to locate your root filesystem. To enable the shell:
<orderedlist>
<listitem>
<para>Add the boot parameter ''rdshell'' to your bootloader configuration file (e.g. <filename>/etc/grub.conf</filename>)</para>
</listitem>
<listitem>
<para>Remove the boot arguments ''rhgb'' and ''quiet''
</para>
<para>
A sample <filename>/etc/grub.conf</filename> bootloader configuration file is listed below.
<para>If system boot fails, you will be dropped into a shell as seen in the example below.
<screen>No root device found
Dropping to debug shell.
sh: can't access tty; job control turned off
#
</pre>
Use this shell prompt to gather the information requested above (see [[How_to_debug_Dracut_problems#AllInfo|the 'all bug reports' section]]).
sh: can't access tty; job control turned off
== Accessing the root volume from the dracut shell ==
From the dracut debug shell, you can manually perform the task of locating and preparing your root volume for boot. The required steps will depend on how your root volume is configured. Common scenarios include:
* A block device (e.g. {{filename|/dev/sda7}})
* A LVM logical volume (e.g. {{filename|/dev/VolGroup00/LogVol00}})
* An encrypted device (e.g. {{filename|/dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83}})
* A network attached device (e.g. {{filename|netroot{{=}}iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all}})
The exact method for locating and preparing will vary. However, to continue with a successful boot, the objective is to locate your root volume and create a symlink {{filename|/dev/root}} which points to the file system. For example, the following example demonstrates accessing and booting a root volume that is an encrypted LVM Logical volume.
# Inspect your partitions using {{command|parted}}
#: <pre>
#: parted /dev/sda -s p
#: Model: ATA HTS541060G9AT00 (scsi)
#: Disk /dev/sda: 60.0GB
#: Sector size (logical/physical): 512B/512B
#: Partition Table: msdos
#:
#: Number Start End Size Type File system Flags
#: 1 32.3kB 10.8GB 107MB primary ext4 boot
#: 2 10.8GB 55.6GB 44.7GB logical lvm</pre>
# You recall that your root volume was a LVM logical volume. Scan and activate any logical volumes
#: <pre>
#: lvm vgscan
#: lvm vgchange -ay</pre>
# You should see any logical volumes now using the command {{command|blkid}}:
# From the output above, you recall that your root volume exists on an encrypted block device. Following the guidance disk encryption guidance from the [http://docs.fedoraproject.org/install-guide/f{{FedoraVersion}}/en-US/html/apcs04s04.html {{FedoraVersion|long}} Installation Guide], you unlock your encrypted root volume.
<title id="accessing-the-root-volume-from-the-dracut-shell-title">Accessing the root volume from the dracut shell</title>
<para>From the dracut debug shell, you can manually perform the task of locating and preparing your root volume for boot. The required steps will depend on how your root volume is configured. Common scenarios include:
<para>The exact method for locating and preparing will vary. However, to continue with a successful boot, the objective is to locate your root volume and create a symlink <filename>/dev/root</filename> which points to the file system. For example, the following example demonstrates accessing and booting a root volume that is an encrypted LVM Logical volume. </para>
<orderedlist>
<listitem>
<para>Inspect your partitions using <command>parted</command><screen># parted /dev/sda -s p
<para>From the output above, you recall that your root volume exists on an encrypted block device. Following the guidance disk encryption guidance from the Installation Guide, you unlock your encrypted root volume.