You are not logged in.

#1 2021-03-16 09:15:22

desreverton
Member
From: UK
Registered: 2021-03-16
Posts: 3

Trouble booting after crypt lvm2 install

I was about to post the question below, but typically, whilst writing the question and adding the detail required to request help, I've found and resolved the problem. I'm a new forum user, so I hope it's okay to do this, but I though it would be useful to post my question anyway along with the solution, just in case anyone this helps anyone in the future when searching the forums.

Background info: I'm triple booting on a MacBook pro (Arch, MacOS & Win10). Fortunately my MacBook Pro is an Mid 2015 model that works really well with Linux. I'm new to Arch (used Manjaro previous, but a long time Linux user.

I've performed an installation, using LVM and luks to encrypt my root partition my partition layout is as follows

/dev/sda1 efi, fat 200MB (for MacOS)
/dev/sda2 MacOS, encrypted APFS, 116GB
/dev/sda3 efi, fat, 500MB (for Win10 & Arch)
/dev/sda4 win10, ntfs, 116GB
/dev/sda5 /boot, etx4, 500MB
/dev/sda6 /, lvm 231GB

The system boots and the initial ramdisk loads, then I'm prompted to enter my luks password. After this all I see is:

/dev/mapper/volgroup0-lv_root: clean, 102866/15171584 files, 6063942/60657664 blocks

..and then nothing, it just hangs there.

Key changes to system files:

* Added 'encrypt lvm2' to HOOKS in /etc/mkinitcpio.conf
* Uncommented GRUB_ENABLE_CRYPTODISK=Y in /etc/default/grub
* Added 'cryptdevice=/dev/sda6:volgroup0:allow-discards' to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub

Commands used:

mkinitcpio -p linux
pacman -S grub efibootmgr dosfstools os-prober mtools
grub-install --targex86_64-efi --bootloader-id=grub_uefi --recheck
grub-mkconfig -o /boot/grub/grub.cfg

I was about to add the lines from my /etc/fstab to this post, and that's when it hit me, I run genfstab during the install process without having /boot mounted, so fstab only contained the line required for my root volume. I added /boot to fstab (using genfstab again), and I now have a working system.

Last edited by desreverton (2021-03-16 18:28:53)

Offline

#2 2021-03-16 17:21:19

desreverton
Member
From: UK
Registered: 2021-03-16
Posts: 3

Re: Trouble booting after crypt lvm2 install

So the weirdest thing happened following the above post. I left the system sat at the logon prompt, and have only just got round to attempting to progress working on refining my install. When I attempted to logon, I found the system had locked up, so I power cycled it. Following reboot, I'm back to square one, sat at this message after unlocking the encrypted partition.

/dev/mapper/volgroup0-lv_root: clean, 102866/15171584 files, 6063942/60657664 blocks

Fired up the installation media, checked the /etc/fstab, and the /boot partition was still listed, and I can't figure out what's going on. Weird how it seemed to work, then nothing changed (unless hard powering off the system has broken something on the filesystem).

Offline

#3 2021-03-16 18:35:18

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 4,236

Re: Trouble booting after crypt lvm2 install

Having 2 EFI partitions isn't compatible with the firmware on a lot of machines. You should only have one that is shared between all of your OS's.


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

#4 2021-03-16 18:38:34

desreverton
Member
From: UK
Registered: 2021-03-16
Posts: 3

Re: Trouble booting after crypt lvm2 install

Thanks for the info, I wasn't aware of that, though I was previously running MacOS from EFI on /dev/sda1 with Windows and Pop!_OS booting off the EFI on /dev/sda3, so I *think* I should be okay on this system.

Offline

#5 2021-04-06 02:07:42

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 6,124

Re: Trouble booting after crypt lvm2 install

Are you using LUKS on LVM or LVM on LUKS?

If LUKS on LVM, the order of hooks for mkinitcpio looks wrong.

If LVM on LUKS, the cryptdevice specifier for GRUB looks wrong.  Or is your encrypted container called volgroup0? (That would confuse me, so I wouldn't use that name, but there's no technical reason you couldn't, I guess.)


How To Ask Questions The Smart Way | Help Vampires

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 Corporation Wireless 8265 / 8275 | US keyboard with Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB