From 512cc3777523e21d3d9faca2973edc5e5187ea68 Mon Sep 17 00:00:00 2001 From: Cody Shepherd Date: Wed, 10 Feb 2021 10:11:22 -0800 Subject: [PATCH 1/3] Set grub configs to hide boot menu and enable output on ttyS0 --- live-build/buildd/hooks/02-disk-image-uefi.binary | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/live-build/buildd/hooks/02-disk-image-uefi.binary b/live-build/buildd/hooks/02-disk-image-uefi.binary index f75e3aa2..8b84afd3 100755 --- a/live-build/buildd/hooks/02-disk-image-uefi.binary +++ b/live-build/buildd/hooks/02-disk-image-uefi.binary @@ -121,6 +121,16 @@ install_grub() { 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 From f72e18d3956f20f38c81f3a3a44dcd07655fd78a Mon Sep 17 00:00:00 2001 From: Cody Shepherd Date: Fri, 12 Feb 2021 13:24:54 -0800 Subject: [PATCH 2/3] Install lxd-agent-loader in bootable buildd image to improve user experience with lxd vms --- live-build/buildd/hooks/52-linux-virtual-image.binary | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/live-build/buildd/hooks/52-linux-virtual-image.binary b/live-build/buildd/hooks/52-linux-virtual-image.binary index 39ea7780..7c43e7b1 100755 --- a/live-build/buildd/hooks/52-linux-virtual-image.binary +++ b/live-build/buildd/hooks/52-linux-virtual-image.binary @@ -44,7 +44,8 @@ env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \ dist-upgrade --assume-yes env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \ install -y lsb-release locales initramfs-tools busybox-initramfs \ - udev dbus netplan.io cloud-init openssh-server sudo snapd + udev dbus netplan.io cloud-init openssh-server sudo snapd \ + lxd-agent-loader # Install a kernel divert_grub "$mount_d" From 027f89a654c689a701c25861095c89e4e563fafc Mon Sep 17 00:00:00 2001 From: Cody Shepherd Date: Mon, 1 Mar 2021 09:02:19 -0800 Subject: [PATCH 3/3] Update changelog --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8d5546d9..bc4ae4d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (2.694.4) UNRELEASED; urgency=medium + + * Add grub config to produce console output and install lxd-agent loader + to allow buildd vm images to work in lxd without requirement for manual + installation (LP: #1915571) + + -- Cody Shepherd Mon, 01 Mar 2021 09:00:39 -0800 + livecd-rootfs (2.694.3) groovy; urgency=medium [ David Krauser ]