You are not logged in.

#1 2021-10-12 14:08:52

RunAndTumble
Member
Registered: 2021-10-12
Posts: 3

Root partition not found when booting in encrypted installation

Hi folks,

I decided to follow the Wiki and use LVM on LUKS for my work machine. Installation didn't cause any serious problems but I for some reason can't finish the boot process, it gets back to the emergency shell, no passphrase asked.
I did try some other guides other than Wiki and that helped to fix a few issues with UUID etc but I clearly don't see what I miss here and I'm at my wits' end.
I've tried some advices from similar topics, in particular, mounting the partition from the shell manually but it says that "device does not exist or access denied".


lsblk -f: https://termbin.com/a0se

fstab: https://termbin.com/fn8b

mkinitcpio.conf: https://termbin.com/lnk1

grub.cfg: https://termbin.com/6x60

default grub: https://termbin.com/n6ly

Offline

#2 2021-10-12 14:47:56

Ammako
Member
Registered: 2021-07-16
Posts: 266

Re: Root partition not found when booting in encrypted installation

linux	/vmlinuz-linux root=/dev/mapper/work-root rw cryptdevice=UUID=5b3608d3-a73e-4a5f-8553-a514f99a5fc3:cryptlvm root=/dev/work/root loglevel=3 quiet splash

"/dev/mapper/work-root" and "/dev/work/root" should be equivalent, as far as I know, but is there a reason why "root" is being defined twice, as something different each time? I'm not sure where the first one comes from.

Edit: Hmm, that's probably not the issue. Mine has it twice as well, but it uses UUID-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx instead of device name. I'm not sure yet where that first declaration comes from but you might benefit from using UUIDs instead of device names?

Also, you're running unencrypted boot, so you don't need GRUB_ENABLE_CRYPTODISK=y, but I'm not sure if that might cause issues or not. At what point is it failing? It is grub that's failing, or initramfs?

Last edited by Ammako (2021-10-12 15:13:22)

Offline

#3 2021-10-13 08:56:11

RunAndTumble
Member
Registered: 2021-10-12
Posts: 3

Re: Root partition not found when booting in encrypted installation

benefit from using UUIDs instead of device names

How should it look in this case? Plus, as you mention there are two definitions of the root partition, I have no idea where the first one comes from as well and I'd rather not edit such configs manually.

Also, you're running unencrypted boot, so you don't need GRUB_ENABLE_CRYPTODISK=y,

I saw it being used in a few guides, that should not hurt as far as I understand but it didn't work without it as well.

At what point is it failing? It is grub that's failing, or initramfs?

I guess it's the latter judging by the message but I'm not that proficient at this part of Linux so you should guide me here.
I get this exact message after the GRUB stage.

ERROR: device '/dev/work/root' not found. Skipping fsck.
mount: /new_root: special device /dev/work/root does not exist.

And it throws me out to the emergency shell.

Offline

#4 2021-10-13 10:20:41

Ammako
Member
Registered: 2021-07-16
Posts: 266

Re: Root partition not found when booting in encrypted installation

I don't use lvm, but did you install lvm2 package before building your initramfs? That's the only reason I might see why the device might not exist at this point (though it would ask for luks encryption passphrase first, but without lvm2 it wouldn't know how to open your lvm partition.)

I don't know why yours uses device name in the first root= parameter instead of UUID, I suspect it probably doesn't matter though because with lvm there should be no risk of that device name changing unexpectedly.

I'll have to play around in a VM later to see if I can replicate this, you're on an NVMe SSD though and that might make things different. I assume your drive is probably already set to AHCI mode at least, otherwise you wouldn't have been able to see the drive to install to it at all in the first place (judging by other threads on NVMe drives.)

I recommend you remove "loglevel=3 quiet", let it show absolutely everything. Then you might have a better chance of seeing exactly what's going wrong.

Last edited by Ammako (2021-10-13 10:35:05)

Offline

#5 2021-10-16 13:24:35

Ammako
Member
Registered: 2021-07-16
Posts: 266

Re: Root partition not found when booting in encrypted installation

Okay, so actually grub-mkconfig will automatically detect and generate the root= parameter, that's where the second (first) root= comes from. You don't actually need to manually specify it in /etc/default/grub

What doesn't make sense to me is that yours is using the old format (root=/dev/xxx) despite GRUB_DISABLE_LINUX_UUID=true not being set in your config. It should be using UUID. Do you have anything in /etc/grub.d that might be affecting things?

RunAndTumble wrote:

I did try some other guides other than Wiki and that helped to fix a few issues with UUID etc but I clearly don't see what I miss here and I'm at my wits' end.

What other guides? If those had you make unknown changes that aren't mentioned on the wiki then it's hard to know what your setup is like exactly. I would recommend against following any other guides unless you know what you're doing and know what everything does.

Offline

#6 2021-10-18 07:34:22

RunAndTumble
Member
Registered: 2021-10-12
Posts: 3

Re: Root partition not found when booting in encrypted installation

Sorry for the late reply, my life is some sort of a ****show at the moment.

No, I didn't add anything to /etc/grub.d, everything is default in a sense.
I tried some options but the very last time I followed this guy almost to the letter (I didn't install that many extra packages). He does as Wiki says as far as I can see, but with more details.

Offline

#7 2021-10-18 18:45:35

tim3dman
Member
From: Melbourne, Australia
Registered: 2018-02-15
Posts: 21

Re: Root partition not found when booting in encrypted installation

Hey mate how's it going? Have you got it sorted? If not I might make a few suggestions. Firstly following guides off YouTube or other random blogs is not supported, so you might not get much help (that being said members are usually helpful). Second, What is your use case? You say your work machine, does that mean dual booting Windows (if not why use grub)? Next, LUKS is fairly straight forward but do you really need LVM? Not to say that its difficult, I have LVM on LUKS on my system and it's great but it makes the install a lot more challenging. My suggestion would be to start again with a straight forward vanilla install, strictly following the guide and using the wiki whenever suggested. It shouldn't take more than an hour or so. Search the forums whenever you get stuck or unsure and you will have a usable system that you understand. Then move up to LUKS encryption and LVM when you're more confident. I checked out your configs but I can't see any glaring errors and I have similar system except for systemd-boot not grub. Anyway I hope that you get it solved soon.

Offline

#8 2021-10-18 22:11:40

Ammako
Member
Registered: 2021-07-16
Posts: 266

Re: Root partition not found when booting in encrypted installation

I would try doing luks without lvm first, to see if lvm is the issue. I don't really know why things wouldn't be working, this is about all the help I can give here.

Otherwise I'd try with a non-NVMe drive, in case it might be some kind of NVMe fuckery. Others would be more knowledgeable when it comes to those.

You could probably also copy the command history from your installation onto another drive after you're done installing, so you could paste it here and we might be able to see if something's being done wrong. I'm not sure where that command history is being kept though, archiso uses zsh as far as I know, and I don't know where it keeps its command history.

Offline

#9 2021-10-18 22:33:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,743
Website

Re: Root partition not found when booting in encrypted installation

In the emergency shell, can you see the logical volumes?

See the note about /etc/mkinitcpio.conf https://wiki.archlinux.org/title/LVM#LV … o_not_work


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2021-10-18 23:52:23

cloverskull
Member
Registered: 2018-09-30
Posts: 83

Re: Root partition not found when booting in encrypted installation

I'm almost certain I've seen this precise behavior when forgetting to install the lvm2 package inside the arch chroot. Can you try chrooting into your installation once again from your USB boot media and installing that package?

Offline

#11 2021-10-30 13:06:54

Ammako
Member
Registered: 2021-07-16
Posts: 266

Re: Root partition not found when booting in encrypted installation

If this computer uses Intel VMD, you might need to add vmd to your modules in mkinitcpio.

Offline

Board footer

Powered by FluxBB