Add optional Dracut support for installed images, enable it for Lubuntu.

ubuntu/master
Simon Quigley 4 weeks ago
parent c73b51ec43
commit 3c39128f16

1
debian/changelog vendored

@ -2,6 +2,7 @@ livecd-rootfs (25.04.3) UNRELEASED; urgency=medium
* Switch Lubuntu to stacked squashfses, and split apart the common
functionality to avoid Subiquity-specific commands.
* Add optional Dracut support for installed images, enable it for Lubuntu.
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 23 Nov 2024 13:44:46 -0600

@ -695,6 +695,10 @@ common_layered_desktop_image() {
fi
# the minimal layer, for minimal installs
add_task minimal minimal standard $MINIMAL_TASKS
# If Dracut is enabled, include it early
if [ -n "$NEEDS_DRACUT" ]; then
add_package minimal dracut
fi
# fixme: this should go in seeds, not be in code here
add_package minimal cloud-init
add_package minimal linux-$KERNEL_FLAVOURS
@ -724,6 +728,13 @@ common_layered_desktop_image() {
add_task ${LIVE_PREFIX}live "$LIVE_TASK"
add_package ${LIVE_PREFIX}live casper
# If Dracut is enabled, ensure it is removed in the live layer
# casper still depends on initramfs-tools
if [ -n "$NEEDS_DRACUT" ]; then
remove_package ${LIVE_PREFIX}live dracut
add_package ${LIVE_PREFIX}live initramfs-tools
fi
if [ -n "$LANGUAGE_BASE" ]; then
# language support
seeded_langs="$(get_seeded_languages $LANGUAGE_BASE)"
@ -927,6 +938,7 @@ case $PROJECT in
MINIMAL_TASKS=lubuntu-desktop-minimal
MINIMAL_DESC="A minimal installation of the $UCFLAVOUR Desktop."
KERNEL_FLAVOURS=generic
NEEDS_DRACUT=yes
common_layered_desktop_image
;;

@ -1154,9 +1154,14 @@ divert_update_initramfs () {
--divert /usr/sbin/update-initramfs.REAL --rename \
/usr/sbin/update-initramfs"
cat > chroot/usr/sbin/update-initramfs <<'EOF'
#! /bin/sh
#!/bin/sh
if [ $# != 1 ] || [ "$1" != -u ]; then
exec update-initramfs.REAL "$@"
if [ -x /usr/sbin/update-initramfs.REAL ]; then
exec /usr/sbin/update-initramfs.REAL "$@"
else
echo "update-initramfs.REAL not found. Skipping execution." >&2
exit 0
fi
fi
echo "update-initramfs: diverted by livecd-rootfs (will be called later)" >&2

Loading…
Cancel
Save