You are not logged in.

#1 2019-03-24 02:00:37

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

[SOLVED]Root volume not found booting in new encrypted installation

Whenever I try to boot up after my fresh install, it says:

ERROR: device '/dev/mapper/volgroup-root' not found. Skipping fsck.
mount: /new_root: no filesystem type specified.

Then it drops me into the emergency shell. It is an encrypted lvm on luks installation. I follwed the wiki's instructions for encrypting a whole system. Sorry, I'm on my phone and I couldn't figure out how to put the output in a code box. I looked over the forum, and I could find the answer to my problem. Thanks in advance.

Last edited by arch_noob18 (2019-04-02 16:54:08)

Offline

#2 2019-03-24 10:15:32

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,843
Website

Re: [SOLVED]Root volume not found booting in new encrypted installation

Please edit your topic title to actually describe the problem you are facing.

From a LiveCD, use a pastebin to upload your fstab, your mkinitcpio.conf, your bootloader config, and the output of 'lsblk -f'. Then post these here.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2019-03-24 23:44:45

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

Sorry for being such a noob, but I've never used that berore. How do I use a "pastebin"?

Offline

#4 2019-03-24 23:47:10

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED]Root volume not found booting in new encrypted installation

Offline

#5 2019-03-25 02:16:45

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

Offline

#6 2019-03-25 02:29:01

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

Just saw mkinitcpio.conf. I swear I had put encrypt and lvm2 in there before. I fixed it and regenerated intramfs but still it can't boot right.

Offline

#7 2019-03-25 02:39:05

loqs
Member
Registered: 2014-03-06
Posts: 17,316

Re: [SOLVED]Root volume not found booting in new encrypted installation

cryptdevice=UUID=/dev/sda2:cryptlvm root=/dev/volgroup/root quiet

If you change the boot parameters to use the partitions UUID instead of /dev/sda2 does that work?

Offline

#8 2019-03-25 07:39:33

seth
Member
Registered: 2012-09-03
Posts: 50,983

Re: [SOLVED]Root volume not found booting in new encrypted installation

Also notice that the hook order matters, see https://wiki.archlinux.org/index.php/Dm … initcpio_2

Offline

#9 2019-03-25 14:29:39

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

I did put encrypt and lvm2 between block and filesystem. Also, substituting the UUID unfortunately did nothing...

Offline

#10 2019-03-25 14:34:48

loqs
Member
Registered: 2014-03-06
Posts: 17,316

Re: [SOLVED]Root volume not found booting in new encrypted installation

I missed root=/dev/volgroup/root should be root=/dev/mapper/root

Offline

#11 2019-03-25 14:41:29

frostschutz
Member
Registered: 2013-11-15
Posts: 1,417

Re: [SOLVED]Root volume not found booting in new encrypted installation

arch_noob18 wrote:

Then it drops me into the emergency shell.

did it ask for passphrase?

some things to test within that shell:

cat /proc/cmdline
cat /proc/partitions
ls /dev/mapper

and doing things manually

cryptsetup luksOpen /dev/sda2 cryptlvm
lvm vgchange -a y
mount /dev/mapper/volgroup-root /new_root
exit

if you get command not found for cryptsetup or lvm then you are booting the wrong initramfs ... or forgot to rebuild

otherwise check uuids for typos ?

lvm2 hook fails if use_lvmetad is set to 0 in lvm.conf, `lvm config | grep use_lvmetad` to verify

Offline

#12 2019-03-26 19:14:14

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

It does not ask for a key, no. Changing it from /dev/volgroup/root to /dev/mapper/volgroup-root did nothing. Except say that not found. I mount root using /dev/volgroup/root, btw. Also, I forgot to mention I don't have a swap partition. Not sure if that matters, but you probably know I don't have one from the files. Cat /proc/cmdline says not found. The other cat and the ls seemed normal. Cryptsetup led to a screen that says computer login.

Offline

#13 2019-03-28 12:47:08

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

Any ideas?

Offline

#14 2019-03-28 13:15:21

Aromatix
Member
Registered: 2019-03-25
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

Can you boot into GRUB and then try to set up the boot manually?
I just followed the LVM encrypted setup as well and what worked for me was:

set root=(hd1,gpt6)
linux /vmlinuz-linux rw cryptdevice=/dev/sda7:main root=/dev/mapper/main-root
intrd /initramfs-linux.img
boot 

Note that it is hd1 in this case, because I booted into GRUB from a USB stick at hd0. And it is gpt6 because the boot partition was the 6th partition so you would need to change that to your needs. ls in GRUB might be helpful.


I am here to learn. Feel free to message me about anything that might be interesting to me! Thanks wink

Offline

#15 2019-03-28 13:17:52

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED]Root volume not found booting in new encrypted installation

arch_noob18 wrote:

Any ideas?

Please don't do that.

Offline

#16 2019-03-28 14:41:08

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

Aromatix wrote:

Can you boot into GRUB and then try to set up the boot manually?
I just followed the LVM encrypted setup as well and what worked for me was:

set root=(hd1,gpt6)
linux /vmlinuz-linux rw cryptdevice=/dev/sda7:main root=/dev/mapper/main-root
intrd /initramfs-linux.img
boot 

Note that it is hd1 in this case, because I booted into GRUB from a USB stick at hd0. And it is gpt6 because the boot partition was the 6th partition so you would need to change that to your needs. ls in GRUB might be helpful.

The linux command was not found; to get the first command to work I had to delete the parentheses.

Offline

#17 2019-03-28 15:16:44

loqs
Member
Registered: 2014-03-06
Posts: 17,316

Re: [SOLVED]Root volume not found booting in new encrypted installation

arch_noob18 wrote:

It does not ask for a key, no. Changing it from /dev/volgroup/root to /dev/mapper/volgroup-root did nothing. Except say that not found. I mount root using /dev/volgroup/root, btw.

How do you mount to /dev/volgroup/root?  I do not understand.

arch_noob18 wrote:

The other cat and the ls seemed normal.

Please post them.

arch_noob18 wrote:

Cryptsetup led to a screen that says computer login.

What was the exact output of:

cryptsetup luksOpen /dev/sda2 cryptlvm

Last edited by loqs (2019-03-28 15:17:17)

Offline

#18 2019-03-28 15:33:48

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

It says to boot that way in the wiki. Look:
https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS
https://ibb.co/82PRSFN

Mod edit: replaced oversized image with url. Please read the Code of Conduct and only post thumbnails.

Last edited by WorMzy (2019-03-28 15:40:02)

Offline

#19 2019-03-28 15:36:24

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

Cryptsetup asks for a password, then I put it in; after that I'm returned to rootfs.

Offline

#20 2019-03-28 15:37:32

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,973
Website

Re: [SOLVED]Root volume not found booting in new encrypted installation

arch_noob18 wrote:

Just saw mkinitcpio.conf. I swear I had put encrypt and lvm2 in there before. I fixed it and regenerated intramfs but still it can't boot right.

Where did you put it? Show us.

arch_noob18 wrote:

It says to boot that way in the wiki. Look:

You are in an emergency shell.
@Aromatix requested you to enter the commands within Grub2's CLI, not in the emergency shell.
Also please only post thumbnails and link to the high-resolution images.

Last edited by schard (2019-03-28 15:39:13)


macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

#21 2019-03-28 15:48:46

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

I put it in hooks between block and filesystem. How do I go into GRUB2's CLI?

Https://bpaste.net/show/03e0f8cf1049

Last edited by arch_noob18 (2019-03-28 16:01:11)

Offline

#22 2019-03-28 16:00:25

Aromatix
Member
Registered: 2019-03-25
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

arch_noob18 wrote:

How do I go into GRUB2's CLI?

You can find the latest Version here.
So a way to get into GRUB2 CLI would be to install GRUB2 on an USB stick (there are many tutorials for that online). And then select this stick as a boot medium.


I am here to learn. Feel free to message me about anything that might be interesting to me! Thanks wink

Offline

#23 2019-03-28 20:10:48

loqs
Member
Registered: 2014-03-06
Posts: 17,316

Re: [SOLVED]Root volume not found booting in new encrypted installation

arch_noob18 wrote:

Cryptsetup asks for a password, then I put it in; after that I'm returned to rootfs.

If you then continue with the rest of frostschutz's manual instructions:

lvm vgchange -a y
mount /dev/mapper/volgroup-root /new_root
exit

What is the result?

Offline

#24 2019-03-28 20:20:33

JeanLucJ
Member
Registered: 2019-03-08
Posts: 59

Re: [SOLVED]Root volume not found booting in new encrypted installation

Aromatix wrote:
arch_noob18 wrote:

How do I go into GRUB2's CLI?

You can find the latest Version here.
So a way to get into GRUB2 CLI would be to install GRUB2 on an USB stick (there are many tutorials for that online). And then select this stick as a boot medium.

Hello,

Before updating anything, if I were you, I would answer the different questions asked to you, for example : What did you do to update initramfs? (modified file content and location, console commands and ouput)

You should also post again your fstab, your mkinitcpio.conf, your bootloader config, and the output of 'lsblk -f' to show the updated version, and specify what file exactly you are providing (name, location)

Why : I have the same setup as you with Arch, and it works out of the box. It just requires to do exactly what is required. PEBKC is a strong candidate in your case smile
I spotted at least 4 potential errors :
1/ You missed some hooks in mkinitcpio.conf. You say you corrected them, but you may have not done it properly
2/ Your kernel parameters were (are?) cryptdevice=UUID=/dev/sda2:cryptlvm : it should be either cryptdevice=/dev/sda2:cryptlvm or cryptdevice=UUID=[youruuid]:cryptlvm (and a typo in UUID comes easily). You say you tried UUID but did not provide the modified file
3/ I don't see anything related to initramfs-linux.img in your grub entry. What file exactly (name, location) did you put in pastebin? How did you generate your grub entries?
4/ #GRUB_ENABLE_CRYPTODISK=y in you "grub". I believe that should be uncommented to generate correct grub entries. Provide /boot/grub/grub.cfg to see what your system is actually trying to run...

Above all, be very explicit : always describe what you do (terminal commands, results, locations of the files you provide, and so on).

I made a custom.cfg for testing purpose, that works perfectly.
You can try it (adapting it) :

menuentry 'ArchLinux' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  b49589d5-56b4-4671-ac10-76d129ff3944
	else
	  search --no-floppy --fs-uuid --set=root b49589d5-56b4-4671-ac10-76d129ff3944
	fi
	echo	'Chargement de Linux linux…'
	linux	/vmlinuz-linux cryptdevice=/dev/sda5:cryptlvm root=/dev/mapper/Fixe--JeanLuc--vg-Archroot rw  quiet
	echo	'Chargement du disque mémoire initial…'
	initrd	/initramfs-linux.img
}

Last edited by JeanLucJ (2019-03-28 20:30:10)

Offline

#25 2019-04-02 03:03:01

arch_noob18
Member
Registered: 2019-03-24
Posts: 13

Re: [SOLVED]Root volume not found booting in new encrypted installation

I fixed it! Thank you JeanLucJ! Also to everyone else, thank you.What I did is Reinstall, purely for ocd reasons, and uncomment grub enable cryptodisk. Also I entered cryptdevice=/dev/sda2:cryptlvm in /etc/default/grub instead of what I had before.

Offline

Board footer

Powered by FluxBB