0

I keep lots of copies of the root partition in LVM managed logical volumes. There is a /boot/grub/grub.cfg file in each root partition. In the past, I was able to select which volume to use by default by running grub-install. After I upgraded to Eoan, this isn't working.

After looking at update-grub does not update /boot/efi/EFI/ubuntu/grub.cfg, I decided that this was probably how grub found the correct place to look for the real grub.cfg. I tried updating this file by hand but it had no effect. /boot/efi is mounted from a real partition (not managed by LVM),

UUID=1582-7C5D  /boot/efi       vfat    umask=0077      0       1

Any ideas what to try?

  • As you have found, there are two grub.cfg in UEFI boot mode. The one in the ESP is just a configfile entry to load the grub.cfg in your install. I have manually edited /efi/EFI/ubuntu/grub.cfg to boot a different install. The sudo update-grub only updated grub.cfg install. To have system update the one in ESP, you have to totally reinstall grub.https://askubuntu.com/questions/1001426/how-to-remove-separate-boot-partition-on-uefi-system & https://askubuntu.com/questions/738132/ubuntu-14-04-doesnt-boot-grub-prompt – oldfred Oct 18 '19 at 20:24
  • You have rehashed what I already know. If the edits I made to /efi/EFI/ubuntu/grub.cfg actually had some effect then I would be happy to control my boot configuration via this file. However, manually editing this file didn't do anything. Any idea why? – Joshua Pritikin Oct 18 '19 at 22:00
  • Is there some way to get grub to log what it's doing so its current configuration becomes more transparent? – Joshua Pritikin Oct 18 '19 at 22:07
  • Here's the script I wrote, https://gist.github.com/jpritikin/7f9d3dcdf8bce3e89137cc1925ff7d15 – Joshua Pritikin Oct 18 '19 at 22:12
  • I do not think you can run commands in grub, except for a very few grub specific commands. And UEFI boot of Ubuntu is hard coded to only boot /boot//efi/EFI/ubuntu. I have changed settings in /etc/default/grub with new name & it creates new UEFI entry with that name & new grub.cfg, but uses the grub.cfg in /EFI/ubuntu. – oldfred Oct 18 '19 at 22:24

1 Answers1

0

Ah ha! Grub doesn't understand lvm snapshots. I copied my root filesystem to a regular lvm volume and things started working again.

  • It seems that /efi/EFI/ubuntu/grub.cfg just documents grub's setting which is hardcoded into the efi binary. Grub seems to ignore changes to this file. – Joshua Pritikin Oct 18 '19 at 23:18