I have problem where I do not know how find the cause: After selecting Linux to boot from the grub menu my system seems to "shut down" seemingly instantly sometime during the boot process after some messages are logged as if it lost power or halted immediately.
This seems to happen so early when booting that the file system is not yet mounted and no logs are written anywhere so I could diagnose the problem. It mostly happens before the vga resolution is switched to a higher resolution. I can read some of the verbose messages during the boot process, but there is no unusual error message and the shutdown mostly happens around the time before the resolution is switched, but it is not 100% consistent.
Strangely, sometimes the system can boot successfully. Everything seems to random. I am fairly certain that it should not be a hardware issue such as the power supply. The reason is that the system never shuts off when I boot Windows and I already tried swapping components such as power supply, mainboard and RAM.
Does anyone know how one could diagnose the problem and find the cause? Or even better, what the problem could be?
>Solution :
From the description of the problem I’m not sure how this will help. However, these are my general tips for debugging the very early boot process.
- remove kernel arguments like
quietandsplash. From the comments, it sounds like you are already doing this. - add kernel argument
debug=. This will configure casper to write a debug log to/casper.loginside the initrd temporary filesystem, which will be copied to/var/log/casper.login the real file system. - add kernel argument
debug. This is different than thedebug=argument. This will configure initramfs to write a debug log to/run/initramfs/initramfs.debug. - add
break=kernel argument to pause the boot process in the initramfs and open a debug shell. E.g.break=topwill pause the boot process at the beginning.
Links
- https://wiki.ubuntu.com/DebuggingCasper
- https://wiki.debian.org/InitramfsDebug
- https://manpages.ubuntu.com/manpages/bionic/en/man8/initramfs-tools.8.html