You are not logged in.

#1 2025-12-17 18:38:25

ndgd
Member
Registered: 2025-11-28
Posts: 7

[Gave Up] Unable To Build UKI for systemd-boot after kernel update

I was using Limine as my main bootloader until I decided I wanted a smoother boot sequence.
So I switched to systemd-boot as the primary bootloader and kept Limine as a fallback for easier rollback.

After the switch, I ran into issues with UKI generation for systemd-boot. Limine alters how
mkinitcpio is used (notably where the generated UKIs are placed), so the UKI for systemd-boot
was not being built automatically. Because of this, I had to manually run:

    mkinitcpio -P

every time the relevant pacman hook was triggered. I was aware this was not ideal, but I was
not ready at the time to write a custom pacman hook to handle it properly.

After a kernel update, the file:

    /etc/mkinitcpio.d/linux.preset

was replaced with:

    /etc/mkinitcpio.d/linux.preset.pacnew

As a result, mkinitcpio started failing, since the active preset no longer matched my setup
(UKI paths and systemd-boot expectations).

❯ sudo mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -U /boot/EFI/Linux/arch-linux.efi
==> ERROR: Invalid option -k -- '/boot/vmlinuz-linux' must be readable
==> WARNING: This does not handle Limine boot entries.
    Use 'limine-mkinitcpio' or 'limine-update' instead.
==> Would you like to run 'limine-mkinitcpio' now? [Y/n]: ^C


Here is everything I have done so far since updating to 6.18
And issue started. Let me know if I should provide new info.

❯  ll /etc/mkinitcpio.d/linux.preset.pacsave

~                                                                                  03:51:04 PM
❯ pacdiff

~                                                                                  03:51:07 PM
❯ bat /etc/mkinitcpio.d/linux.preset.pacsave
─────┬─────────────────────────────────────────────────────────────────────────────────────────
     │ File: /etc/mkinitcpio.d/linux.preset.pacsave
─────┼─────────────────────────────────────────────────────────────────────────────────────────
   1 │ # mkinitcpio preset file for the 'linux' package
   2 │
   3 │ ALL_config="/etc/mkinitcpio.conf"
   4 │ ALL_kver="/boot/vmlinuz-linux"
   5 │ #ALL_kerneldest="/boot/vmlinuz-linux"
   6 │
   7 │ PRESETS=('default')
   8 │ #PRESETS=('default' 'fallback')
   9 │
  10 │ default_config="/etc/mkinitcpio.conf"
  11 │ #default_image="/boot/initramfs-linux.img"
  12 │ default_uki="/boot/EFI/Linux/arch-linux.efi"
  13 │ # default_options="--splash /usr/share/systemd/bootctl/splash-arch.bmp"
  14 │
  15 │ fallback_config="/etc/mkinitcpio.conf"
  16 │ ##fallback_image="/boot/initramfs-linux-fallback.img"
  17 │ fallback_uki="/boot/EFI/Linux/arch-linux-fallback.efi"
  18 │ #fallback_options="-S autodetect"
─────┴─────────────────────────────────────────────────────────────────────────────────────────

~                                                                                  03:51:27 PM
❯ sudo mv /etc/mkinitcpio.d/linux.preset.pacsave /etc/mkinitcpio.d/linux.preset
[sudo] password for nicknamely:

~                                                                                  03:55:36 PM
❯ sudo mkinitcpio -P
[sudo] password for nicknamely:
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -U /boot/EFI/Linux/arch-linux.efi
==> ERROR: Invalid option -k -- '/boot/vmlinuz-linux' must be readable
==> WARNING: This does not handle Limine boot entries.
    Use 'limine-mkinitcpio' or 'limine-update' instead.
==> Would you like to run 'limine-mkinitcpio' now? [Y/n]: ^C


~                                                                                  04:12:17 PM
❯ lt -3 /boot
 /boot
├──  6fa95ff62905417da7838d9359ccad21
│   ├──  limine_history
│   │   ├── ? initramfs-linux_xxh_99ad3afd9971fb57
│   │   ├── ? initramfs-linux_xxh_bec600a163f7a26e
│   │   ├──  snapshots.json
│   │   ├──  snapshots.json.old
│   │   ├── ? vmlinuz-linux_xxh_6ba2154591a6ad70
│   │   └── ? vmlinuz-linux_xxh_bd355143043e7e8b
│   └──  linux
│       ├── ? initramfs-linux
│       └── ? vmlinuz-linux
├──  EFI
│   ├──  BOOT
│   │   └──  BOOTX64.EFI
│   ├──  limine
│   │   ├──  BOOTIA32.EFI
│   │   ├──  BOOTX64.EFI
│   │   ├──  eldenring.jpg
│   │   ├──  limine_x64.bak
│   │   └──  limine_x64.efi
│   ├──  Linux
│   └──  systemd
│       └──  systemd-bootx64.efi
├──  loader
│   ├──  entries
│   │   └── ? limine.conf
│   ├──  keys
│   ├──  entries.srel
│   ├── ? loader.conf
│   └── ? random-seed
├──  intel-ucode.img
├── ? limine.conf
└──  limine.conf.old

~                                                                                  04:12:34 PM
❯ sudo pacdiff
[sudo] password for nicknamely:

~                                                                               5s 04:17:38 PM
❯ bootctl
System:
      Firmware: UEFI 2.40 (Lenovo 0.8480)
 Firmware Arch: x64
   Secure Boot: disabled
  TPM2 Support: no
  Measured UKI: no
  Boot into FW: supported

Current Boot Loader:
       Product: systemd-boot 258.2-2-arch
     Features: ✓ Boot counting
               ✓ Menu timeout control
               ✓ One-shot menu timeout control
               ✓ Default entry control
               ✓ One-shot entry control
               ✓ Support for XBOOTLDR partition
               ✓ Support for passing random seed to OS
               ✓ Load drop-in drivers
               ✓ Support Type #1 sort-key field
               ✓ Support @saved pseudo-entry
               ✓ Support Type #1 devicetree field
               ✓ Enroll SecureBoot keys
               ✓ Retain SHIM protocols
               ✓ Menu can be disabled
               ✓ Multi-Profile UKIs are supported
               ✓ Loader reports network boot URL
               ✓ Support Type #1 uki field
               ✓ Support Type #1 uki-url field
               ✓ Loader reports TPM2 active PCR banks
     Partition: /dev/disk/by-partuuid/8a09ec6d-5d93-416c-a5c3-b184a5a2f1ac
        Loader: └─/boot//EFI/systemd/systemd-bootx64.efi
 Current Entry: arch-linux.efi

Current Stub:
      Product: systemd-stub 258.3-1-arch
     Features: ✓ Stub reports loader partition information
               ✓ Stub reports stub partition information
               ✓ Stub reports network boot URL
               ✓ Picks up credentials from boot partition
               ✓ Picks up system extension images from boot partition
               ✓ Picks up configuration extension images from boot partition
               ✓ Measures kernel+command line+sysexts
               ✓ Support for passing random seed to OS
               ✓ Pick up .cmdline from addons
               ✓ Pick up .cmdline from SMBIOS Type 11
               ✓ Pick up .dtb from addons
               ✓ Stub understands profile selector
    Partition: /dev/disk/by-partuuid/8a09ec6d-5d93-416c-a5c3-b184a5a2f1ac
         Stub: └─/EFI/Linux/arch-linux.efi

Random Seed:
 System Token: set
       Exists: yes

Available Boot Loaders on ESP:
          ESP: /boot (/dev/disk/by-partuuid/8a09ec6d-5d93-416c-a5c3-b184a5a2f1ac)
         File: ├─/boot//EFI/systemd/systemd-bootx64.efi (systemd-boot 258.3-1-arch)
               └─/boot//EFI/BOOT/BOOTX64.EFI (systemd-boot 258.3-1-arch)

Boot Loaders Listed in EFI Variables:
        Title: Linux Boot Manager
           ID: 0x0003
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/8a09ec6d-5d93-416c-a5c3-b184a5a2f1ac
         File: └─/boot//EFI/systemd/systemd-bootx64.efi

        Title: Limine
           ID: 0x0002
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/8a09ec6d-5d93-416c-a5c3-b184a5a2f1ac
         File: └─/boot//EFI/limine/limine_x64.efi

        Title: Arch Linux Limine Bootloader
           ID: 0x0001
       Status: active
    Partition: /dev/disk/by-partuuid/8a09ec6d-5d93-416c-a5c3-b184a5a2f1ac
         File: └─/boot//EFI/limine/BOOTX64.EFI

Boot Loader Entry Locations:
          ESP: /boot (/dev/disk/by-partuuid/8a09ec6d-5d93-416c-a5c3-b184a5a2f1ac, $BOOT)
       config: /boot//loader/loader.conf
        token: arch

Default Boot Loader Entry:
         type: Boot Loader Specification Type #1 (.conf)
        title: Limine (Snapshot & Rollback)
           id: limine.conf
       source: /boot//loader/entries/limine.conf (on the EFI System Partition)
          efi: /boot//EFI/limine/limine_x64.efi

~                                                                              10s 04:18:31 PM
❯ sudo mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -U /boot/EFI/Linux/arch-linux.efi
==> ERROR: Invalid option -k -- '/boot/vmlinuz-linux' must be readable
==> WARNING: This does not handle Limine boot entries.
    Use 'limine-mkinitcpio' or 'limine-update' instead.
==> Would you like to run 'limine-mkinitcpio' now? [Y/n]: ^C

Last edited by ndgd (2025-12-19 22:04:58)

Offline

#2 2025-12-17 21:35:38

ndgd
Member
Registered: 2025-11-28
Posts: 7

Re: [Gave Up] Unable To Build UKI for systemd-boot after kernel update

[Update] Additional Info:

❯ paru -S linux
warning: linux-6.18.1.arch1-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-6.18.1.arch1-2

Total Installed Size:  143.55 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                               [--------------------------------------------] 100%
(1/1) checking package integrity                                             [--------------------------------------------] 100%
(1/1) loading package files                                                  [--------------------------------------------] 100%
(1/1) checking for file conflicts                                            [--------------------------------------------] 100%
(1/1) checking available disk space                                          [--------------------------------------------] 100%
:: Running pre-transaction hooks...
(1/2) Wait for limine-snapper-sync to finish...
(2/2) Remove upgraded DKMS modules
==> dkms remove --no-depmod v4l2loopback/0.15.3 -k 6.18.1-arch1-2
:: Processing package changes...
(1/1) reinstalling linux                                                     [--------------------------------------------] 100%
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Updating module dependencies...
(3/5) Install DKMS modules
==> dkms install --no-depmod v4l2loopback/0.15.3 -k 6.18.1-arch1-2
==> depmod 6.18.1-arch1-2
(4/5) Updating linux initcpios...
Building initramfs for linux (6.18.1-arch1-2)
==> Starting build: '6.18.1-arch1-2'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [plymouth]
  -> Running build hook: [autodetect]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [resume]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/tmp/staging_initramfs.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
Kernel stored in: /boot/6fa95ff62905417da7838d9359ccad21/linux/vmlinuz-linux
Initramfs stored in: /boot/6fa95ff62905417da7838d9359ccad21/linux/initramfs-linux
Updated: /boot/limine.conf
(5/5) Rebuilding systemd-boot UKI
call to execv failed (No such file or directory)
error: command failed to execute correctly

It seems sysdboot cannot coexist with limine...

Offline

#3 2025-12-19 13:50:01

ndgd
Member
Registered: 2025-11-28
Posts: 7

Re: [Gave Up] Unable To Build UKI for systemd-boot after kernel update

I decided to remove limine entirely and reinstalled systemd-boot. I have made a backup of the former

/boot

. Anyway, Should i mark tihs as

unsolved

?

Offline

#4 2025-12-19 19:17:09

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,565

Re: [Gave Up] Unable To Build UKI for systemd-boot after kernel update

Nope, choose something that reflects the status better,
In this case prepending the thread title(edit first post) with [Abandoned] or [Gave Up] seems appropriate.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2025-12-19 22:44:39

ndgd
Member
Registered: 2025-11-28
Posts: 7

Re: [Gave Up] Unable To Build UKI for systemd-boot after kernel update

Alright,

Quick update: I ended up using GRUB as a secondary bootloader so I can boot more easily into snapshots. I created a dedicated GRUB entry file for chainloading. I also added another GRUB entry for the kernel with specific kernel parameters for debugging, in case something goes wrong.

GRUB now acts purely as a fallback bootloader, while Sysd-boot remains the main bootloader.

Offline

Board footer

Powered by FluxBB