[Bug 1972683] Re: After changing GRUB_DISTRIBUTOR variable grub uses wrong grub.cfg file
Tony Middleton
1972683 at bugs.launchpad.net
Tue May 17 13:47:47 UTC 2022
This seems to be a duplicate of 1242417. However the fix applied for
that bug didn't fix the underlying problem but instead created a
workaround that was sufficient for the case that led to the bug. It
does not fix the situation reported here.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2-signed in Ubuntu.
https://bugs.launchpad.net/bugs/1972683
Title:
After changing GRUB_DISTRIBUTOR variable grub uses wrong grub.cfg file
Status in grub2-signed package in Ubuntu:
New
Bug description:
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)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2-signed/+bug/1972683/+subscriptions
More information about the foundations-bugs
mailing list