You are not logged in.

#1 2021-07-09 14:35:44

hollow_em
Member
Registered: 2021-07-09
Posts: 4

[SOLVED]Root device not found while booting new encrypted installation

Hello,

I tried installing arch with LVM on LUKS, however while trying to boot I get the following error.

ERROR: Device '/dev/mapper/MyVolGroup-root' not found. Skipping fsck.

It then drops me into an emergency shell.

The output of cat /proc/cmdline is the following.

BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/MyVolGroup-root rw cryptdevice=UUID=(device uuid):cryptlvm:allow-discards loglevel=3 quiet resume=/dev/mapper/MyVolGroup-swap

My hooks in /etc/mkinitcpio.conf are as follow.

HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck)

my /etc/default/grub contains the following.

GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=(device uuid):cryptlvm:allow-discards loglevel=3 quiet resume=/dev/mapper/MyVolGroup-swap"

I tried doing it manually with the following commands, this worked.

cryptsetup luksOpen /dev/nvme0n1p2 cryptlvm 
lvm vgchange -a y 
mount /dev/mapper/MyVolGroup-root /new_root
exit

Last edited by hollow_em (2021-07-10 09:00:22)

Offline

#2 2021-07-09 15:08:33

kermit63
Member
Registered: 2018-07-04
Posts: 309

Re: [SOLVED]Root device not found while booting new encrypted installation

Did you include lvm in the "GRUB_PRELOAD_MODULES" line in /etc/default/grub?


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#3 2021-07-09 15:18:16

hollow_em
Member
Registered: 2021-07-09
Posts: 4

Re: [SOLVED]Root device not found while booting new encrypted installation

No I didn't, after adding it and running

grub-mkconfig -o /boot/grub/grub.cfg

I still get the same error.

Offline

#4 2021-07-10 02:48:12

kermit63
Member
Registered: 2018-07-04
Posts: 309

Re: [SOLVED]Root device not found while booting new encrypted installation

is /boot inside a luks2 encrypted partition? If so, GRUB can't handle luks2 encryption yet.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#5 2021-07-10 07:42:08

hollow_em
Member
Registered: 2021-07-09
Posts: 4

Re: [SOLVED]Root device not found while booting new encrypted installation

No /boot is unencrypted on my /dev/nvme0n1p1 partition. my root /home and swap are on /dev/nvme0n1p2.

Offline

#6 2021-07-10 08:01:15

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: [SOLVED]Root device not found while booting new encrypted installation

hmm. I used the systemd initramfs, so what I had written was not applicable here.

Last edited by progandy (2021-07-10 08:03:08)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2021-07-10 08:55:19

hollow_em
Member
Registered: 2021-07-09
Posts: 4

Re: [SOLVED]Root device not found while booting new encrypted installation

According to this https://gist.github.com/kylemanna/cde14 … ac16b85458 nvme won't work on grub. I solved the issue by installing systemd-boot instead.

Offline

#8 2021-07-10 17:22:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,088

Re: [SOLVED]Root device not found while booting new encrypted installation

That has not been true for like 5 years at least. But systemd-boot's configuration is simpler in  its limited scope so glad you've found a working solution

Last edited by V1del (2021-07-10 17:29:37)

Offline

Board footer

Powered by FluxBB