[neon/neon/livecd-rootfs/Neon/release] live-build/buildd/hooks: fix: GRUB_DISTRIBUTION for buildd

John Chittum null at kde.org
Thu Oct 5 11:19:12 BST 2023


Git commit 1184af06b0b971b5701d8eb3ad9bcd4f5a50fc57 by John Chittum.
Committed on 07/09/2023 at 21:40.
Pushed by jriddell into branch 'Neon/release'.

fix: GRUB_DISTRIBUTION for buildd

LP: #2034253 Grub is found to use lsb_release or default to Debian.
buildd does not have lsb_release, so Debian was the GRUB_DISTRIBUTION.
that ends up with issues with the EFI path

M  +16   -11   live-build/buildd/hooks/02-disk-image-uefi.binary

https://invent.kde.org/neon/neon/livecd-rootfs/-/commit/1184af06b0b971b5701d8eb3ad9bcd4f5a50fc57

diff --git a/live-build/buildd/hooks/02-disk-image-uefi.binary b/live-build/buildd/hooks/02-disk-image-uefi.binary
index d358596a..55bc73a9 100755
--- a/live-build/buildd/hooks/02-disk-image-uefi.binary
+++ b/live-build/buildd/hooks/02-disk-image-uefi.binary
@@ -97,7 +97,21 @@ install_grub() {
     # not called here as it calls snap-seed-parse, resulting in duplicate
     # snap listings)
     chroot mountpoint dpkg-query -W > binary/boot/filesystem.packages
-
+    # LP: 2034253 
+    # awaiting grub updates, we need to set the Distributor _before_ running grub-install
+    # so that the EFI bits are in the correct place
+    # buildd doesn't have `lsb_release`
+    # so adding GRUB_DISTRIBUTOR, hardcoded to Ubuntu, for buildd for now
+        cat > mountpoint/etc/default/grub.d/50-builddimg-settings.cfg << EOF
+GRUB_DEFAULT=0
+GRUB_HIDDEN_TIMEOUT=0.1
+GRUB_HIDDEN_TIMEOUT_QUIET=true
+GRUB_TIMEOUT=0.1
+GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"
+GRUB_RECORDFAIL_TIMEOUT=0
+GRUB_TERMINAL=console
+GRUB_DISTRIBUTOR=Ubuntu
+EOF
     chroot mountpoint grub-install "${loop_device}" \
         --boot-directory=/boot \
         --efi-directory=/boot/efi \
@@ -105,22 +119,13 @@ install_grub() {
         --uefi-secure-boot \
         --no-nvram
 
+
     if [ "$ARCH" = "amd64" ]; then
         # Install the BIOS/GPT bits. Since GPT boots from the ESP partition,
         # it means that we just run this simple command and we're done
         chroot mountpoint grub-install --target=i386-pc "${loop_device}"
     fi
 
-    cat > mountpoint/etc/default/grub.d/50-builddimg-settings.cfg << EOF
-GRUB_DEFAULT=0
-GRUB_HIDDEN_TIMEOUT=0.1
-GRUB_HIDDEN_TIMEOUT_QUIET=true
-GRUB_TIMEOUT=0.1
-GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"
-GRUB_RECORDFAIL_TIMEOUT=0
-GRUB_TERMINAL=console
-EOF
-
     divert_grub mountpoint
     chroot mountpoint update-grub
     replace_grub_root_with_label mountpoint



More information about the Neon-commits mailing list