1

I have a linux-box.
My hdd is nvme, hence boot is fast. I need to analyze each line of after grub.

Can I pass a kernel parameter to capture my boot lines?

2
  • your linux almost certainly already logs everything happening at boot, and comes with tools to properly analyze the logs. What is your linux distro? Commented Nov 18 at 10:35
  • I'm not familiar w/ grub but AFAIK it loads the OS kernel. And until the kernel is loaded, it would seem to me that you won't have any logging capability - correct? So it would also seem that any "capture" facility would have to built into grub... but there is none! So maybe the best you can do is to use the "grub command line"? Maybe this Baeldung blog-post would be useful in learning how to use the grub command line? Commented Nov 21 at 2:22

2 Answers 2

0

You can run

dmesg | more 

in the terminal after booting.

2
  • that will only contain the kernel message buffer, none of the messages you usually see at boot. Commented Nov 18 at 17:58
  • Oh, now, It only print kernel ring buffer. Commented Nov 19 at 15:08
0

You didn't tell us your Linux distro, but if it's anything mainstream of the last ca 15 years:

Your boot process, from the very point that control is handed over to the init process (systemd), is logged already; nothing you need to do. journalctl contains everything, and journalctl -b0 allows you to only see the log messages since start of the current boot.

3
  • However journalctl -b0 is showing boot initialization for systemd, but after grub and between boot initialization user can see some printed lines. I need to them. By the way, I use Debian. Commented Nov 19 at 15:30
  • hm, the first line in journalctl is literally the first line that the kernel logs. There's nothing between Grub and starting the kernel – that's Grub's job – so you're looking for something that is actually output by Grub, not after Grub. Commented Nov 19 at 15:44
  • Perhaps consider the option GRUB_DEBUG=all in /etc/default/grub. Capturing it might need a linked serial terminal on another machine. Commented Nov 20 at 1:06

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.