From 95103e3d365631a5f750da5635353c8b9d1effb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20=27sil2100=27=20Zemczak?= Date: Fri, 24 Jan 2020 18:34:40 +0100 Subject: [PATCH] Ensure seed part. is mounted; wait for getty --- debian/changelog | 9 +++++++++ .../chroot/999-ubuntu-image-customization.chroot | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3308477b..f423fdae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +livecd-rootfs (2.636) UNRELEASED; urgency=medium + + * Ensure seed partition is mounted on no-cloud images which use system-boot + as their seed (LP: #1860046) + * Have getty wait for cloud-init to complete to ensure that the default + user exists before presenting a login prompt + + -- Dave Jones Fri, 24 Jan 2020 15:17:56 +0000 + livecd-rootfs (2.635) focal; urgency=medium * Preserve apt preferences created by any package we install (i.e. diff --git a/live-build/ubuntu-cpc/hooks.d/chroot/999-ubuntu-image-customization.chroot b/live-build/ubuntu-cpc/hooks.d/chroot/999-ubuntu-image-customization.chroot index 491bd863..51786e87 100755 --- a/live-build/ubuntu-cpc/hooks.d/chroot/999-ubuntu-image-customization.chroot +++ b/live-build/ubuntu-cpc/hooks.d/chroot/999-ubuntu-image-customization.chroot @@ -19,5 +19,19 @@ datasource_list: [ NoCloud, None ] datasource: NoCloud: fs_label: system-boot +EOF + mkdir -p /etc/systemd/system/cloud-init-local.service.d + cat << EOF > /etc/systemd/system/cloud-init-local.service.d/mount-seed.conf +# Ensure our customized seed location is mounted prior to execution + +[Unit] +RequiresMountsFor=/boot/firmware +EOF + mkdir -p /etc/systemd/system/cloud-config.service.d + cat << EOF > /etc/systemd/system/cloud-config.service.d/getty-wait.conf +# Wait for cloud-init to finish (creating users, etc.) before running getty + +[Unit] +Before=getty.target EOF fi