From b6dedb62ce3a6afb882f6022159e558ed534cb85 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 3 Oct 2018 17:21:56 -0700 Subject: [PATCH] Unconditionally set GRUB_FORCE_PARTUUID in cloud images; as of version 2.02+dfsg1-5ubuntu5 grub will automatically fall back to booting with an initrd if one is available, so we can now always attempt initramfsless boot for cloud images which almost always works and causes only minimal increase in boot speed for cases where it does not. --- debian/changelog | 10 ++++++++++ live-build/ubuntu-cpc/hooks/032-disk-image.binary | 2 +- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0c1e3411..cf794680 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +livecd-rootfs (2.542) UNRELEASED; urgency=medium + + * Unconditionally set GRUB_FORCE_PARTUUID in cloud images; as of version + 2.02+dfsg1-5ubuntu5 grub will automatically fall back to booting with an + initrd if one is available, so we can now always attempt initramfsless + boot for cloud images which almost always works and causes only minimal + increase in boot speed for cases where it does not. + + -- Steve Langasek Wed, 03 Oct 2018 17:13:46 -0700 + livecd-rootfs (2.541) cosmic; urgency=medium [ Michael Hudson-Doyle ] diff --git a/live-build/ubuntu-cpc/hooks/032-disk-image.binary b/live-build/ubuntu-cpc/hooks/032-disk-image.binary index f7516dde..5bdcf5d4 100755 --- a/live-build/ubuntu-cpc/hooks/032-disk-image.binary +++ b/live-build/ubuntu-cpc/hooks/032-disk-image.binary @@ -121,7 +121,7 @@ if [ "${should_install_grub}" -eq 1 ]; then rm mountpoint/tmp/device.map - if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then + if [ -n "$partuuid" ]; then echo "partuuid found for root device; forcing it in Grub" mkdir -p mountpoint/etc/default/grub.d echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid.cfg diff --git a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary index 56328150..6c435901 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -64,7 +64,7 @@ install_grub() { efi_boot_dir="/boot/efi/EFI/BOOT" chroot mountpoint mkdir -p "${efi_boot_dir}" - if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then + if [ -n "$partuuid" ]; then # FIXME: code duplicated between 032-disk-image.binary # and 033-disk-image-uefi.binary. We want to fix this to not # have initramfs-tools installed at all on these images.