live-server: place kernel in the minimal layer

By placing the kernel in minimal, we can achieve the following
improvements:

1. Space savings - there are redundant packages present in the ship-live
   pool and in the live layer.  Adding the kernel to minimal means that
   the kernel is already in the live layer, and we don't then also need
   it in the pool.
2. Time savings - informal vm testing suggests more than a minute
   improvement to have the kernel preinstalled over installing it at
   runtime.

As always, there is a cost tradeoff:

1. If a different kernel is desired, we need to be able to remove this
   preinstalled kernel.  Relevant curtin and subiquity changes are
   already landed.
2. When installing that other kernel, it'll take longer than today due
   to still needing to install a kernel at runtime + the time cost of
   removing the preinstalled kernel.
ubuntu/oracular
Dan Bungert 4 months ago
parent 09199d5fee
commit 8acf29a786

@ -1005,7 +1005,14 @@ case $PROJECT in
exit 1
fi
add_package ubuntu-server-minimal.ubuntu-server.installer.$flavor $kernel_metapkg
add_pass ubuntu-server-minimal.ubuntu-server.installer.$flavor
if [ $flavor == ga ]; then
kernel_layer=ubuntu-server-minimal
else
kernel_layer=ubuntu-server-minimal.ubuntu-server.installer.$flavor
fi
add_package $kernel_layer $kernel_metapkg
LIVE_PASSES="${LIVE_PASSES:+$LIVE_PASSES }ubuntu-server-minimal.ubuntu-server.installer.$flavor"
done
case $ARCH in

@ -15,6 +15,9 @@ esac
PROJECT=$PROJECT${SUBARCH:+-$SUBARCH}
# ensure this initrd is casperized
chroot chroot update-initramfs -u
# Fish out generated kernel image and initrd
mv chroot/boot/initrd.img-* ${PWD}/livecd.${PROJECT}.initrd-$flavor
mv chroot/boot/vmlinu?-* ${PWD}/livecd.${PROJECT}.kernel-$flavor

Loading…
Cancel
Save