Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reading GRUB2 debug logs

Tags:

grub

grub2

I want to see GRUB2 debug logs generated by grub_dprintf(), for example, at mmap.c:

  grub_dprintf ("mmap", "EFI memory region 0x%llx-0x%llx: %d\n",
        (unsigned long long) desc->physical_start,
        (unsigned long long) desc->physical_start
        + desc->num_pages * 4096, desc->type);

After some research, I found out the way to enable this log is by setting debug env variable at grub menu (I changed it on grub.cfg, probably am not supposed to do this)

set debug=all

How can I check the logs? The grub logs scrolled so fast during boot that it is hard to check. Perhaps there is a way to check the logs after kernel boots?

I am using CENTOS 7.

like image 369
electro Avatar asked Jan 22 '16 02:01

electro


People also ask

Where are GRUB2 configuration files stored?

The main Grub 2 configuration file, normally located in the /boot/grub folder, is grub. cfg. It is the product of various scripts and should not normally be edited directly.

When you enter the grub menu and pressing the e key to edit a script what key can you hit to enter a command line interface?

4. 'c' for Command Line Mode. Press the 'c' key at the GRUB Menu to switch into 'CLI Mode'. From here you can do a wealth of things, including changing menu entry names, fixing a broken install, or booting into a custom kernel configuration.

What is RHGB quiet in grub conf?

The option rhgb is used for graphical boot-up and the quiet option eliminates most of the boot messages.


1 Answers

Probably too late to be useful, but you could try:

set pager=1
like image 132
lemoncucumber Avatar answered Sep 28 '22 21:09

lemoncucumber