You are not logged in.

#1 2021-02-19 19:43:33

kmani314
Member
Registered: 2021-02-19
Posts: 13

[SOLVED] Failing to find root filesystem on new NVME encrypted install

Hello,
I followed the wiki instructions for encrypting my whole filesystem with cryptsetup, which all went smoothly until I rebooted. Note that I am not using grub, so I followed the instructions for using bootctl.

ERROR: device /dev/mapper/vg0-root not found. Skipping fsck.
mount: /new_root special device /dev/mapper/vg0-root does not exist.

When I'm dropped into the initramfs shell, the nvme devices do not appear when blkid is run, and I confirmed that they aren't present under /dev/ either, which seems weird. I'm able to mount them and everything in the live installer. My fstab is as follows:

# /dev/mapper/vg0-root LABEL=root
UUID=... / ext4 rw,relatime 0, 1
# /dev/nvme0n1p1
...

My crypttab, which I'm not sure is relevant here, is entirely commented out. My mkinitcpio.conf is identical to the one in the wiki (I installed lvm2 with pacstrap and added the hooks and regenerated the image). I added the relevant options cryptsetup=UUID=... in /boot/loader/entries/arch.conf, and I've made sure that the UUID refers to the partition with the luks container on it. I've also looked at /proc/cmdline, which doesn't have the options cryptsetup=... line but I'm not entirely sure if that means anything is wrong. I've read other forum posts about things breaking from time to time, so can anyone confirm this or is there something that I'm doing wrong?

Last edited by kmani314 (2021-02-19 23:39:20)

Offline

#2 2021-02-19 19:47:28

loqs
Member
Registered: 2014-03-06
Posts: 19,022

Re: [SOLVED] Failing to find root filesystem on new NVME encrypted install

If you use the fallback initrd the result the same?

Offline

#3 2021-02-19 19:57:22

kmani314
Member
Registered: 2021-02-19
Posts: 13

Re: [SOLVED] Failing to find root filesystem on new NVME encrypted install

I'm not sure how to, in the boot menu I don't have the option to. I assume it would do the same thing since this a fresh install.

Offline

#4 2021-02-19 20:05:59

loqs
Member
Registered: 2014-03-06
Posts: 19,022

Re: [SOLVED] Failing to find root filesystem on new NVME encrypted install

Kernel_parameters#systemd-boot change initramfs-linux.img to initramfs-fallback-linux.img.
The fallback initrd contains all block drivers rather than only those detected as needed for the root file-system.

If that does not work what kernel version worked on the installation media and what version is on the installed system?

Offline

#5 2021-02-19 20:22:30

kmani314
Member
Registered: 2021-02-19
Posts: 13

Re: [SOLVED] Failing to find root filesystem on new NVME encrypted install

Using initramfs-linux-fallback.img results in the same problem with the exact same error message. The versions of the installer and the installed system are both 5.10.11,

Offline

#6 2021-02-19 20:52:52

loqs
Member
Registered: 2014-03-06
Posts: 19,022

Re: [SOLVED] Failing to find root filesystem on new NVME encrypted install

The current linux package is 5.10.16.arch1-1 was the installation performed some time ago?  Is ucode installed?
Chroot in and please post the contents of /etc/mkinitcpio.conf and /boot/loader/entries/arch.conf see the tip box from pastebin to post from the console.
Using the fallback initrd when you are dropped to the rescue console can you mount a thumb drive and save the contents of dmesg to it?

Offline

#7 2021-02-19 22:06:39

kmani314
Member
Registered: 2021-02-19
Posts: 13

Re: [SOLVED] Failing to find root filesystem on new NVME encrypted install

Alright, here is /boot/loader/loader.conf:

#timeout 3
#console-mode keep
default arch
timeout 3

/boot/loader/entries/arch.conf

title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options cryptdevice=UUID=d50287fe-80cf-494e-aebc-d0672ba96751:vg0 root=/dev/mapper/vg0-root resume=/dev/mapper/vg0-swap quiet rw

/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=(piix ide_disk reiserfs)
MODULES=(ext4)

# 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=()

# 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 block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS=(base udev autodetect modconf block lvm2 encrypt resume filesystems keyboard 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=()

/etc/fstab

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/vg0-root LABEL=root
UUID=5403d379-6cc6-400b-8e0b-33f66c57cfe8	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p1 LABEL=EFI
UUID=14EF-1D06      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/mapper/vg0-swap
UUID=7950c1cc-61f0-4c9d-bf29-d5329d091878	none      	swap      	defaults  	0 0

I'll post the dmesg output soon. Thanks!
Edit: Also, I've tried putting lvm2 after encrypt and it didn't change anything. Is it possible that I have to use sd-encrypt and sd-lvm2?

Last edited by kmani314 (2021-02-19 22:10:23)

Offline

#8 2021-02-19 22:15:28

loqs
Member
Registered: 2014-03-06
Posts: 19,022

Re: [SOLVED] Failing to find root filesystem on new NVME encrypted install

Changing to the systemd based hooks probably will not help if the cause is the NVME device not being detected by the kernel.

Offline

#9 2021-02-19 22:29:11

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,368

Re: [SOLVED] Failing to find root filesystem on new NVME encrypted install

Is the drive set to AHCI mode in firmware ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#10 2021-02-19 23:37:35

kmani314
Member
Registered: 2021-02-19
Posts: 13

Re: [SOLVED] Failing to find root filesystem on new NVME encrypted install

Apparently it was not. The default storage mode for my dell xps was RAID. I set it to AHCI/NVME and everything works. Thanks!

Offline

Board footer

Powered by FluxBB