You are not logged in.
I'm trying to switch from grub to UKI. The system loads fine from grub (encrypted LVM). The filesystems on the running grub-booted system are mounted like so:
~$ mount | grep mapper
/dev/mapper/vg-root on / type ext4 (rw,relatime)
/dev/mapper/vg-home on /home type ext4 (rw,relatime)
~$ cat /etc/kernel/cmdline
loglevel=3 rd.luks.name=7e1267b3-b972-4413-8daf-6a1bdfcc42db=root root=/dev/mapper/vg-root"
~$
I built the UKI with the same kernel parameters. When I boot into it, I get prompted for the passphrase, and the volume group seems to be set up correctly:
Found device /dev/mapper/vg-root
Then I get 1,5 minutes' worth of this message:
A start job is running for /dev/mapper/vg-root
which times out with:
Dependency failed for InitrdRoot Device
Dependency failed for File System Check on /dev/mapper/vg-root
Dependency failed for /sysroot
Dependency failed for InitrdRoot File System
It seems that for some reason the UKI initrd cannot mount the root fs which is weird because I'm generating both the UKI and the seperate (grub-loaded) initramfs simultaneously from the same preset file:
~$ cat /etc/mkinitcpio.d/linux.preset
# mkinitcpio preset file for the 'linux' package
ALL_kver="/boot/vmlinuz-linux"
PRESETS=('default')
default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
default_uki="/boot/EFI/Linux/arch-linux.efi"
default_options="--splash /usr/share/systemd/bootctl/splash-arch.bmp"
~$
Both the UKI and the separate initramfs are made simultaneously with the same preset which runs without error:
[root ~]# mkinitcpio -p linux
==> 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 -g /boot/initramfs-linux.img --splash /usr/share/systemd/bootctl/splash-arch.bmp
==> Starting build: '6.12.1-arch1-1'
-> Running build hook: [base]
-> Running build hook: [systemd]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [kms]
-> Running build hook: [keyboard]
-> Running build hook: [sd-vconsole]
-> Running build hook: [block]
-> Running build hook: [sd-encrypt]
==> WARNING: Possibly missing firmware for module: 'qat_420xx'
-> Running build hook: [lvm2]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Creating unified kernel image: '/boot/EFI/Linux/arch-linux.efi'
-> Using cmdline file: '/etc/kernel/cmdline'
==> Unified kernel image generation successful
[root ~]#
Last edited by musbur (2024-12-02 15:51:00)
Offline
Is that the exact same kernel command line GRUB uses? Either check /boot/grub/grub.cfg or boot with GRUB and check /proc/cmdline.
Para todos todo, para nosotros nada
Offline
~$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/vg-root rw loglevel=3 quiet rd.luks.name=7e1267b3-b972-4413-8daf-6a1bdfcc42db=root root=/dev/mapper/vg-root
~$
Offline
Does adding rw to /etc/kernel/cmdline help at all? Remember to regenerate the UKI after editing the file.
Para todos todo, para nosotros nada
Offline
You can't even fsck the device - is your password qwerty-safe (assuming this is qwertz or maybe azerty)?
Try to set it to
Offline
~$ cat /proc/cmdline BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/vg-root rw loglevel=3 quiet rd.luks.name=7e1267b3-b972-4413-8daf-6a1bdfcc42db=root root=/dev/mapper/vg-root ~$
Doesn't that look weird to you? This looks like a concatenation of two command lines.
What's the content of your "/etc/cmdline.d/root.conf"? In my case this cmdline is used in both cases (UKI/non-UKI).
Offline
You can't even fsck the device - is your password qwerty-safe (assuming this is qwertz or maybe azerty)?
Yes it is and even if it weren't it shouldn't matter because grub and UKI both use the same build of the initramfs.
Offline
musbur wrote:~$ cat /proc/cmdline BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/vg-root rw loglevel=3 quiet rd.luks.name=7e1267b3-b972-4413-8daf-6a1bdfcc42db=root root=/dev/mapper/vg-root ~$
Doesn't that look weird to you? This looks like a concatenation of two command lines.
What's the content of your "/etc/cmdline.d/root.conf"? In my case this cmdline is used in both cases (UKI/non-UKI).
That's what I thought, too, but I couldn't find the source of the concatenation. I did
find /etc -type f | xargs grep 7e1267b3-b972
and found it only in /etc/default/grub and in /etc/kernel/cmdline (writing from memory here). Maybe grub-mkconfig pulls in /et/kernel/cmdline. Anyway, the BOOT_IMAGE you see above is what I get when booting from grub, so it works.
Offline
That's what I thought, too, but I couldn't find the source of the concatenation. I did
find /etc -type f | xargs grep 7e1267b3-b972
and [...]
But that GUID isn't mentioned twice - can you search for "root=/dev/mapper/vg-root" instead?
Maybe grub-mkconfig pulls in /et/kernel/cmdline.
No. In my case GRUB creates the command line via "grub-mkconfig", the "/etc/grub.d/*" files and appends the "GRUB_CMDLINE_LINUX_DEFAULT" value from "/etc/default/grub".
I took the resulting command line and wrote it to "/etc/cmdline.d/root.conf" for the UKI generation.
Anyway, the BOOT_IMAGE you see above is what I get when booting from grub, so it works.
And have you tried using that command line in "/etc/kernel/cmdline"?
Offline
Solved. Turns out I had overlooked the "sw" in the kernel command line. Jeez!
Offline
musbur wrote:That's what I thought, too, but I couldn't find the source of the concatenation. I did
find /etc -type f | xargs grep 7e1267b3-b972
and [...]
But that GUID isn't mentioned twice - can you search for "root=/dev/mapper/vg-root" instead?
$ find /etc -type f | xargs grep vg-root
/etc/kernel/cmdline:loglevel=3 rd.luks.name=7e1267b3-b972-4413-8daf-6a1bdfcc42db=root root=/dev/mapper/vg-root rw"
/etc/default/grub:GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 rd.luks.name=7e1267b3-b972-4413-8daf-6a1bdfcc42db=root root=/dev/mapper/vg-root"
$
I really have no idea where grub gets the double root= entry from, but then I find grub overly complicated anyway, which is why I'm going UKI in the first place.
Offline
I really have no idea where grub gets the double root= entry from
/boot/grub/grub.cfg?
See whether it's there and whether grub-mkconfig still generates it.
Offline