From 0eecd0c344ce81df2cdfb9f844e911629be4c500 Mon Sep 17 00:00:00 2001 From: David Krauser Date: Fri, 19 Jul 2019 13:40:44 -0400 Subject: [PATCH] KVM disk images should derive from the uefi image. --- live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) mode change 100644 => 100755 live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary diff --git a/live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary b/live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary old mode 100644 new mode 100755 index 1598390d..931010bc --- a/live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/kvm-image.binary @@ -28,7 +28,7 @@ esac mount_d=$(mktemp -d) -create_derivative "disk" "kvm" #sets ${derivative_img} +create_derivative uefi kvm #sets ${derivative_img} mount_disk_image ${derivative_img} ${mount_d} # unmount disk image and remove created folders on exit @@ -46,12 +46,9 @@ trap cleanup_kvm EXIT divert_grub "${mount_d}" replace_kernel ${mount_d} "linux-kvm" +chroot "${mount_d}" update-grub undivert_grub "${mount_d}" -#setup grub correctly -env DEBIAN_FRONTEND=noninteractive chroot "${mount_d}" update-grub -replace_grub_root_with_label "${mount_d}" - # Remove initramfs for kvm image env DEBIAN_FRONTEND=noninteractive chroot "${mount_d}" apt-get \ purge -y initramfs-tools busybox-initramfs @@ -70,4 +67,4 @@ create_manifest ${mount_d} livecd.ubuntu-cpc.disk-kvm.manifest umount_disk_image ${mount_d} rm -rf ${mount_d} -convert_to_qcow2 ${derivative_img} livecd.ubuntu-cpc.disk-kvm.img \ No newline at end of file +convert_to_qcow2 ${derivative_img} livecd.ubuntu-cpc.disk-kvm.img