Skip to content

Change default UKI and initramfs filenames #2537

Open
@avidseeker

Description

@avidseeker

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIssue adding new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions