You are not logged in.
Using systemd-boot, mkinitcpio's UKI generation support and systemd-gpt-generator, it is possible to create a system that is essentially "zero configuration",
meaning no fstab, no crypttab (for autodetected LUKS partitions) and no kernel command line (at least no root= option)
I already have this part working. My system boots and updates seamlessly.
This leaves /boot almost entirely empty, as systemd-boot and the UKIs land in /efi, except for the vmlinuz-linux binary, which is copied by the mkinitcpio pacman hook to /boot.
Ideally I'd like to get rid of this extraneous copy and just let mkinitcpio grab the latest kernel directly from /usr/lib.
I know the preset_kver option can take a kernel version rather than an absolute path, however I'm unsure how to make it grab the freshly installed kernel version.
Is there a straightforward way to do this? Should I simply create a post-generation hook that deletes the file from /boot again?
Ideally I want to try and get rid of /boot entirely, mostly to see if it's possible (it should be, as the mkinitcpio hook is optional)
Last edited by LunarLambda (2023-12-05 10:11:05)
Offline
I figured out I can get the kernel version with `ALL_kver=$(pacman -Qql linux | grep 'vmlinuz$')`, but microcode packages install directly into `/boot`, so no getting rid of that after all.
Offline
You can always install the firmware temporarily in a different root (https://man.archlinux.org/man/pacman.8#OPTIONS) like /tmp, and remove it afterwards. I don't know how of a good idea that is, though.
Online