• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Debug systemd boot process in CentOS/RHEL 7 and 8

by admin

Question: How to debug/find, changes or failing commands during boot process?

During boot process, when seeing grub boot menu press “e” for edit the grub, then scroll down until you see boot entry:

echo "Loading Linux...
linux16 /vmlinuz-XXX root=XXXro crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet LANG=en_US.UTF-8

On the line with “linux” remove the following entries if present to get more details at boot time.

splash=silent quiet showopts

Then add following entries to get step by step debug logs.

plymouth.enable=0 systemd.confirm_spawn=true systemd.debug-shell=1 systemd.log_level=debug systemd.unit=multi-user.target console=tty1

Here,
plymouth.enable=0 will disable plymouth bootsplash.
systemd.confirm_spawn=true asks for confirmation when spawning processes like interactive boot.
systemd.debug-shell=1 enables a root shell on console 9 (reachable via F9).
systemd.log_level=debug enables debug logging.
systemd.unit=multi-user.target avoids switch to console 7 for output and input stays at console 1.
console=tty1 avoids switch of input/ouput to console 9 where bash will get attached.

With CTRL+x booting with the given changes, these changes are not permanent.

Filed Under: CentOS/RHEL, CentOS/RHEL 7, CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. nmcli Command Examples in Linux (Cheat Sheet)
  2. “az feedback”: Send feedback to the Azure CLI Team
  3. exercism: Download and solve problems from the command-line
  4. strip Command Examples in Linux
  5. CentOS / RHEL 6 : How to configure kdump
  6. ex: Command-line text editor
  7. How to Add Network Printer via Command Line in CentOS/RHEL
  8. gcloud: The official CLI tool for Google Cloud Platform
  9. squeue Command Examples in Linux
  10. getcap Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright