From Fedora Project Wiki


Foreword

If you are experiencing a problem with system boot up due to Systemd, please see the common bugs document before filing a bug. Some easy configuration tweaks that fix a wide range of issues may be listed there. If the problem you are seeing is not listed there or none of the workarounds seem to help, please consider filing a bug to help us make Fedora run better on your hardware.

Be prepared to include some information (logs) about your system as well. These should be complete (no snippets please), not in an archive, uncompressed, with MIME type set as text/plain.

Identifying your problem area

  1. Remove rhgb and quiet from the kernel command line.
  2. Add systemd.log_level=debug to the kernel command line to log systemd with debug output enabled.
  3. Add systemd.log_target=kmsg to the kernel command line to let systemd buffer to be written to the kernel log buffer.
  4. Run /bin/systemd --test --system from command line to test run init as systemd.

Information to include in your report

All bug reports

In all cases, the following should be mentioned and attached to your bug report:

  • The exact kernel command-line used. Typically from the bootloader configuration file (e.g. /etc/grub.conf) or from /proc/cmdline
  • A copy of /var/log/messages
  • The output of the dmesg command dmesg > dmesg.txt
  • Systemd dump systemctl dump > systemd_dump.txt


Note.png
If you experience boot up difficulties before systemd starts running, see Debugging Dracut to diagnose that further.
Note.png
If you're system hangs while starting or running udev, see Debugging Udev to diagnose that further.

Configure a serial console

Successfully debugging boot up will require some form of console logging during the system boot. This section documents configuring a serial console connection to record boot messages.

  1. First, enable serial console output for both the kernel and the bootloader.
    • Open the file /etc/grub.conf for editing. Below the line timeout=5, add the following:
      serial --unit=0 --speed=9600
      terminal --timeout=5 serial console
    • Also in /etc/grub.conf, add the following boot arguemnts to the kernel line:
      console=tty0 console=ttyS0,9600
    • When finished, the /etc/grub.conf file should look similar to the example below.
      default=0
      timeout=5
      serial --unit=0 --speed=9600
      terminal --timeout=5 serial console
      title Fedora (2.6.35.4-18.fc14.x86_64)
      root (hd0,0)
      kernel /vmlinuz-2.6.35.4-18.fc14.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_LVM_LV=VolGroup/lv_root #*:rd_LVM_LV=VolGroup/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc #*:KEYTABLE=is-latin1 systemd.log_level=debug systemd.log_target=kmsg console=tty0 console=ttyS0,9600
      initrd /initramfs-2.6.35.4-18.fc14.x86_64.img
    • More detailed information on how to configure the kernel for console output can be found at [1].
Idea.png
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
exec >/dev/kmsg 2>&1 </dev/console

Enable shell access early in systemd

  1. Run echo "openvt -c9 /bin/sh" >> /etc/rc.d/rc.sysinit to enable shell on tty9 to run various systemctl commands to diagnose problems further.

Additional systemd boot parameters

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

#TODO