For a proposed fix: I would suggest that 1. /usr/lib/kernel/install.d/50-dracut.install be moved to dracut instead of dracut-core (dracut-core should be inert and not run hooks, and dracut conflicts with initramfs-tools which reduces ambiguity as to what should generate the initrd), 2. renamed /usr/lib/kernel/install.d/60-dracut.install so it runs after /usr/lib/kernel/install.d/55-initrd.install 3. 60-dracut.install should detect the initrd.img-$KERNEL_VERSION that was just copied by 55-initrd.install, and not run if it finds it. Because the hooks are all in dracut, the prior initrd was generated by dracut anyway.
This change preserves /boot/initrd.img-$KERNEL_VERSION, which may be used by other boot loaders installed in parallel with systemd-boot. An advanced user that doesn't need the initrd in /boot can chmod -x /etc/kernel/postinst.d/dracut, that file is under /etc and so the change will be preserved by dpkg. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/2100296 Title: Double initrd in /efi/<machine-id>/<kver>/ with systemd-boot Status in dracut package in Ubuntu: Confirmed Status in systemd package in Ubuntu: Confirmed Bug description: With the combination of using dracut and systemd-boot from plucky- proposed I get two initrds copied to the EFI partition: /efi/2504a9c37a434fc28843779e4d0b34eb/6.14.0-5-generic /efi/2504a9c37a434fc28843779e4d0b34eb/6.14.0-5-generic/linux /efi/2504a9c37a434fc28843779e4d0b34eb/6.14.0-5-generic/jh7110-starfive-visionfive-2-v1.3b.dtb /efi/2504a9c37a434fc28843779e4d0b34eb/6.14.0-5-generic/initrd /efi/2504a9c37a434fc28843779e4d0b34eb/6.14.0-5-generic/initrd.img-6.14.0-5-generic ..and both of them enabled in the config file root@visionfive2~# cat /efi/loader/entries/2504a9c37a434fc28843779e4d0b34eb-6.14.0-5-generic.conf # Boot Loader Specification type#1 entry # File created by /usr/lib/kernel/install.d/90-loaderentry.install (systemd 257.3-1ubuntu3) title Ubuntu Plucky Puffin (development branch) version 6.14.0-5-generic machine-id 2504a9c37a434fc28843779e4d0b34eb sort-key ubuntu options earlycon console=ttyS0,115200n8 rootwait root=/dev/nvme0n1 rootfstype=btrfs ro rootflags=ssd,subvol=/plucky systemd.machine_id=2504a9c37a434fc28843779e4d0b34eb linux /2504a9c37a434fc28843779e4d0b34eb/6.14.0-5-generic/linux devicetree /2504a9c37a434fc28843779e4d0b34eb/6.14.0-5-generic/jh7110-starfive-visionfive-2-v1.3b.dtb initrd /2504a9c37a434fc28843779e4d0b34eb/6.14.0-5-generic/initrd initrd /2504a9c37a434fc28843779e4d0b34eb/6.14.0-5-generic/initrd.img-6.14.0-5-generic To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dracut/+bug/2100296/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp