Skip to content

Commit 8dbe585

Browse files
jtlaytonmcgrof
authored andcommitted
guestfs: eliminate rescue initramfs images from base images
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 <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent afd6c03 commit 8dbe585

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

playbooks/roles/base_image/templates/virt-builder.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ copy-in {{ guestfs_distro_source_and_dest_file }}:{{ target_dir }}
1313
{% endif %}
1414

1515
install sudo,qemu-guest-agent,python3,bash
16+
17+
# get rid of any rescue initramfs images, and prevent new ones from being generated
18+
uninstall dracut-config-rescue
19+
delete /boot/*rescue*
20+
delete /boot/loader/entries/*rescue*
21+
1622
run-command useradd {{ kdevops_uid }} -s /bin/bash -m kdevops
1723
append-line /etc/sudoers.d/kdevops:kdevops ALL=(ALL) NOPASSWD: ALL
1824
edit /etc/default/grub:s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"/

0 commit comments

Comments
 (0)