You are not logged in.

#1 2022-10-25 22:27:25

ZetaRevan
Member
Registered: 2022-10-25
Posts: 14

[SOLVED] Disk encryption issues

Hello guys,
     I need some help on a recent Arch install.  This is my first time doing LVM on LUKS and I can't seem to get GRUB to run cryptsetup to decrypt my sda2 partition.  It times out waiting for my LVM maps, which aren't visible since the main /dev/sda2 partition hasn't been opened.   I followed the offical wiki page for LVM on LUKS & used the systemd / sd-encrypt hooks along with plugging in `rd.luks.name=device-UUID=SFcrypt root=/dev/StarForge/root` in my grub.cfg file.  Any advice would be super helpful!

Z

Last edited by ZetaRevan (2022-10-27 00:56:08)

Offline

#2 2022-10-25 22:35:00

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Disk encryption issues

Post the output of your HOOKS line in /etc/mkinitcpio.conf


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-10-25 22:37:49

ZetaRevan
Member
Registered: 2022-10-25
Posts: 14

Re: [SOLVED] Disk encryption issues

HOOKS=(base systemd autodetect keyboard modconf block sd-encrypt lvm2 filesystems fsck)

Last edited by ZetaRevan (2022-10-25 22:38:35)

Offline

#4 2022-10-26 03:22:12

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: [SOLVED] Disk encryption issues

What's in grub.cfg?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2022-10-26 06:03:31

astralc
Member
Registered: 2022-09-17
Posts: 98

Re: [SOLVED] Disk encryption issues

did you substitute device-UUID to the actual luks UUID?

Offline

#6 2022-10-26 07:03:41

ZetaRevan
Member
Registered: 2022-10-25
Posts: 14

Re: [SOLVED] Disk encryption issues

cfr wrote:

What's in grub.cfg?

Standard grub config file, has root=/dev/mapper/Starforge-root on the menu entries.

astralc wrote:

did you substitute device-UUID to the actual luks UUID?

Yes.  I've tried having that line in the 40-custom section & also right above the menu entries.  Still get the same result.

Ugh...I was starting to think I had the crypt packages, but now I have to confirm. I just realized that I run cryptsetup to open the partiion when booted from the USB, but did I actually make sure the package was installed on my drive?  More digging.

Note, I have a current build on another laptop with LUKS on LVM that works fine.

Last edited by ZetaRevan (2022-10-26 07:31:14)

Offline

#7 2022-10-26 07:28:48

ZetaRevan
Member
Registered: 2022-10-25
Posts: 14

Re: [SOLVED] Disk encryption issues

Well it was already installed so that's not the issue.

grub.cfg
The commented rd.luks line has an uncommented version below it in the custom section.

20221026-022124.jpg

Last edited by ZetaRevan (2022-10-26 07:32:36)

Offline

#8 2022-10-26 13:58:07

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: [SOLVED] Disk encryption issues

This doesn't seem to appear (uncommented) in your grub.cfg:

rd.luks.name=device-UUID=SFcrypt 

How are your partitions organised?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2022-10-26 23:37:02

ZetaRevan
Member
Registered: 2022-10-25
Posts: 14

Re: [SOLVED] Disk encryption issues

This doesn't seem to appear (uncommented) in your grub.cfg:

Yeah that's because I couldn't get enough on the screen, but I have that same line uncommented inside the 40_custom section.  It doesn't decrypt being put in either location.

How are your partitions organised?

/dev/sda1 mounts to /boot (unencrypted)

/dev/sda2 is encrypted, so it should map to /dev/mapper/SFcrypt after being opened for the LVM setup

PV = /dev/mapper/SFcrypt
VG = StarForge
LVs = root, home (set up as xfs on both)

No swap partition, I plan to use zswap.

Last edited by ZetaRevan (2022-10-27 00:12:33)

Offline

#10 2022-10-27 00:18:56

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,156

Re: [SOLVED] Disk encryption issues

If those are the menu entries you're trying to boot, the rd.luks isn't there. You can check this by choosing to edit the command line when you boot and seeing if it is there. If it isn't, you can add it and boot, though the addition won't be permanent.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2022-10-27 00:45:37

ZetaRevan
Member
Registered: 2022-10-25
Posts: 14

Re: [SOLVED] Disk encryption issues

cfr wrote:

If those are the menu entries you're trying to boot, the rd.luks isn't there. You can check this by choosing to edit the command line when you boot and seeing if it is there. If it isn't, you can add it and boot, though the addition won't be permanent.

huh..I don't remember having to add it inline on my LUKS on LVM build, and I don't have it on hand to check, but that did the trick. I removed the separate lines & just added the rd.luks inline before the root= & it worked.  Thanks for the guidance!

Offline

Board footer

Powered by FluxBB