1

This is the first time that I'm installing a grub efi loader, and I admit that things has been a mess.

I.e., as per UEFI Grub not finding config file, "GRUB loads grub.cfg from the ESP using an absolute path", e.g., /EFI/debian/grub.cfg, however I don't have any grub.cfg in my ESP partition.

$ find EFI/ | grep -v Microsoft/
EFI/
EFI/debian
EFI/debian/grubx64.efi
EFI/Microsoft
EFI/Boot
EFI/Boot/bootx64.efi
EFI/systemd
EFI/systemd/systemd-bootx64.efi
EFI/Linux
EFI/ubuntu
EFI/ubuntu/grubx64.efi

I am wondering where they are, and I now try to understand how it boots, as I've lost track of that. The answer to How does the grub efi loader find the correct grub.cfg and boot directory? looks into the bootx64.efi file, but I'm really not sure how relevant it is to my case as I'm getting:

$ strings EFI/Boot/bootx64.efi | grep search.fs_uuid | wc
      0       0       0

$ strings EFI/Boot/bootx64.efi | grep search | wc
      0       0       0

Using efibootmgr -v doesn't reveal much how it is booting either. It only prints something like:

Boot0000* debian        HD(13,GPT,007a058a-8e5e-45df-8d97-6575b66b5355,0x1afa9000,0x113000)/File(\EFI\debian\grubx64.efi)

The ubuntu entry is quite similar too. My questions are, for the ubuntu entry,

  • how can I know where its grub.cfg file is, and
  • how can I change it, pointing to the one on another partition instead, and
  • when grub boots, would that partition containing the grub.cfg file be considered as the default root by grub?

I want to switch grub.cfg file to the partition that contain a bunch of .iso files, and I want to know if I can assume that I can directly refer to those .iso files without trying to search for the partition first.

xpt
  • 1,182
  • 2
  • 13
  • 32
  • And your Debian version is? – Artem S. Tashkinov Oct 29 '21 at 02:15
  • I don't know how it is relevant to my ubuntu entry question, but my Debian version is 11 @ArtemS.Tashkinov. – xpt Oct 29 '21 at 03:46
  • I installed an older version of Debian a while back & it seemed to compile grub.cfg into the .efi boot file. Ubuntu have grub.cfg in /EFI/ubuntu/grub.cfg for a full instal which is a configfile entry to full grub in /bootl. You can install grub using --removable and manually create your own grub.cfg to boot ISO. I did that for some smaller flash drives, but now usually do a full install & add ISO boot entries to grub in /boot. https://askubuntu.com/questions/549647/uefi-machine-doesnt-boot-ubuntu-through-nvram-bootcatalog-how-to-fix & https://help.ubuntu.com/community/Grub2/ISOBoot/Examples – oldfred Oct 29 '21 at 03:53

0 Answers0