aboutsummaryrefslogtreecommitdiff
path: root/bootstrap.d/99-reduce.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap.d/99-reduce.sh')
-rw-r--r--bootstrap.d/99-reduce.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/bootstrap.d/99-reduce.sh b/bootstrap.d/99-reduce.sh
index f3b2848..99fbc9b 100644
--- a/bootstrap.d/99-reduce.sh
+++ b/bootstrap.d/99-reduce.sh
@@ -66,6 +66,12 @@ if [ "$ENABLE_REDUCE" = true ] ; then
rm -f "$R/boot/firmware/fixup_x.dat"
fi
+ # Remove kernel and initrd from /boot (already in /boot/firmware)
+ if [ "$BUILD_KERNEL" = false ] ; then
+ rm -r "$R/boot/vmlinuz--*"
+ rm -r "$R/boot/initrd.img-*"
+ fi
+
# Clean APT list of repositories
rm -fr "$R/var/lib/apt/lists/*"
chroot_exec apt-get -qq -y update