r/voidlinux • u/Kurimanju-dot-dev • Mar 23 '26
[HELP] In the process of switching from Arch to Void. Need some help with UKIs.
So I've been in the process of moving away from Arch and on Arch I used UKIs to bypass the need for a bootloader completely. Now on Arch that was fairly simple and on Void it seems to be simple as well because dracut automatically uses ukify to generate the UKIs. I just had to put uefi="yes" in /etc/dracut.conf.d/uki.conf and dracut did it's thing. Well at least that's what I hoped. Now on Arch, mkinitcpio generates a vmlinuz file and puts it in /boot. I haven't been able to find that file on Void. Some sources on the internet stated it could also be found under /usr/lib/modules/*/vmlinuz but I haven't been able to find it there regardless. Dracut is looking for a vmlinuz-<kernel version> and an initramfs-<kernel version>.img file under /boot, both of which do not exist
I've been pretty comfortable with Void for now but this is one thing I haven't been able to figure out yet. I would appreciate some help or advice. I'll just use grub for now but I'd like to go back to UKIs if possible.
4
u/Hokuou_otoko Mar 23 '26
If youre more comfortbale woth mkinitcpio...
By default, Void Linux uses dracut to prepare initramfs images for installed kernels. Alternatives such as mkinitcpio are available. Each initramfs generator registers an XBPS alternative in the initramfs group to link its kernel hooks to be used when creating or removing initramfs images for a given kernel.
To replace dracut with, e.g., mkinitcpio, install the mkinitcpio package; confirm that mkinitcpio appears in the list of available alternatives by running
$ xbps-alternatives -l -g initramfs
Issue the command
xbps-alternatives -s mkinitcpio
to replace the dracut kernel hooks with those provided by mkinitcpio. With subsequent kernel updates (or updates to DKMS packages that trigger initramfs regeneration), mkinitcpio will be used instead of dracut to prepare initramfs images. To force images to regenerate, reconfigure your kernel packages by invoking
xbps-reconfigure -f linux<x>.<y>
for each linux<x>.<y> package that is currently installed.
1
u/Duncaen Mar 23 '26
vmlinuzis the kernel image,mkinitcpiodoes not generate that. In arch its at/usr/lib/modules/$version/vmlinuzand in void its currently in/boot/vmlinuz-$version.If you don't have them in
/bootthen you don't have a kernel installed.Even with UKI's I would suggest to use a bootloader to avoid relying and having to update efi variables every update.
systemd-bootis available, will discover UKIs automatically if they are in the right directory and is basically unnoticeable under normal circumstances.2
u/AlexanderMilchinskiy Mar 23 '26
Not sure if this will help, but here is part of my installation script:
Also, don't forget to:
I hope this helps. Good luck
1
u/sin_cere1 Mar 23 '26
In my experience, some dracut modules might be outdated so I'd carefully inspect the hook that's generating the UKI. You might need to adjust some paths or command flags. On a different note, is UKI worth it knowing it's dependent in systemd?