kdevops.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Scott Mayhew <smayhew@redhat.com>
Cc: "Richard W.M. Jones" <rjones@redhat.com>, kdevops@lists.linux.dev
Subject: Re: [PATCH 05/10] guestfs: add initial debian trixie support with custom URLs
Date: Tue, 14 May 2024 05:04:50 -0700	[thread overview]
Message-ID: <ZkNTYq5p2b4NZXNQ@bombadil.infradead.org> (raw)
In-Reply-To: <ZkJ-KK9PwJlu9LEQ@aion>

On Mon, May 13, 2024 at 04:55:04PM -0400, Scott Mayhew wrote:
> On Sat, 11 May 2024, Luis Chamberlain wrote:
> 
> > On Wed, May 08, 2024 at 01:30:42PM -0400, Scott Mayhew wrote:
> > > On Tue, 07 May 2024, Luis Chamberlain wrote:
> > > 
> > > > debian does not yet provide an index file for virt-builder, but we
> > > > have URLS with qcow2 and raw files. Using them in guestfs is actually
> > > > not quite trivial. So we do the handy work to enable others to also
> > > > use custom URLs and build a virt-builder local source and index file
> > > > for you. All we need really, is to check the checksums.
> > > > 
> > > > Sadly this does not yet work, as it seems we get stuck on the grub
> > > > prompt for some reason. This needs some more investigation.
> > > 
> > > Yeah when I run 'make bringup' the consoles on all the guests are stuck
> > > on "Booting `Debian GNU/Linux'".
> > 
> > Is that with Trixie or also with y9our own custom ISO?
> 
> That was with the Trixie images from cloud.debian.org.
> 
> I poked around the image using guestfish, and it looks like it needs to use
> UEFI boot... so I tried that:

Score, and we can simplify this more by using automatic variables.
I just pushed the below patch. We're trixie-enabled now.

From d8a4dc36b64e5951c5d7d8b189eaf6aa00d912a1 Mon Sep 17 00:00:00 2001
From: Luis Chamberlain <mcgrof@kernel.org>
Date: Tue, 14 May 2024 04:59:55 -0700
Subject: [PATCH] guestfs: fix debian trixie support

First order of business to fix was the template image,
Scott Mayhew noted we needed to enable UEFI boot, and we
can just use a simple automatic UEFI firmware and secure boot
environment.

Next issue was networking, the dhcp package and scripts to
set up the network interface are needed. Finally, the last
step was to ensure we don't get prompted when we reconfigure
the openssh-server.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml | 3 ++-
 scripts/bringup_guestfs.sh                             | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml b/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml
index eb5118a105f0..8f6b445da7b7 100644
--- a/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml
+++ b/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml
@@ -3,8 +3,9 @@
   <memory unit='MiB'>{{ libvirt_mem_mb }}</memory>
   <currentMemory unit='MiB'>{{ libvirt_mem_mb }}</currentMemory>
   <vcpu placement='static'>{{ libvirt_vcpus_count }}</vcpu>
-  <os>
+  <os firmware='efi'>
     <type arch='x86_64' machine='q35'>hvm</type>
+    <loader secure='yes'/>
     <boot dev='hd'/>
   </os>
   <features>
diff --git a/scripts/bringup_guestfs.sh b/scripts/bringup_guestfs.sh
index f8522eb549ee..fde19775a946 100755
--- a/scripts/bringup_guestfs.sh
+++ b/scripts/bringup_guestfs.sh
@@ -206,11 +206,12 @@ _EOT
 debian_pre_install_hacks()
 {
 	cat <<_EOT >>$cmdfile
+install isc-dhcp-client,ifupdown
 mkdir /etc/network/interfaces.d/
 append-line /etc/network/interfaces.d/enp1s0:auto enp1s0
 append-line /etc/network/interfaces.d/enp1s0:allow-hotplug enp1s0
 append-line /etc/network/interfaces.d/enp1s0:iface enp1s0 inet dhcp
-firstboot-command dpkg-reconfigure openssh-server
+firstboot-command DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure -p low --force openssh-server
 _EOT
 }
 
-- 
2.43.0


  reply	other threads:[~2024-05-14 12:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08  6:50 [PATCH 00/10] guestfs: custom image + mirroring sources.list heuristic Luis Chamberlain
2024-05-08  6:50 ` [PATCH 01/10] guestfs: move debian options before image names Luis Chamberlain
2024-05-08  6:50 ` [PATCH 02/10] guestfs: modify grub prompt before first bring up Luis Chamberlain
2024-05-08  6:50 ` [PATCH 03/10] guestfs: set default root password Luis Chamberlain
2024-05-08  6:50 ` [PATCH 04/10] guestfs: check for virt-builder failure Luis Chamberlain
2024-05-08  6:50 ` [PATCH 05/10] guestfs: add initial debian trixie support with custom URLs Luis Chamberlain
2024-05-08 17:30   ` Scott Mayhew
2024-05-11 23:46     ` Luis Chamberlain
2024-05-13 18:28       ` Richard W.M. Jones
2024-05-13 20:50         ` Luis Chamberlain
2024-05-13 20:55       ` Scott Mayhew
2024-05-14 12:04         ` Luis Chamberlain [this message]
2024-05-08  6:50 ` [PATCH 06/10] guestfs: add support to infer host distro mirrororing optimizations Luis Chamberlain
2024-05-08  6:50 ` [PATCH 07/10] guestfs: move rhel activation to its own helper Luis Chamberlain
2024-05-08  6:50 ` [PATCH 08/10] guestfs: move copying yum repo to its own routine Luis Chamberlain
2024-05-08  6:50 ` [PATCH 09/10] guestfs: move pre-install customizations " Luis Chamberlain
2024-05-08  6:50 ` [PATCH 10/10] guestfs: move debian pre-install hacks " Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZkNTYq5p2b4NZXNQ@bombadil.infradead.org \
    --to=mcgrof@kernel.org \
    --cc=kdevops@lists.linux.dev \
    --cc=rjones@redhat.com \
    --cc=smayhew@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).