[Bug 2034253] Re: Jammy buildd image doesn't boot because grub is installed to \EFI\debian instead of \EFI\ubuntu

Julian Andres Klode 2034253 at bugs.launchpad.net
Thu Sep 7 10:21:05 UTC 2023


I don't plan to keep a delta, so I'm thinking

diff --git a/debian/default/grub b/debian/default/grub
index 03f98ec7f..5068a6566 100644
--- a/debian/default/grub
+++ b/debian/default/grub
@@ -5,7 +5,7 @@
 
 GRUB_DEFAULT=0
 GRUB_TIMEOUT=@DEFAULT_TIMEOUT@
-GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
+GRUB_DISTRIBUTOR=`. /etc/os-release && echo $NAME || echo @DPKG_VENDOR@`
 GRUB_CMDLINE_LINUX_DEFAULT="@DEFAULT_CMDLINE@"
 GRUB_CMDLINE_LINUX=""
 
diff --git a/debian/rules b/debian/rules
index 0da34cae0..5cfd8bf4e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -145,6 +145,7 @@ endif
 # rebuild grub, need a programmatic way to get the vendor, as it's used by build-efi-images
 # to create the monolithic Grub image and thus is needed to create the partitions on the EFI
 # media. Add it to the control file user metadata: XB-Efi-Vendor: $vendor
+DPKG_VENDOR ?= $(shell dpkg-vendor --query vendor)
 SB_EFI_VENDOR ?= $(shell dpkg-vendor --query vendor | tr '[:upper:]' '[:lower:]')
 
 %:
@@ -355,6 +356,7 @@ platform_subst = \
        if [ -e debian/$(1) ]; then \
                debian/platform-subst \
                        PACKAGE="$(2)" \
+                       DPKG_VENDOR="$(DPKG_VENDOR)" \
                        DEFAULT_CMDLINE="$(DEFAULT_CMDLINE)" \
                        DEFAULT_TIMEOUT="$(DEFAULT_TIMEOUT)" \
                        DEFAULT_HIDDEN_TIMEOUT_BOOL="$(DEFAULT_HIDDEN_TIMEOUT_BOOL)" \


But maybe also just drop dynamic lookup entirely because that breaks expectations in some ways, e.g. shim can't find grub anymore if you change grub distributor.

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

Title:
  Jammy buildd image doesn't boot because grub is installed to
  \EFI\debian instead of \EFI\ubuntu

Status in cloud-images:
  Confirmed
Status in grub2 package in Ubuntu:
  New
Status in livecd-rootfs package in Ubuntu:
  Confirmed

Bug description:
  Recent Jammy buildd images fail to boot (since at least September 1st:
  https://github.com/canonical/craft-
  application/actions/runs/6016993725/job/16424264050?pr=64).

  Trying to run an image from https://cloud-
  images.ubuntu.com/buildd/daily/jammy/current in QEMU, only gets me a
  GRUB prompt. Multipass and Snapcraft consequently fail to work with
  these images.

  I haven't checked other image series.

  This is similar to https://bugs.launchpad.net/cloud-
  images/+bug/2027686, but a new issue.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/2034253/+subscriptions




More information about the foundations-bugs mailing list