Fail to boot after update efi grub

Hi everybody !

I am a happy qubes os user since 2019.

My objective was to restore the display of messages on boot (instead of the loading animation).

So for that:

  • I modified the necessary lines in the file: /etc/default/grub
  • then launched the command “grub2-mkconfig -o /boot/efi/EFI/qubes/grubx64.cfg” (efi mode)
  • And I restarted to test…

Unable to boot on Qubes OS after this change.

To try to correct the problem I:

  • Booted in rescue mode
  • Performed a chroot
  • Restored the original settings in /etc/default/grub
  • Generated a new boot configuration with grub2-mkconfig command
  • Check the entry in EFI firmware with efibootmgr -v command is correct

But … still unable to boot :frowning:

My last idea was to reinstall the grub efi with the command dnf reinstall grub2-efi but I don’t think this is the solution.

Would I have missed something? Do you have any ideas to help me? Thank you in advance for your help!

Maybe you meant to overwrite grub.cfg with grub2-mkconfig command, but accidentally overwrote grubx64.efi ?

Hi, thank you for your reply !

This is a possibility, what should be the approximate size of the .efi? I’ll check.

If it is necessary to reinstall it, how can I do it from rescue mode without a network?

This is a possibility, what should be the approximate size of the .efi? I’ll check.

Approximately 2MB.

If it is necessary to reinstall it, how can I do it from rescue mode without a network?

It should be possible to generate a custom grub image by referring to the following
qubes-lorax-templates/templates/efi.tmpl at v4.1.11 · QubesOS/qubes-lorax-templates · GitHub

It should be possible to generate a custom grub image by referring to the following https://github.com/QubesOS/qubes-lorax-templates/blob/v4.1.11/templates/efi.tmpl#L11-L33

Thank you very much for the information !
How did you find this file in the sources? (I would never have thought to search in qubes-lorax-templates)

But I didn’t understand this line (content of option -p):

    -p /EFI/BOOT ${grub_modules}

What is this path?

And is this code valid for version 4.1.2 that I am using?

Wouldn’t it be easier to download the grub2-efi package and install it offline? Or maybe this package doesn’t work for a system like XEN?

Ah, it should be replaced with /EFI/qubes. It specifies where grub will search by default (for grub.cfg, etc.)

Thus the command would look like:

grub2-mkimage -O x86_64-efi -o ./grubx64.efi -p /EFI/qubes \
    all_video boot btrfs cat configfile echo efifwsetup efinet ext2 \
    fat font gfxmenu gfxterm gzio halt hfsplus http increment \
    iso9660 jpeg loadenv loopback linux lvm lsefi lsefimmap	\
    mdraid09 mdraid1x minicmd net normal part_apple part_msdos \
    part_gpt password_pbkdf2 png reboot search search_fs_uuid \
    search_fs_file search_label serial sleep syslinuxcfg test tftp \
    video xfs backtrace chain usb usbserial_common usbserial_pl2303 \
    usbserial_ftdi usbserial_usbdebug multiboot2

Since Qubes OS’s grub2 is customized, it is better to boot an installation image of the same version as your machine has and use it’s rescue shell.

Thanks for your help @kommuni !