You are not logged in.

#1 2015-11-06 15:04:01

zelec
Member
From: Canada
Registered: 2014-11-18
Posts: 9
Website

Grub Mounting an Encrypted LVM Filesystem Fails

I'm doing a fresh install of Arch on my laptop and im trying to use a LVM on LUKS install. but when I reboot grub says


:: running early hook [udev]
starting version 227
:: running early hook [lvm2]
:: running hook [udev]
:: Triggering uevents...
:: running hook [encrypt]

A password is required to access the Crypt-RootVol volume:
Enter passphrase for /dev/sda2:
:: preforming fsck on '/dev/mapper/Crypt-RootVol'
:: mounting '/dev/mapper/Crypt-RootVol'
mount: unknown filesystem type 'LVM2_member'
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs /]#

Can anyone possibly tell me what I have done wrong?


There Is A Method To My Madness And Madness to My Method.

Offline

#2 2015-11-06 15:11:37

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

Re: Grub Mounting an Encrypted LVM Filesystem Fails

What does your mkinitcpio.conf look like? You probably need the encrypt hook first, and lvm hook afterwards.

Online

#3 2015-11-06 15:19:18

zelec
Member
From: Canada
Registered: 2014-11-18
Posts: 9
Website

Re: Grub Mounting an Encrypted LVM Filesystem Fails

My mkinitcpio.conf hooks line is as follows

HOOKS="base udev autodetect modconf encrypt lvm2 block filesystem keyboard fsck"


There Is A Method To My Madness And Madness to My Method.

Offline

#4 2015-11-06 15:28:08

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

Re: Grub Mounting an Encrypted LVM Filesystem Fails

It shouldn't be trying to mount /dev/mapper/Crypt-RootVol if that's LVM, it should go for /dev/mapper/vg-lv instead.

So why is it trying to mount the cryptrootvol? Wrong device UUID in /etc/fstab? Wrong kernel parameter, see 'cat /proc/cmdline' in that shell?

Online

#5 2015-11-06 15:34:45

zelec
Member
From: Canada
Registered: 2014-11-18
Posts: 9
Website

Re: Grub Mounting an Encrypted LVM Filesystem Fails

my cmdline file contains


BOOT_IMAGE=/vmlinuz-linux root=UUID=fdd1d683-a20d-403f-9bcf-c17014089b12 rw cryptdevice=UUID=b864e3ab-f8de-4066-995d-9142132db8c3:Crypt-RootVol root=/dev/mapper/Crypt-RootVol

EDIT:
The first root UUID is the same as the Crypt-RootVol UUID, and the cryptdevice UUID is the same as /dev/sda2 (The encrypted luks partition)

Last edited by zelec (2015-11-06 15:55:39)


There Is A Method To My Madness And Madness to My Method.

Offline

#6 2015-11-07 20:54:40

kvonlinee
Member
Registered: 2015-02-04
Posts: 27

Re: Grub Mounting an Encrypted LVM Filesystem Fails

/boot partition need to be un-encryption

Offline

#7 2015-11-07 21:10:40

zelec
Member
From: Canada
Registered: 2014-11-18
Posts: 9
Website

Re: Grub Mounting an Encrypted LVM Filesystem Fails

/boot partition need to be un-encryption

The issue isn't that the computer can't boot into grub, the issue is that the kernel couldn't mount the root filesystem on boot.

Although since then I have fixed it, I have no clue if it's just a fluke or not since I have wiped my hard-drive then did a full reinstall. the only difference between the two is that the root= line points to the UUID of the LVM partition that's the root. (instead of root=/dev/mapper/Crypt-RootVol, the line now says root=UUID=8b83ab4d-1f6c-4f54-bfca-52cfcd05c023)


There Is A Method To My Madness And Madness to My Method.

Offline

Board footer

Powered by FluxBB