public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2] guestfs: eliminate rescue initramfs images from base images
@ 2025-09-24 21:18 Jeff Layton
  2025-09-26 19:54 ` Luis Chamberlain
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2025-09-24 21:18 UTC (permalink / raw)
  To: kdevops

dracut-config-rescue generates the "rescue" images in the /boot
partition (at least on Fedora hosts). This is a waste of space since
these are ultimately throwaway VMs.

Uninstall dracut-config-rescue from the base images, and delete any
already-generated images , thus saving space for more "make linux"
invocations.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 playbooks/roles/base_image/templates/virt-builder.j2 | 6 ++++++
 1 file changed, 6 insertions(+)

While we're at it, lets delete any already-generated images too.

diff --git a/playbooks/roles/base_image/templates/virt-builder.j2 b/playbooks/roles/base_image/templates/virt-builder.j2
index 6805679a8959..277c94141b35 100644
--- a/playbooks/roles/base_image/templates/virt-builder.j2
+++ b/playbooks/roles/base_image/templates/virt-builder.j2
@@ -13,6 +13,12 @@ copy-in {{ guestfs_distro_source_and_dest_file }}:{{ target_dir }}
 {% endif %}
 
 install sudo,qemu-guest-agent,python3,bash
+
+# get rid of any rescue initramfs images, and prevent new ones from being generated
+uninstall dracut-config-rescue
+delete /boot/*rescue*
+delete /boot/loader/entries/*rescue*
+
 run-command useradd {{ kdevops_uid }} -s /bin/bash -m kdevops
 append-line /etc/sudoers.d/kdevops:kdevops   ALL=(ALL)       NOPASSWD: ALL
 edit /etc/default/grub:s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"/
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] guestfs: eliminate rescue initramfs images from base images
  2025-09-24 21:18 [PATCH v2] guestfs: eliminate rescue initramfs images from base images Jeff Layton
@ 2025-09-26 19:54 ` Luis Chamberlain
  0 siblings, 0 replies; 2+ messages in thread
From: Luis Chamberlain @ 2025-09-26 19:54 UTC (permalink / raw)
  To: Jeff Layton; +Cc: kdevops

On Wed, Sep 24, 2025 at 05:18:55PM -0400, Jeff Layton wrote:
> dracut-config-rescue generates the "rescue" images in the /boot
> partition (at least on Fedora hosts). This is a waste of space since
> these are ultimately throwaway VMs.
> 
> Uninstall dracut-config-rescue from the base images, and delete any
> already-generated images , thus saving space for more "make linux"
> invocations.
> 
> Signed-off-by: Jeff Layton <jlayton@kernel.org>

Applied and pushed!

  Luis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-26 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24 21:18 [PATCH v2] guestfs: eliminate rescue initramfs images from base images Jeff Layton
2025-09-26 19:54 ` Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox