You are not logged in.

#1 2024-11-12 09:05:41

Alphabeit
Member
Registered: 2021-08-08
Posts: 19

[SOLVED] Grub not found decrypted lvm/root partition

Hallo anyone,

actually, I try to install Arch again. This time with an LVM inside of an encrypted LUKS1 partition.

The good thing, GRUB is booting and ask the passwd to decrypt the LUKS partition. The problem, the following root partition will not found.

Encrypted is an LVM Volume Group, that's contains two Logical Volumes. The root and the swap. They called by the name /dev/MyVolGroup/root and /dev/MyVolGroup/swap.

Currently, if I start the system, grub is booting, found the encrypted partition and want to decrypt it. After, I enter the passwd, it's begins to search for the root partition and will break up after 20/30 seconds. The system haven't found it. Instead I have a limited access to the initramfs. So, I looked in the folder /dev, /dev/mapper and /dev/disk/by-uuid and see no one of the LVM Logical Volumes.

My install process is made with Ansible Playbooks. So its much easier to observe what's happens and what is written in the files. I also controlled the files after that's, the config is true:

mkinitcpio.conf

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

/etc/default/grub

GRUB_ENABLE_CRYPTODISK=y
GRUB_CMDLINE_LINUX="cryptdevice=UUID=c1624348-79ed-4d1c-9c10-4dcf6fa00fe4:crypt root=/dev/MyVolGroup/root"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3"
GRUB_DISABLE_OS_PROBER=false

I also updated the kernel modules and the grub config after changes.

mkinitcpio -p linux-zen
grub-mkconfig -o /boot/grub/grub.cfg

Have anyone an idea?


Best regards
Alphabeit

Last edited by Alphabeit (2024-11-12 18:53:53)


Just it's works!

Offline

#2 2024-11-12 09:25:56

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,079

Re: [SOLVED] Grub not found decrypted lvm/root partition

Hold on, grub finds the encrypted partition and asks to decrypt it or the initramfs does? Two completely different steps. Since you said you have access to the initramfs, I'm going to assume it's there, so where is the lvm2 hook?

Last edited by Scimmia (2024-11-12 09:26:20)

Offline

#3 2024-11-12 10:43:07

Alphabeit
Member
Registered: 2021-08-08
Posts: 19

Re: [SOLVED] Grub not found decrypted lvm/root partition

Which lvm2 hook do you mean?

Grubs starts and decrypt, but I not ending in a grub or a grub rescue shell. Instead, I'm ending in a rootfs shell, with a small version of an root-structure and a access of a /dev folder.

I believe that's must be the initramfs? Is this not starting after and through grub?


Just it's works!

Offline

#4 2024-11-12 10:50:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,079

Offline

#5 2024-11-12 12:03:46

Alphabeit
Member
Registered: 2021-08-08
Posts: 19

Re: [SOLVED] Grub not found decrypted lvm/root partition

So, I am right! After the grub process, I was stranded in the initramfs.


Ahh, ohh... This lvm2 hook... roll I try it in the evening at home. I'll come back later.


Just it's works!

Offline

#6 2024-11-12 18:53:33

Alphabeit
Member
Registered: 2021-08-08
Posts: 19

Re: [SOLVED] Grub not found decrypted lvm/root partition

Okay, problem ist solved. I have missing the parameter lvm2 in the kernel modules under /etc/mkinitcpio.conf.


Just it's works!

Offline

Board footer

Powered by FluxBB