Anyone know how to setup UKIs for / with grub?
see more Unified kernel image - ArchWiki
@linux-aarhus has written a wiki or howto on the subject, I believe
Have seen it here.
The guides I have written implies throwing away grub but the following will also work
Modify the /etc/mkinitcpio.d/linux<kernel>.preset
# mkinitcpio preset file for the '6.18-x86_64' package
#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-6.18-x86_64"
PRESETS=('default')
#PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
#default_image="/boot/initramfs-6.18-x86_64.img"
default_uki="/efi/EFI/Linux/manjaro-6.18-x86_64.efi"
default_options="--splash /usr/share/systemd/bootctl/splash-manjaro.bmp"
#fallback_config="/etc/mkinitcpio.conf"
#fallback_image="/boot/initramfs-6.18-x86_64-fallback.img"
#fallback_uki="/efi/EFI/Linux/manjaro-6.18-x86_64-fallback.efi"
#fallback_options="-S autodetect"
Then create the folder /boot/efi/EFI/Linux
sudo mkdir /boot/efi/EFI/Linux
Run
sudo mkinitcpio -P
Clean up the /boot folder for obsolete kernel and init images - you way want to run update-grub as well.
Will try it out later
and when a new kernel is installed ?
If by new kernel you mean updates to an existing kernel - there is no change.
If you change the kernel version from e.g. 6.12 to 6.18 then you need to edit that kernels preset file.
The unified kernel is placed in /efi/EFI/Linux and should be picked up automagically by grub
Some adjustments are needed for grub:
efi lives under /boot
default_uki="/boot/efi/EFI/Linux/manjaro-6.18-x86_64.efi"
Result:
I ran into a Kernel Panic restored from a timeshift snapshot (on testing branch)
I forgot the UKI needs to be chainloaded
Out of curiosity, why with grub.
I’ve never used UKIs, but I thought the biggest advantage is you don’t need a bootloader. (Or use systemd-boot in conjuction.)
(Only trying to learn more.)
What is correct ?
/boot/efi/EFI/Linux or /efi/EFI/Linux ?
I have create /efi/EFI/Linux Folder, i change the linux.preset, i run mkinitcpio -P
/efi/EFI/Linux  ls -all  ✔
insgesamt 228388
drwxr-xr-x 2 root root 4096 2. Feb 08:13 .
drwxr-xr-x 3 root root 4096 2. Feb 08:11 ..
-rw------- 1 root root 115842560 14. Dez 19:33 manjaro-6.12-x86_64.efi
-rw------- 1 root root 118008832 14. Dez 19:33 manjaro-6.18-x86_64.efi
but
sudo update-grub  ✔
[sudo] Passwort fĂĽr weingeist:
GRUB-Konfigurationsdatei wird erstellt …
Thema gefunden: /usr/share/grub/themes/manjaro/theme.txt
Linux-Abbild gefunden: /boot/vmlinuz-6.18-x86_64
Initrd-Abbild gefunden: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-6.18-x86_64.img
Linux-Abbild gefunden: /boot/vmlinuz-6.12-x86_64
Initrd-Abbild gefunden: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-6.12-x86_64.img
Warnung: Zur Erkennung anderer bootfähiger Partitionen wird os-prober ausgeführt.
Dessen Ausgabe wird zur Erkennung bootfähiger Programmdateien und Erzeugen neuer Boot-Einträge verwendet.
Windows Boot Manager auf /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi gefunden
Bootmenü-Eintrag für UEFI-Firmware-Einstellungen wird hinzugefügt …
Root filesystem isn't btrfs
If you think an error has occurred, please file a bug report at "https://github.com/Antynea/grub-btrfs"
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: Warnung: Unbekannter Gerätetyp nvme0n1.
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
/usr/bin/grub-probe: Warnung: Unbekannter Gerätetyp nvme0n1.
abgeschlossen
grub goes /boot Directory
what is wrong
Needs to be chainloaded.
In Manjaro — and specifically because of Manjaro tools such as install-grub and update-grub — the correct path is /boot/efi/EFI. However, Fedora and Arch proper mount the EFI partition at /efi, and so there it would be /efi/EFI.
Or just symlinked. Make /efi a symbolic link to /boot/efi, or the other way around, depending on which is the actual mountpoint.