Question: How to debug/find, changes or failing commands during the boot process?
1. 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
2. On the line with “linux” remove following entries if present to get more details at boot time.
splash=silent quiet showopts
3. Then add following entries to get step by step.
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
4. Once the changes are done, save them with “CTRL+x” and booting shall continue from here with verbose systemd debugging.
Note: These are temporary changes to the booting and will not affect the next booting.