VoidLinuxInstaller
VoidLinuxInstaller copied to clipboard
Make unified kernel images
Unified Kernel Images are easier to work with for secureboot and are just one file.
Hi, thank you for suggestion!
As I said in the other issue you opened, I have little to no knowledge about all the Linux related stuffs, in particular about Unified Kernel Image. So if you find any detailed documentation how to do so, please link it here, that would be really helpful!
Or if you feel confident enough, feel free to submit a PR! 😄
Very small update on generating Unified Kernel Images (UKI), also needed as a future remainder:
- packet
dracut-uefi
exists in void-packages repo and its purpose is exactly to generate EFI executable withdracut
itself; it will also installgummiboot-efistub
and that will be used as EFI stub, as it implies. - for how my script works, when selecting EFISTUB as bootloader,
dracut
can be easily configured for generating UKI:- Disable all the EFISTUB stuffs (
kernel.d/post-install
anddefault/efiboomgr
) - Use the
default/efibootmgr
askernel_cmdline
fordracut
; - Set
uefi="yes"
and asuefi_stub
the one fromgummiboot
in dracut configuration file.
- Disable all the EFISTUB stuffs (
Problem is that even after all of this and correctly generating new files, system won't boot due to the following error:
Initramfs unpacking failed: invalid magic at start of compressed archive
I tried different things, like adding as dracut drivers the zstd
one but nothing changed. I'm clueless.
https://www.reddit.com/r/Gentoo/comments/12t5yqj/a_few_questions_from_a_new_user_dracut/
https://www.reddit.com/r/voidlinux/comments/16pfw3z/how_to_generate_a_new_efi_executable_initramfs_on/
https://www.reddit.com/r/voidlinux/comments/hgqf5o/dracut_uefi_kernel_image_problem/
I don't know about dracut-efi and I don't have It but how I did It is, I have a dracut.conf with the options you said but the normal dracut command doesn't work so I use a custom dracut command. usr/bin/dracut -q --force --uefi --uefi-stub /usr/lib/gummiboot/linuxx64.efi.stub -f /boot/EFI/Linux/linux.efi ${VERSION} and just put that in the post-install hook. And whenever you will install a new kernel, you will get an updated efistub automatically.
You can just have that one entry in the efi and It will automatically get updated and you won't need to change It.