From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5633624DD1F for ; Wed, 24 Sep 2025 21:18:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758748737; cv=none; b=MYaAcFbeH2+Enf65MiDZJUPrXBKXL/5ENddPKOX5BJU3PcJM8lT3yrCNBeFl7BUYhidXx+0HPf0XsGzWMjkxuDUOT9w30MYkzzFQmjP+WXGdmCZHr4DHVPfRVA4Fddz3X3o9K4XgpCglnPotYMkR9omCMJD7Grbp+AJJqCmkHXA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758748737; c=relaxed/simple; bh=oNnZzqMOfDWyoVX71C8IY8GEMd7oVEdlwdkBXKVPp8s=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=XA9yCA+kFRHeHnds3XaloAvOWrv0XSUjSo9UPML5f64nWs5SI6OhoDH2dFEF00gBHorqbZYvg+pHt4NnPDO5CnmUtLyUbf2AlKAoTbYY4dkftUwtZOXQ3jeayWG0GTSaHchBsiIjlPn2L9NeWlXZCRWRCdpjVgLyYJjuffW+AxY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=scGgY3dn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="scGgY3dn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEDD5C4CEE7 for ; Wed, 24 Sep 2025 21:18:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758748736; bh=oNnZzqMOfDWyoVX71C8IY8GEMd7oVEdlwdkBXKVPp8s=; h=From:To:Subject:Date:From; b=scGgY3dnn9CDb1FZ+2xG601XwTxprhyQ9rcsgoDaceeBzwNTrIGArbAaiyrZT0sA/ UJNCWSSv8NN0iWc+Jmq6yLwgNY3fNnOt/0JErsYhIpbwbpkzCkD5u0RpYwCV+WDWT4 EmRmdpq8OrkT52sgDj1mrD3AujnhcuCpPJeiEF+/8qnQBKNiDmb9tf3A15H2/9BY4I 3JuZeOVZ4WMiPhH0S1g1I4O1BO/DdNKSyC2x7veSgkl7R+pUbQpD6daTnUgjQ/D4J0 fIzgLlk7dA1wMpG8VjOOgQQe/Hq4lQJSsCUvBwLXKvDCUS2tKVsL8Ii1NfC7Si587d p3FyiIHwEuJZg== From: Jeff Layton To: kdevops@lists.linux.dev Subject: [PATCH v2] guestfs: eliminate rescue initramfs images from base images Date: Wed, 24 Sep 2025 17:18:55 -0400 Message-ID: <20250924211855.353951-1-jlayton@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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