I have two NVMe in my desktop, one installed with Windows and the other for Manjaro. I boot Manjaro either directly in UEFI or in VMWare in Windows. The setup works before.
Now when I try to boot the Manjaro directly, I get “device ‘/dev/mapper/luks-***’ not found” error:
I am sure the UUID is correct. I fixed the error by manjaro-chroot
into the system and execute sudo mkinitcpio -P
without modifying any configurations. However, booting from UEFI works now but booting from VMWare is now broken with the same error:
If I do the chroot to fix the VM, then the direct boot will have the same error again.
BTW, the keyboard doesn’t work in rootfs emergency shell.
/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=(xhci_hcd usbhid vmwgfx nvidia nvidia_modeset nvidia_uvm nvidia_drm)
# 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)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr and fsck hooks.
HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block encrypt filesystems fsck)
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
#COMPRESSION="zstd"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
# MODULES_DECOMPRESS
# Decompress kernel modules during initramfs creation.
# Enable to speedup boot process, disable to save RAM
# during early userspace. Switch (yes/no).
#MODULES_DECOMPRESS="yes"
/etc/default/grub:
GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=3f73e406-400c-4d10-8d29-19133640601c:luks-3f73e406-400c-4d10-8d29-19133640601c root=/dev/mapper/luks-3f73e406-400c-4d10-8d29-19133640601c cryptkey=rootfs:/crypto_keyfile.bin"
GRUB_CMDLINE_LINUX=""
# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true
# 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
# 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=auto
# 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 ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically
# GRUB_ROOT_FS_RO=true
# Uncomment this option to enable os-prober execution in the grub-mkconfig command
GRUB_DISABLE_OS_PROBER=true
/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=BA4F-80CC /boot/efi vfat umask=0077 0 2
/dev/mapper/luks-3f73e406-400c-4d10-8d29-19133640601c / ext4 defaults,noatime 0 1
/etc/crypttab:
# /etc/crypttab: mappings for encrypted partitions.
#
# Each mapped device will be created in /dev/mapper, so your /etc/fstab
# should use the /dev/mapper/<name> paths for encrypted devices.
#
# See crypttab(5) for the supported syntax.
#
# NOTE: Do not list your root (/) partition here, it must be set up
# beforehand by the initramfs (/etc/mkinitcpio.conf). The same applies
# to encrypted swap, which should be set up with mkinitcpio-openswap
# for resume support.
#
# <name> <device> <password> <options>
luks-3f73e406-400c-4d10-8d29-19133640601c UUID=3f73e406-400c-4d10-8d29-19133640601c /crypto_keyfile.bin luks
/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 ###
if [ -s $prefix/grubenv ]; then
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
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}"
save_env saved_entry
fi
}
function load_video {
if [ 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 ext2
cryptomount -u 3f73e406400c4d108d2919133640601c
set root='cryptouuid/3f73e406400c4d108d2919133640601c'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/3f73e406400c4d108d2919133640601c' 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
else
search --no-floppy --fs-uuid --set=root 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u 3f73e406400c4d108d2919133640601c
set root='cryptouuid/3f73e406400c4d108d2919133640601c'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/3f73e406400c4d108d2919133640601c' 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
else
search --no-floppy --fs-uuid --set=root 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
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=menu
set timeout=0
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
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-6200ac2f-a28e-4da6-99f7-8c9c4ed48a19' {
savedefault
load_video
set gfxpayload=auto
insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u 3f73e406400c4d108d2919133640601c
set root='cryptouuid/3f73e406400c4d108d2919133640601c'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/3f73e406400c4d108d2919133640601c' 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
else
search --no-floppy --fs-uuid --set=root 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
fi
linux /boot/vmlinuz-6.1-x86_64 root=UUID=6200ac2f-a28e-4da6-99f7-8c9c4ed48a19 rw cryptdevice=UUID=3f73e406-400c-4d10-8d29-19133640601c:luks-3f73e406-400c-4d10-8d29-19133640601c root=/dev/mapper/luks-3f73e406-400c-4d10-8d29-19133640601c cryptkey=rootfs:/crypto_keyfile.bin
initrd /boot/intel-ucode.img /boot/initramfs-6.1-x86_64.img
}
submenu 'Advanced options for Manjaro Linux' $menuentry_id_option 'gnulinux-advanced-6200ac2f-a28e-4da6-99f7-8c9c4ed48a19' {
menuentry 'Manjaro Linux (Kernel: 6.1.7-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.7-1-MANJARO x64-advanced-6200ac2f-a28e-4da6-99f7-8c9c4ed48a19' {
savedefault
load_video
set gfxpayload=auto
insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u 3f73e406400c4d108d2919133640601c
set root='cryptouuid/3f73e406400c4d108d2919133640601c'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/3f73e406400c4d108d2919133640601c' 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
else
search --no-floppy --fs-uuid --set=root 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
fi
linux /boot/vmlinuz-6.1-x86_64 root=UUID=6200ac2f-a28e-4da6-99f7-8c9c4ed48a19 rw cryptdevice=UUID=3f73e406-400c-4d10-8d29-19133640601c:luks-3f73e406-400c-4d10-8d29-19133640601c root=/dev/mapper/luks-3f73e406-400c-4d10-8d29-19133640601c cryptkey=rootfs:/crypto_keyfile.bin
initrd /boot/intel-ucode.img /boot/initramfs-6.1-x86_64.img
}
menuentry 'Manjaro Linux (Kernel: 6.1.7-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.7-1-MANJARO x64-fallback-6200ac2f-a28e-4da6-99f7-8c9c4ed48a19' {
load_video
set gfxpayload=auto
insmod gzio
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u 3f73e406400c4d108d2919133640601c
set root='cryptouuid/3f73e406400c4d108d2919133640601c'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/3f73e406400c4d108d2919133640601c' 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
else
search --no-floppy --fs-uuid --set=root 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
fi
linux /boot/vmlinuz-6.1-x86_64 root=UUID=6200ac2f-a28e-4da6-99f7-8c9c4ed48a19 rw cryptdevice=UUID=3f73e406-400c-4d10-8d29-19133640601c:luks-3f73e406-400c-4d10-8d29-19133640601c root=/dev/mapper/luks-3f73e406-400c-4d10-8d29-19133640601c cryptkey=rootfs:/crypto_keyfile.bin
initrd /boot/initramfs-6.1-x86_64-fallback.img
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
### 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/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/3f73e406400c4d108d2919133640601c' 6200ac2f-a28e-4da6-99f7-8c9c4ed48a19
linux16 /boot/memtest86+/memtest.bin
}
fi
### END /etc/grub.d/60_memtest86+ ###
blkid:
1. /dev/loop1: TYPE="squashfs"
2. /dev/sr0: BLOCK_SIZE="2048" UUID="2022-12-24-05-19-09-00" LABEL="MANJARO_KDEM_220" TYPE="iso9660" PTTYPE="dos"
3. /dev/loop2: TYPE="squashfs"
4. /dev/loop0: TYPE="squashfs"
5. /dev/sda2: UUID="3f73e406-400c-4d10-8d29-19133640601c" TYPE="crypto_LUKS" PARTLABEL="Linux data partition" PARTUUID="a7e27345-f6fe-4166-8ee0-e151942590b0"
6. /dev/sda1: UUID="BA4F-80CC" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="6b74f8b5-a971-4ed3-8c08-3a5754f77b0a"
7. /dev/loop3: TYPE="squashfs"