Public bug reported:

An ubuntu system has files in a folder within /boot/efi/EFI and an EFI
variable both of whose names are given by the GRUB_DISTRIBUTOR variable
in /etc/default/grub.  By default this is set to "ubuntu".

I wish to have two ubuntu systems on the same machine so on one of them
at least need to change GRUB_DISTRIBUTOR to something else.  In the past
I have done this with two systems "main" and "backup".  This worked fine
using grub-efi-amd64.

I have recently tried this on a new system using grub-efi-amd64-signed
and ended up with an unbootable system.

After some investigation it turns out that whatever folder within
/boot/efi/EFI  you boot from it always uses grub.cfg from
/boot/efi/EFI/ubuntu.

I can now recreate this at will in virtualbox.  To exhibit this do the
following steps:

Do a fresh install of ubuntu in virtualbox.  Check for existence of
/boot/efi/EFI/ubuntu,  that an EFI entry is shown by efibootmgr and that
the system reboots.

Change the value of GRUB_DISTRIBUTOR in /etc/default/grub to "test".
Run dpkg-reconfigure grub-efi-amd64-signed to trigger grub-install.
Check for existence of /boot/efi/EFI/test,  that a test EFI entry is
shown by efibootmgr.  Change nextboot to the test entry and check that
the system reboots.

Rename grub.cfg from /boot/efi/EFI/test and reboot from the test entry.
Boot should fail,  but it doesn't.

Restore the test grub.cfg and rename the grub.cfg in
/boot/efi/EFI/ubuntu.  Reboot from the test entry.  This should work OK
but it fails.

This indicates that even when booting from /boot/efi/EFI/test grub is
using the config file in /boot/efi/EFI/ubuntu

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: grub-efi-amd64-signed 1.180+2.06-2ubuntu7
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: MATE
Date: Mon May  9 15:59:26 2022
InstallationDate: Installed on 2022-04-26 (12 days ago)
InstallationMedia: Ubuntu-MATE 22.04 LTS "Jammy Jellyfish" - Release amd64 
(20220419)
SourcePackage: grub2-signed
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: grub2-signed (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug jammy

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1972683

Title:
  After changing GRUB_DISTRIBUTOR variable grub uses wrong grub.cfg file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2-signed/+bug/1972683/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to