Unified kernel image

https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images

apt: systemd-boot

https://wiki.archlinux.org/title/Unified_kernel_image

systemd's efistub + sections + whatever

kernel efistub

chmod +x /etc/kernel/postinst.d/zz-unified

echo "root=UUID=b1e14117-8e88-4db6-9a6f-6bea5a0605e9 ro vt.handoff=7" > /tmp/cmdline.txt

objcopy \

--add-section .osrel="/usr/lib/os-release" --change-section-vma .osrel=0x20000 \

--add-section .cmdline="/tmp/cmdline.txt" --change-section-vma .cmdline=0x30000 \

--add-section .linux="/boot/vmlinuz" --change-section-vma .linux=0x2000000 \

--add-section .initrd="/boot/initrd.img" --change-section-vma .initrd=0x3000000 \

"/usr/lib/systemd/boot/efi/linuxx64.efi.stub" "/boot/efi/EFI/unified/bootx64.efi"


 * 1)    --add-section .splash="/boot/splash.bmp" --change-section-vma .splash=0x40000 \

- splash bmp can be anything

efibootmgr -c -d /dev/vda -p 2 -L "unified" -l "\efi\unified\bootx64.efi"

mkdir /boot/efi/EFI/unified

apt reinstall linux-image-generic

root@jookia-Standard-PC-Q35-ICH9-2009:/boot/efi/EFI/unified# efibootmgr -c -d /dev/vda -p 2 -L "unified" -l "\efi\unified\bootx64.efi" -^C

root@jookia-Standard-PC-Q35-ICH9-2009:/boot/efi/EFI/unified# efibootmgr -o 4

BootCurrent: 0004

Timeout: 3 seconds

BootOrder: 0004

Boot0000* UiApp

Boot0001* UEFI Misc Device

Boot0002* EFI Internal Shell

Boot0003* ubuntu

Boot0004* unified

Boot0005* UEFI PXEv4 (MAC:5254003512E6)