dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
597 stars 396 forks source link

Change default UKI and initramfs filenames #2537

Open avidseeker opened 10 months ago

avidseeker commented 10 months ago

According to the manpage:

--uefi
   Instead of creating an initramfs image, dracut will create an UEFI
   executable, which can be executed by an UEFI BIOS. The default output
   filename is <EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi.
   <EFI> might be /efi, /boot or /boot/efi depending on where the ESP partition
   is mounted. The <BUILD_ID> is taken from BUILD_ID in /usr/lib/os-release or
   if it exists /etc/os-release and is left out, if BUILD_ID is non-existant or
   empty.

"The default output filename" suggests that there is a way to change the output filename, but I couldn't find it in the man page.

It would be useful to have a dracut.conf option to set a fixed name of UKI, since the EFI stub entry in nvram should be fixed:

efibootmgr -cd /dev/sda -p1 -L ARCH -l '\EFI\fixed\path\to\uki'

The same applies for initramfs (without UKI). For example, pacman hooks for mkinicpio install a fixed filename for linux, linux-lts, linux-zen kernels, making it possible to have a command like:

efibootmgr -cd /dev/sda -p1 -L ARCH -l '\EFI\arch\initramfs-linux.img' -u 'initrd=\EFI\arch\vmlinuz-linux'

Assuming \EFI\arch is mounted in \boot.

aafeijoo-suse commented 10 months ago

Do you mean #2020? It was rejected back then... The duplicate issue was also closed #1926