diff --git a/debian/changelog b/debian/changelog index 069c9b0e..c5945980 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,13 @@ livecd-rootfs (24.04.70) UNRELEASED; urgency=medium + [ Łukasz 'sil2100' Zemczak ] * Add experimental support for building ubuntu-core-desktop installer images (LP: #2063203) - -- Łukasz 'sil2100' Zemczak Wed, 24 Apr 2024 10:53:27 +0100 + [ Philip Roche ] + * Re-enable ability to build HyperV desktop images (LP: #2064280) + + -- Philip Roche Tue, 30 Apr 2024 17:58:43 +0100 livecd-rootfs (24.04.69) noble; urgency=medium diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary index 8ea2128f..44d2e4cf 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary @@ -9,21 +9,6 @@ case $ARCH in ;; esac -case ${PROJECT:-}:${SUBPROJECT:-} in - ubuntu:) - echo "We don't create EFI images for Ubuntu Desktop." - exit 0 - ;; - ubuntu) - IMAGE_STR="# DESKTOP_IMG: This file was created/modified by the Desktop Image build process" - FS_LABEL="desktop-rootfs" - IMAGE_SIZE=12884901888 # 12G - ;; - *) - IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" - FS_LABEL="cloudimg-rootfs" - ;; -esac if [ "$ARCH" = "amd64" ]; then IMAGE_SIZE=3758096384 # bump to 3.5G (3584*1024**2); Since Kinetic amd64 need more then the default 2.2G @@ -44,6 +29,22 @@ if [ "$ARCH" = "riscv64" ]; then IMAGE_SIZE=4831838208 # bump to 4.5G (4608*1024**2); initrd creation fails with "No space left" with 3.5G fi +case ${PROJECT:-}:${SUBPROJECT:-} in + ubuntu:) + echo "We don't create EFI images for Ubuntu Desktop." + exit 0 + ;; + ubuntu:desktop-preinstalled) + IMAGE_STR="# DESKTOP_IMG: This file was created/modified by the Desktop Image build process" + FS_LABEL="desktop-rootfs" + IMAGE_SIZE=12884901888 # 12G + ;; + *) + IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process" + FS_LABEL="cloudimg-rootfs" + ;; +esac + . config/binary . config/functions diff --git a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary index 1e7bc461..b10536b9 100644 --- a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary +++ b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary @@ -39,8 +39,14 @@ trap cleanup_hyperv EXIT # Perform customisations +# For Ubuntu 24.04 and later cloud-init is included in desktop images. This is not applicable for Hyperv images so +# we can disable cloud-init. This leaves the cloud-init package installed but disabled so users can still +# use it if they want. +touch "${scratch_d}/etc/cloud/cloud-init.disabled" + + chroot "${scratch_d}" apt-get update -y -chroot "${scratch_d}" apt-get -y install xrdp linux-azure linux-tools-azure linux-cloud-tools-azure +chroot "${scratch_d}" apt-get -y install xrdp linux-azure linux-tools-azure linux-cloud-tools-azure polkitd-pkla oem-config-gtk language-pack-en-base oem-config-slideshow-ubuntu cat > ${scratch_d}/etc/modules-load.d/hyperv.conf << EOF ${IMAGE_STR} @@ -124,20 +130,19 @@ touch "${scratch_d}/var/lib/oem-config/run" chroot "${scratch_d}" apt-get clean +raw_img=binary/boot/disk-hyperv-uefi.ext4 +vhd_img=livecd.ubuntu-desktop-hyperv.vhdx + +create_manifest "${scratch_d}" "$vhd_img.zip.manifest" # End customisations cleanup_hyperv trap - EXIT -raw_img=binary/boot/disk-hyperv-uefi.ext4 -vhd_img=livecd.ubuntu-desktop-hyperv.vhdx - qemu-img convert -O vhdx "$raw_img" "$vhd_img" rm "$raw_img" apt-get install -y zip -create_manifest chroot "$vhd_img.zip.manifest" - zip "$vhd_img.zip" "$vhd_img" rm "$vhd_img"