I encounter problems when trying fix a system, which was broken during update. The update basically crashed, most likely due to not having enough memory (i.e. swap file too small).
After the crash, the system wouldn’t boot. Then I proceeded like this:
Boot live system
cryptsetup luksOpen /dev/ and mount from dev/mapper/
chroot
remove package, where update previously failed
reinstall everything successfully
exit chroot, umount, reboot
I am then asked to enter the passphrase for the device. But then it stops with message
ERROR: device '/dev/mapper/<mapped device>' not found
I also checked my crypttab (which was not changed) and this looks very ok to me.
If you installation is a default Manjaro installation - you will have two encrypted containers - system and swap
Which mapped device? the system or the swap
With a default Manjaro it is named luks-<uuid> where the uuid is the one for an open luks container.
In openswap.conf you will have a swap_device and a keyfile_device - which one is named in the error message?
Also - because Manjaro uses GRUB and grub - historically has issues with luks2 - a luks container created by the installer with grub as loader will be using luks (1) encryption.
Understood. My bad, sorry! This is the full message:
ERROR: device '/dev/mapper/luks-<UUID>' not found
Skipping fsck.
mount: /new_root: filesystem was mounted, but any subsequent operation failed: Unknown error 5001.
You are being dropped into an emergency shell.
sh: can't access tty: job control turned off
From the chroot environment (as described in the linked article) you can attempt to complete the interrupted update, and perform other diagnostic and/or repair procedures as may be needed.
Please also note that kernel 6.10 reached EOL some 8 months ago, and was removed from the Manjaro repositories at that time.
I am confused, this is what I get from the command line:
sh-5.2# ls /usr/lib/modules
5.10.237-1-MANJARO 5.15.185-1-MANJARO 5.4.294-1-MANJARO 6.1.141-1-MANJARO
In addition, I’ve already conducted the steps suggested here
sh-5.2# [ -f /var/lib/pacman/db.lck ] && rm -f /var/lib/pacman/db.lck
pacman -Syyu
update-grub
:: Synchronizing package databases...
core 142.8 KiB 382 KiB/s 00:00 [####################################] 100%
extra 8.5 MiB 10.4 MiB/s 00:01 [####################################] 100%
multilib 148.1 KiB 370 KiB/s 00:00 [####################################] 100%
:: Starting full system upgrade...
there is nothing to do
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
sh-5.2#
A possibility is that kernel 6.10 is being recognised from the Manjaro Installer ISO you booted with – which indicates another likely complication – your Manjaro ISO is out of date.
Generally, the latest available ISO is recommended. I’d suggest downloading a fresh ISO and creating a new Installer USB; or even better, a Ventoy USB.
@soundofthunder
The kernel used on the live ISO, which is used to chroot into the defunct system is actually of no consequence, as long as it is not really ancient.
@dano
If you want us to help you to try and fix your system, please provide the following:
straight after booting the ISO - not in chroot yet and nothing mounted:
lsblk -f
Then please tell what exact steps you use to chroot.
First you’d have to open the encrypted container and then mount it,
as well as mount the separate EFI Partition to the correct place within that file system structure
and then manjaro-chroot to that location. manjaro-chroot -a
will NOT work (unless the automatism has been improved recently)
But it seems you are in chroot correctly.
From within or from without, check the contents of /etc/fstab
and /etc/default/grub
and /etc/mkinitcpio.conf
of the defunct system
I would do it like this:
cryptsetup open /dev/whatever encrypted
mount /dev/mapper/encrypted /mnt
mount /dev/name_of_EFI_partition /mnt/boot/efi
(this depends on what is in /etc/fstab but should be correct)
manjaro-chroot /mnt /bin/bash
… and then check the contents of the files mentioned above
From within, this is the mentioned files’ content:
sh-5.2# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=EF2D-725F /boot/efi vfat umask=0077 0 2
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
/dev/mapper/sda3_crypt /run/media/schnuffel/Data/ ext4 defaults 0 2
/dev/mapper/luks-29fdfcca-132c-4086-817d-32213e24c3be / ext4 defaults,noatime 0 1
/swapfile none swap defaults 0 0
sh-5.2#
sh-5.2# cat /etc/default/grub
# GRUB boot loader configuration
GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet cryptdevice=UUID=29fdfcca-132c-4086-817d-32213e24c3be:luks-29fdfcca-132c-4086-817d-32213e24c3be root=/dev/mapper/luks-29fdfcca-132c-4086-817d-32213e24c3be apparmor=1 security=apparmor 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=true
# 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
GRUB_ENABLE_CRYPTODISK=y
sh-5.2#
sh-5.2# cat /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES=(usbhid xhci_hcd)
MODULES=()
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=(/crypto_keyfile.bin)
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No RAID, lvm2, or encrypted root is needed.
# HOOKS=(base)
#
## This setup will autodetect all modules for your system and should
## work as a sane default
# HOOKS=(base udev autodetect modconf block filesystems fsck)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev modconf block filesystems fsck)
#
## This setup assembles a mdadm array with an encrypted root file system.
## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
## This setup loads an lvm2 volume group.
# HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
## This will create a systemd based initramfs which loads an encrypted root filesystem.
# HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr and fsck hooks.
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)
# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"
sh-5.2#
I’d say a hook for opening the encrypted system partition is missing. What do you think?
Anyway, I’ve copied the hooks from a similar setup, containing the missing ‘encrypted’ hook.
Then I made a terrible mistake, i.e. changing a second thing before confirming the first issue being resolved…
I reinstalled grub due to a message from pacman package upgrade, stating that one may consider reinstalling grub.
In details I conducted these steps:
sh-5.2# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
Installing for x86_64-efi platform.
Installation finished. No error reported.
sh-5.2# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
sh-5.2# update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done
sh-5.2#
After reboot I stuck at this error now:
error: symbol 'grub_is_cli_need_auth' not found.
Entering rescue mode...
From grub documentation I understand that I’ve conducted the correct steps in order to fix this (grub-install, grub-mkconfig, update-grub).
I apologize for my clumsiness. How can I fix this?
The order, the place where in the line of parameters the “encrypt” HOOK is added, is (from my understanding) not arbitrary.
It should be at a certain place - although it is only supposed to ensure that the “cryptsetup” binary is included in the initrd.
I could only search for that error/message and find the same as you.
I do not know what it means (right now) nor how to attack/resolve it.
From seeing/reading it
it should definitely be uncommented in your situation.
Again - I have no reference from an older installation anymore to compare and know what it was and what definitely did work.
But I always did my installations with unencrypted /boot - so that was never a factor.
I also don’t know why it would have changed without your involvement or knowledge -
same goes for the HOOKS in /etc/mkinitcpio.conf
As for the changed hooks, I might have made a mistake when maintaining pacnews. This is the only reason I could imagine for now, but this is really a guess.
Please note that the parameter was always enabled in my setup (cf. the bottom of the posted configuration /etc/default/grub above). I also tweaked it (disabled it) and figured out that it is not possible to install grub when encrypted disks are present (grub will report the mismatch).
update-grub: I’ve always conducted this step at any change of the configuration. Sorry for the imprecise report.
/etc/mkinitcpio.conf: I have adopted it according to your suggestion and ran mkinitcpio -P to regenerate the images and once again update-grub.
Unfortunately, nothing helped!
I stuck at boot (after being prompted for passphrase and having successfully encrypted my system partition) with missing symbol grub_is_cli_need_auth.
… different boot loader ID …
I think the original ID was Manjaro - you now used GRUB.
Your ESP was mounted prior to entering chroot?
I’m almost ignorant when it comes to UEFI stuff.
Other people can help far better.
ps:
you will not get any more answers to your thread in the Arch Forum after they quickly found out that you are not asking about Arch but about Manjaro.