Can't boot after interrupted update

Following a system upgrade, my laptop fails to boot: [Stable Update] 2026-02-01 - Kernels, COSMIC, Plasma, GNOME, Mesa - #65 by WhySoComplicated

I tried the update as recommended in the release thread, and pamac gave no indication that anything went wrong. However, after rebooting, I get asked for encryption password, then after a (long!) while:

[ TIME ] Timed out waiting for device /dev/■67fda2-...
[DEPEND] Dependency failed for Initrd Root Device
[DEPEND] Dependency failed for /sysroot
[DEPEND] Dependency failed for Initrd Root File System
[DEPEND] Dependency failed for File System ■67fda2-...
You are in emergency mode. After loggin in, ...

Cannot open access to console, the root account is locked.

Press Enter to continue

Reloading system manager configuration
Starting initrd.target
You are in emergency mode...

And it just repeats when I continue pressing Enter.

In the first line, it literally says [TIME], I didn’t replace a timestamp there.
It also displays a square there after /dev/, device in /etc/fstab starts with /dev/8b67fda2-…

Last journalctl entry is from when I tried the update, meaning no entry from failed boot attempts.
The update, back in the day, seemed to have worked without error, except that the system became unbootable. journalctl is hard for me to read, so if there is something specific in there that I should look out for, please let me know.

My attempts to fix from a live system:

[manjaro manjaro]# fsck -f /dev/nvme0n1p1
fsck from util-linux 2.41.3
fsck.fat 4.2 (2021-01-31)
/dev/nvme0n1p1: 5 files, 246/76646 clusters

[manjaro manjaro]# btrfs check /dev/mapper/xyz
Opening filesystem to check...
Checking filesystem on /dev/mapper/xyz
UUID: 64f382fc-...
[1/8] checking log skipped (none written)
[2/8] checking root items
[3/8] checking extents
[4/8] checking free space tree
We have a space info key for a block group that doesn't exist
[5/8] checking fs roots
[6/8] checking only csums items (without verifying data)
[7/8] checking root refs
[8/8] checking quota groups skipped (not enabled on this FS)
found 26783731712 bytes used, error(s) found
total csum bytes: 24596948
total tree bytes: 957661184
total fs tree bytes: 889896960
total extent tree bytes: 38387712
btree space waste bytes: 169793318
file data blocks allocated: 39129706496
 referenced 41033064448

UUID reported by btrfs check is different than the UUID in /etc/fstab, probably because the mapper has a different ID than the hardware device.

After chrooting into the unbootable system:

pacman -Syyu
ldconfig
mkinitcpio -P
update-grub

No errors there, except:

  • “cannot find a GRUB drive for /dev/sda1” during update-grub, but /dev/sda1 is the thumb drive, I hope that is harmless.
  • when I did pacman -Syyu, and timeshift-auto-snapshot is on, it fails. So maaaybe the error is related to timeshift/snapshots. Unfortunately I didn’t write down the error message and now that all the updates are made it doesn’t attempt to create a snapshot. If you know how to reproduce the error, let me know.

System still not bootable.

How can I repair the system?

Go inspect /etc/fstab. Looks to me like it has set the thumb drive as the one to boot from, and now that it’s removed, it can’t find it and has a crisis.

EDIT: That square in the device name. I wonder if there’s a character there the system doesn’t understand at that point. Those squares usually replace characters that aren’t in the encoding used.

Hmm - there the guide

[root tip] [recovery] Basic Manjaro Linux Rescue and Recovery

This will help you reach a point where you can work with rescue tasks.

I have very little experience with timeshift shapshots in relation with booting from grub and so I have only ideas on how to create a bootable system.

According to lsblk -f, /dev/nvmen1p2 is 8b67… (the one in fstab (in fstab it say /dev/mapper/luks-8b67…, and they are ordinary characters according to python)), /dev/mapper/xyz is 64f382… (as btrfs check reports). So that should be fine, I guess. /dev/sda* has timestamps as UUIDs.

I found a post on the Arch-forums, which looks quite similar to yours (Luks, BTRFS…), if you want to take a look.

1 Like

I don’t know how you fix grub in this use case - but I reckon this can make your system bootable.

UEFI is a boot loader in itself. Using grub as intermediary adds into the chain.

My idea, to establish a booting system, is to generate a unified kernel and inject it into the firmware.

The steps are fairly easy - do make sure you are doing this in a chroot environment (using the above mentioned guide).

Edit the file /etc/mkinitcpio.d/$KERNEL.preset (it has a lot of comments so I just show the essentials - ensure the rest of the lines are commented)

ALL_kver="/boot/vmlinuz-6.18-x86_64"
PRESETS=('default')
default_uki="/boot/efi/EFI/Linux/manjaro-6.18.efi"
default_options="--splash /usr/share/systemd/bootctl/splash-manjaro.bmp"

Do note the /efi/EFI/Linux as this path is not created by default (you can workaround this - just mention the dead easy one).

mkdir -p /boot/efi/EFI/Linux

Then generate the unified kernel - assuming are using the 6.18 kernel (adjust if you are not)

mkinitcpio -p linux618

Then add the newly generated unified kernel to the firmware (the example uses informatton from your previous comments)

efibootmgr --create --disk /dev/nvme0n1 --part 1 --loader "EFI/Linux/manjaro-6.18.efi" --label "Manjaro 6.18" --unicode

Then exit the chroot

exit

The loader should be the default loader when you reboot your system

The result should be a booting system - if you really need grub - you can fiddle with that later.

Well, technically that’s not true. :wink:

  • The UEFI is the firmware that sets up all of the hardware in your computer at the lowest level — voltages, memory module timings, et al. It is a more modern 64-bit replacement for the legacy 16-bit real-mode BIOS.

  • The UEFI has a boot manager, which allows one to choose a device to boot from.

  • grub is a boot loader. It allows one to load a kernel into memory and boot it, even though grub can also be used as a boot manager for booting from third-party devices — i.e. storage devices with another operating system on them.

  • A unified kernel contains its own boot loader, embedded in the bootstrap code of the compressed kernel binary.

So grub is not an intermediary. It is a logical step in the chain “UEFI Boot Manager → UEFI Executable as Boot Loader → Kernel & initramfs. A unified kernel puts the boot loader inside the kernel image, and it’ll be a simpler boot loader, because it only needs to load that one kernel.

:wink:

No Frank, you are wrong, perhaps because you are the old bios/mbr school where the initrd loaded the kernel and therefore required a bootloader.

No matter how one try explain it, the UEFI firmware acts as boot loader as it points to an executable that will load the operating system.

When one point the UEFI firmware to grubx64.efi as the entry point which then loads an entry based on grub configuration file then you are effectively injecting a second layer.

The UEFI firmware is perfectly capable of loading a unified kernel directly, thus eliminating the need for grub - the entire reason for me to suggest it as a working option.

1 Like

Interesting find, thanks! I’m not sure if I follow the solution of the linked thread. However, I did check my own /etc/default/grub and /boot/grub/grub.cfg . I even cross-refereced with my (working) desktop PC. It looks like it should work, the UUIDs are all correct, too. Didn’t even spot a ■ in there. Though update-grub and grub-mkconfig - /boot/grub/grub.cfg generate the line cryptomount -u 8b67... slightly differently, update-grub writes UUIDs without dashes, grub-mkconfig includes dashes.

/boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi

if [ "${env_block}" ] ; then
  set env_block="(${root})${env_block}"
  export env_block
  load_env -f "${env_block}"
fi

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   if [ "${env_block}" ] ; then
     save_env -f "${env_block}" next_entry
   else
     save_env next_entry
   fi
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    if [ "${env_block}" ] ; then
      save_env -f "${env_block}" saved_entry
    else
      save_env saved_entry
    fi

  fi
}

function load_video {
  if [ x$grub_platform = xefi ]; then
    insmod efi_gop
    insmod efi_uga
  elif [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=light-gray/black
set menu_color_highlight=green/black

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod btrfs
cryptomount -u 8b67fda2-[...]
set root='cryptouuid/8b67fda2[...]'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='cryptouuid/8b67fda2[...]'  64f382fc-[...]
else
  search --no-floppy --fs-uuid --set=root 64f382fc-[...]
fi
    font="/@/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod btrfs
cryptomount -u 8b67fda2-[...]
set root='cryptouuid/8b67fda2[...]'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='cryptouuid/8b67fda2[...]'  64f382fc-[...]
else
  search --no-floppy --fs-uuid --set=root 64f382fc-[...]
fi
insmod gfxmenu
loadfont ($root)/@/usr/share/grub/themes/manjaro/dejavu_sans_12.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/dejavu_sans_14.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/dejavu_sans_16.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/dejavu_sans_24.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/dejavu_sans_48.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/dejavu_sans_bold_16.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/dejavu_sans_mono_12.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/terminus-12.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/terminus-14.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/terminus-16.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/terminus-18.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/terminus-b12.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/terminus-b14.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/terminus-b16.pf2
loadfont ($root)/@/usr/share/grub/themes/manjaro/terminus-b18.pf2
insmod png
set theme=($root)/@/usr/share/grub/themes/manjaro/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=hidden
  set timeout=5
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 5 ; then
  set timeout=0
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-64f382fc-[...]' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod cryptodisk
	insmod luks
	insmod gcry_rijndael
	insmod gcry_rijndael
	insmod gcry_sha256
	insmod btrfs
	cryptomount -u 8b67fda2-[...]
	set root='cryptouuid/8b67fda2[...]'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='cryptouuid/8b67fda2[...]'  64f382fc-[...]
	else
	  search --no-floppy --fs-uuid --set=root 64f382fc-[...]
	fi
	linux	/@/boot/vmlinuz-6.12-x86_64 root=UUID=64f382fc-[...] rw rootflags=subvol=@  quiet cryptdevice=UUID=8b67fda2-[...]:luks-8b67fda2-[...] root=/dev/mapper/luks-8b67fda2-[...] splash udev.log_priority=3
	initrd	/@/boot/intel-ucode.img /@/boot/amd-ucode.img /@/boot/initramfs-6.12-x86_64.img
}
submenu 'Advanced options for Manjaro Linux' $menuentry_id_option 'gnulinux-advanced-64f382fc-[...]' {
	menuentry 'Manjaro Linux (Kernel: 6.12.73-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.12.73-1-MANJARO x64-advanced-64f382fc-[...]' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod btrfs
		cryptomount -u 8b67fda2-[...]
		set root='cryptouuid/8b67fda2[...]'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='cryptouuid/8b67fda2[...]'  64f382fc-[...]
		else
		  search --no-floppy --fs-uuid --set=root 64f382fc-[...]
		fi
		linux	/@/boot/vmlinuz-6.12-x86_64 root=UUID=64f382fc-[...] rw rootflags=subvol=@  quiet cryptdevice=UUID=8b67fda2-[...]:luks-8b67fda2-[...] root=/dev/mapper/luks-8b67fda2-[...] splash udev.log_priority=3
		initrd	/@/boot/intel-ucode.img /@/boot/amd-ucode.img /@/boot/initramfs-6.12-x86_64.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/15_ostree ###
### END /etc/grub.d/15_ostree ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
		fwsetup
		}
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/41_snapshots-btrfs ###
if [ ! -e "${prefix}/grub-btrfs.cfg" ]; then
echo ""
else
submenu 'Manjaro Linux snapshots' {
    configfile "${prefix}/grub-btrfs.cfg"
}
fi
### END /etc/grub.d/41_snapshots-btrfs ###

### BEGIN /etc/grub.d/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        search --fs-uuid --no-floppy --set=root --hint='cryptouuid/8b67fda2[...]'  64f382fc-[...]
        linux16 /@/boot/memtest86+/memtest.bin 
    }
fi
### END /etc/grub.d/60_memtest86+ ###

### BEGIN /etc/grub.d/60_memtest86+-efi ###
if [ "${grub_platform}" == "efi" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        if loadfont unicode ; then
            set gfxmode=1024x768,800x600,auto
            set gfxpayload=800x600,1024x768
            terminal_output gfxterm
        fi
        search --fs-uuid --no-floppy --set=root --hint='cryptouuid/8b67fda2[...]'  64f382fc-[...]
        linux /@/boot/memtest86+/memtest.efi 
    }
fi
### END /etc/grub.d/60_memtest86+-efi ###
/etc/default/grub
# GRUB boot loader configuration

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR='Manjaro'
GRUB_CMDLINE_LINUX_DEFAULT='quiet cryptdevice=UUID=8b67fda2-[...]:luks-8b67fda2-[...] root=/dev/mapper/luks-8b67fda2-[...] splash udev.log_priority=3'
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'menu' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=hidden

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
GRUB_SAVEDEFAULT=false

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Uncomment this option to enable os-prober execution in the grub-mkconfig command
GRUB_DISABLE_OS_PROBER=false

# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
#GRUB_ROOT_FS_RO=true

I don’t know, do I need grub? I installed that system following the manjaro installer that comes with the live system, and apparently that installs grub.
Is it needed for full disk encryption?

I shall try. I hope I find the time to do so today.

Yes the installer use grub for compatibility.

The reason I ask

is related to various dual-booting scenarios and btrfs snapshots.

If you are solely using Manjaro (without the need to boot windows) then you may simplify your setup - and in simplifying you may isolate issues.

Booting using a unified kernel puts all the loading into one file - that is loaded by the efi firmware - thus eliminating any issues with grub using the wrong btrfs snapshot.

Using a unified kernel will consolidate all booting related tasks into one image or efi-stub.

I cannot guarantee you get a working system - but chances are is high 99% in my opinion.

Of course the UEFI firmware can do that, but my point is that a unified kernel has its own boot loader embedded into it. Without a unified kernel, the UEFI cannot boot the kernel directly.

Now, one could argue — and I see this as your point — that grubx64.efi is an intermediary step, but it’s only a more complex version of the EFI stub in the unified kernel.

(The initramfs does not load the kernel, by the way. It’s a ramfs with a cpio archive of all the driver modules that the kernel needs for booting. It’s the bootstrap code in the kernel binary which loads the initramfs, not the other way around.)

So it’s all a matter of perspective. :man_shrugging:

1 Like

Hi.

Just an idea that crossed my mind.

Would it be possible when using pamac to update and when it usually makes a snapshot before updating, to automatically (or ask) doing a restore to that previous snapshot if the pamac updating process fail ?

I only use pamac, IDK if pacman may do the same?

In that case, it may prevent having a half done update and rebooting to a faulty configuration?

Just my two cents…

I followed your instructions (and what was already in the file), yet mkinitcpio complains. I might have done something wrong. Or a typo. Output below.

[manjaro /]# ls /boot/efi/EFI/
boot  Linux  Manjaro

[manjaro /]# grep -v "#" /etc/mkinitcpio.d/linux612.preset
ALL_kver="/boot/vmlinuz-6.12-x86_64"
PRESETS=('default')
default_uki="/efi/EFI/Linux/manjaro-6.12-x86_64.efi"
default_options="--splash /usr/share/systemd/bootctl/splash-manjaro.bmp"

[manjaro /]# mkinitcpio --verbose -p linux612
==> Building image from preset: /etc/mkinitcpio.d/linux612.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -v -k /boot/vmlinuz-6.12-x86_64 -U /efi/EFI/Linux/manjaro-6.12-x86_64.efi --splash /usr/share/systemd/bootctl/splash-manjaro.bmp
==> ERROR: Invalid option -U -- '/efi/EFI/Linux/manjaro-6.12-x86_64.efi' must be writable

[manjaro /]# df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/xyz  239G   26G  211G  11% /
/dev/mapper/xyz  239G   26G  211G  11% /home
/dev/mapper/xyz  239G   26G  211G  11% /var/log
/dev/mapper/xyz  239G   26G  211G  11% /var/cache
/dev/nvme0n1p1       300M  988K  299M   1% /boot/efi

No, not as it is currently implemented. It would take a much more complicated setup.

The action is triggered through a pacman hook, not by pamac itself.

Also, at present time, it is safer to use pacman than to use pamac. And if you need a GUI, octopi is now the more reliable choice.

3 Likes

I forgot - I am so sorry - this expects your efi to be mounted at /efi

Change the path in /etc/knitcpio.d/linux618.efi to read

This will make it work with the location at the current mountpoint.

1 Like

Or create a symlink… :backhand_index_pointing_down:

sudo ln -s /boot/efi /efi

:wink:

1 Like

Thanks for clearing that up!
Just for the record, I tried researching this and found some threads where the error was missing permissions or an unspecified typo, started reading mkinitcpio documentation, but that’s quite long so I only got halfway through yesterday.

Anyway, the mkinitcpio worked, and when I reboot after adding it with efibootmgr, then the next boot looks slightly differently - it has a splash screen, I don’t get asked for a password, and I see some [ OK ] messages - but ultimately I run into the same unbootable loop where the root account is locked. Only difference is that it now Timed out waiting for device /dev/gpt-auto-root.

:frowning:

PS: I tried finding the ■:

LC_ALL=C  grep -P -rn "[\x80-\xFF]" /etc

(also tried with /boot)
But I didn’t find it.
I wonder why the disk seems unavailable at boot, I mean I can chroot into it without issue, and even write to it, from a live system. So I guess kernel/grub/whatever looks in the wrong place? But why? And where is that written? Or is some service not starting that would be required to access the disk? I mean, it doesn’t say that it can’t find or read the disk, but it times out.

PPS: even more info

[manjaro manjaro]# blkid
/dev/loop1: BLOCK_SIZE="262144" TYPE="squashfs"
/dev/nvme0n1p1: UUID="7060-CBD0" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="9af39661-[...]"
/dev/nvme0n1p2: UUID="8b67fda2-[...]" TYPE="crypto_LUKS" PARTLABEL="root" PARTUUID="771ea9ec-[...]"
/dev/loop2: BLOCK_SIZE="262144" TYPE="squashfs"
/dev/loop0: BLOCK_SIZE="262144" TYPE="squashfs"
/dev/sda2: SEC_TYPE="msdos" LABEL_FATBOOT="MISO_EFI" LABEL="MISO_EFI" UUID="7FAA-4B76" BLOCK_SIZE="512" TYPE="vfat"
/dev/sda1: BLOCK_SIZE="2048" UUID="2026-02-06-11-06-44-00" LABEL="MANJARO_KDE_2602" TYPE="iso9660"
/dev/loop3: BLOCK_SIZE="262144" TYPE="squashfs"

[manjaro manjaro]# lsblk -f
NAME      FSTYPE FSVER   LABEL            UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0     squash 4.0                                                                 0   100% /run/miso/sfs/livefs
loop1     squash 4.0                                                                 0   100% /run/miso/sfs/mhwdfs
loop2     squash 4.0                                                                 0   100% /run/miso/sfs/desktopfs
loop3     squash 4.0                                                                 0   100% /run/miso/sfs/rootfs
sda       iso966 Joliet  MANJARO_KDE_2602 2026-02-06-11-06-44-00                     0   100% /run/miso/bootmnt
├─sda1    iso966 Joliet  MANJARO_KDE_2602 2026-02-06-11-06-44-00
└─sda2    vfat   FAT12   MISO_EFI         7FAA-4B76
nvme0n1
├─nvme0n1p1
│         vfat   FAT32                    7060-CBD0
└─nvme0n1p2
          crypto 1                        8b67fda2-[...]

[manjaro /]# cat /etc/fstab
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=7060-CBD0                            /boot/efi      vfat    defaults,umask=0077 0 2
/dev/mapper/luks-8b67fda2-[...] /              btrfs   subvol=/@,defaults,compress=zstd:1 0 0
/dev/mapper/luks-8b67fda2-[...] /home          btrfs   subvol=/@home,defaults,compress=zstd:1 0 0
/dev/mapper/luks-8b67fda2-[...] /var/cache     btrfs   subvol=/@cache,defaults,compress=zstd:1 0 0
/dev/mapper/luks-8b67fda2-[...] /var/log       btrfs   subvol=/@log,defaults,compress=zstd:1 0 0
/dev/mapper/luks-8b67fda2-[...] /swap          btrfs   subvol=/@swap,defaults,noatime 0 0
/swap/swapfile                            swap           swap    defaults   0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

[manjaro /]# cat /etc/crypttab
# <name>               <device>                         <password> <options>
luks-8b67fda2-[...] UUID=8b67fda2-[...]     /crypto_keyfile.bin luks

[manjaro /]# grep -v "#" /etc/mkinitcpio.conf
MODULES=()
BINARIES=()
FILES=()
HOOKS=(base systemd autodetect microcode modconf kms keyboard keymap sd-vconsole block filesystems fsck)

I alsy tried adding sd-encrypt to HOOKS (and adding the keyfile to FILES); I reverted the change in /etc/mkinitcpio.d/linux12.preset, added it and ran mkinitcpio and update-grub, but system still unbootable.

I realise that what I think is a piece of cake may not be so at all.

I forget that the type of encryption matters, I forget that the kernel cmdline is configured elsewhere, I forget that … you get it.

:man_facepalming:

My deepest apology for not thinking of everything.

Let me try again

What I know now - based on your previous comments

  1. your system disk is /dev/nvme0n1 - your boot partition is 1 and system is 2
  2. the root is an encrypted LUKS container luks1
  3. the root file system is btrfs
  4. kernel is 6.12

Start with boot the live ISO

Open a terminal and switch to root context using su

Convert the container on the root partition to luks2 - this gives you better encryption and faster unlocking

cryptsetup convert /dev/nvme0n1p2 --luks2
cryptsetup luksConvertKey /dev/nvme0n1p2 --pbkdf argon2id

using labels simplifies maintenance so add a label to the root partition cryptsystem

e2label cryptsystem /dev/nvme0n1p2

Unlock the root container

cryptsetup open /dev/nvme0n1p2 system

Mount the btrfs filesystem

mount -t btrfs -o subvol=@ /dev/mapper/system /mnt
mount -t btrfs -o subvol=@home /dev/mapper/system /mnt/home
mount -t btrfs -o subvol=@cache /dev/mapper/system /mnt/var/cache
mount -t btrfs -o subvol=@log /dev/mapper/system /mnt/var/log

simplify the maintenance by adding a label to your btrfs file system root

btrfs filesystem label /mnt system
udevadm trigger

mount the efi partition

(I assume you created the folder earlier, if not create it now (if you created a symlink - remove it beforehand)

mkdir /mnt/efi
mount /dev/nvme0n1p1 /mnt/efi

enter chroot

manjaro-chroot /mnt /bin/bash

add linux 6.18 and remove linux 6.12

Because 6.18 is the latest LTS - now is a good time to remove 6.12

pacman -Syu linux618
pacman -Rns linux612

Now onto configuration

edit: revert the change you made to /etc/mkinitcpio.d/linux618.preset so the line reads (assuming you are using linux 6.18)

default_uki="/efi/EFI/Linux/manjaro-6.18.efi"

edit: add a FONT and FONT_MAP to /etc/vconsole.conf this will make it possible to use non-us characters in the passphrase

FONT=lat2-16
FONT_MAP=8859-1

edit: remove or comment root directive from /etc/crypttap (no use for it, as the kernel now resides in the efi stub)
edit: change /etc/fstab to use /efi as mountpoint for $esp (instead of /boot/efi)

edit: simplify maintenance by modifying /etc/fstab to use a partition label instead of uuid

LABEL=system  /  btrfs  subvol=/@,defaults,compress=zstd:1  0  0
LABEL=system  /home  btrfs  subvol=/@home,defaults,compress=zstd:1  0  0
LABEL=system  /var/log  btrfs  subvol=/@log,defaults,compress=zstd:1  0  0
LABEL=system  /var/cache  btrfs  subvol=/@cache,defaults,compress=zstd:1  0  0

create: file /etc/crypttab.initramfs with content, this is where we point the root file system (instead of the crypttab file above)

system /dev/disk/by-partlabel/cryptsystem none timeout=120

create: file /etc/kernel/cmdline with content.

fbcon=nodefer rd.luks.allow-discards bgrt_disable root=LABEL=system rootflags=subvol=@,rw quiet splash udevlog_priority=3 vt.global_cursor_default=0

edit: file /etc/mkinitcpio.conf

  • FILES=() array - remove keyfile
  • HOOKS=(systemd microcode autodetect kms modconf block keyboard sd-vconsole sd-encrypt filesystems plymouth fsck)

configure: plymouth to use a theme like bgrt or spinfinity

plymouth-set-default-theme bgrt

generate: the unified kernel (assuming linux 6.18 kernel)

mkinitcpio -p linux618

Since you already added the kernel to the firmware - this should be all.

Remember to remove grub and related files

pacman -Rns grub-theme-manjaro install-grub update-grub grub grub-btrfs mkinitcpio-openswap

Be sure to do some house keeping - remove obsolete kernels and their configuration.

By using the Linux 6.18 kernel and point the efi firmware to the kernel you are booting directly into your Manjaro system.

I created a guide in [root tip] [How To] Convert from GRUB to UKI

1 Like

No worries. Sorry for not sharing more information earlier.
Thank you so much for your time!
And for typing all this.

I have a partial progress report, and a few comments for your guide.

--luks2 doesn’t exist, I assume you mean --type luks2

e2label supposedly only works fro ext2, ext3 and ext4. I used cryptsetup config /dev/sdb1 --label YOURLABEL

And just because it appears at this point in the guide: what is the difference between manjaro-chroot and normal chroot?

While installing linux618, I hat timeshift-autosnap enabled and that gave me the following error:

(1/2) Creating Timeshift snapshot before upgrade...

** (process:68): CRITICAL **: 12:15:46.963: tee_jee_file_system_path_combine: assertion 'path1 != NULL' failed

** (process:68): CRITICAL **: 12:15:46.963: tee_jee_file_system_dir_exists: assertion 'dir_path != NULL' failed

** (process:68): CRITICAL **: 12:15:46.963: tee_jee_file_system_path_combine: assertion 'path1 != NULL' failed

** (process:68): CRITICAL **: 12:15:46.963: tee_jee_file_system_dir_exists: assertion 'dir_path != NULL' failed
First run mode (config file not found)
Selected default snapshot type: BTRFS
E: System disk not found!
Unable to run timeshift-autosnap! Please close Timeshift and try again. Script will now exit...

I disabled timeshift-autosnap and could install linux618. Could the timeshift error be related to my boot problems? I mean, disk not found seems rather strange considering I am currently writing to that very disk…

In your guide, you have two uses for the label system, once in cryptsetup open and once as btrfs filesystem label. I assume that the system in cryptsetup open is temporary and everything I am supposed to write into files is the btrfs filesystem label?
e.g. in system /dev/disk/by-partlabel/cryptsystem none timeout=120
Also, my labels only show up in /dev/disk/by-label/ (without part).

That seems purely visual, is it necessary? If not, I would recommend removing it from the guide or marking it as optional (for the record I did try both the default manjaro and bgrt).

Unfortunately, I still can’t boot:

error: disk/cryptodisk.c:__grub_cmd_cryptomount:1575:no such cryptodisk found, perhaps a needed disk or cryptodisk module is not loaded.
error: kern/disk.c:grub_disk_open:240:disk `cryptouuid/8b67fda[...]' not found.
Entering rescue mode...
grub rescue> _

I am baffled that it still mentions grub, is that supposed to happen with a Unified Kernel Image?
At least the UUID seems correct, so… progress? :sweat_smile:
edit: I should clarify that this error appears without being prompted for a password.

[manjaro manjaro]# efibootmgr  | grep -i manjaro
Boot0001* Manjaro       HD(1,GPT,9af39661-[...],0x1000,0x96000)/\EFI\Manjaro\grubx64.efi
Boot0002* Manjaro 6.18 UKI      HD(1,GPT,9af39661-[...],0x1000,0x96000)/\EFI\Linux\manjaro-6.18.efi

I double checked Bios Settings to make sure the UKI entry is booted. I even moved EFI/Manjaro to EFI/Manjaro_backup so it can’t accidentally be booted.

I will continue trying to troubleshoot it later, if you have some insights in the meantime I’d be grateful.

PS: I tried pbkdf2 instead of argon2id, no success.
PPS: Turns out I can’t read, I had manjaro-6.18.efi in efibootmgr, yet manjaro-6.18-x86_64.efi in the preset file. Which you even explicitly said in one of your comments that I have to change it. Unfortunately I apparently broke something in my other attempts to fix things and now get ERROR: Failed to mount 'LABEL=system' on real root - I wasn’t even asked for a password! Will continue to tinker, but wanted to report I moved the problem :sweat_smile: