You are not logged in.

#1 2026-03-13 15:10:04

Unguarded5751
Member
Registered: 2026-03-13
Posts: 2

[SOLVED]: Failure mounting root partition when booting LVM on LUKS

Hello everyone!

I've been trying to set up an old MacBook with Arch and specifically using LVM on a LUKS-encrypted partition. I've never used LVM or LUKS before, but I think I've correctly followed all setup steps listed in the wiki. The problem is that I can't get past the initramfs.

Here's my setup:
- I'm using an internal SSD with 3 GPT partitions: an ESP, the main partition which is supposed to contain the Arch installation and the third one is a regular Arch installation for testing and I'm writing this post through it.
- The main partition is encrypted with LUKS2 and has an LVM volume group on it, containing a swap partition, a root filesystem partition and a home partition.
- I'm using GRUB as a bootloader.
- I'm using the hardened kernel.
- The kernel and initramfs are located on the encrypted root partition, in /boot.

I've successfully installed the system and configured GRUB to unlock the disk on boot, etc. When booting the system, I am immediately asked by GRUB for the LUKS password to unlock the partition I will boot from. I have verified that it can unlock it and access all files in the LVM partitions. After unlocking the partition, I am greeted with a regular GRUB boot menu, where I can select Arch Linux and start booting the system. The usual "Loading Linux linux-hardened ..." and "Loading initial ramdisk ..." appear, then systemd starting services up and finally a message that a start job is running for `/dev/mapper/arch-root`, the partition containing my root filesystem. The start job times out after 90 seconds and I end up in emergency mode, with a locked root account meaning that I can't really debug anything.

Beyond the main question of "what am I doing wrong?", I have a few other questions:
- Why is the emergency shell locked? I could not find an answer on how to unlock it anywhere and it's a shame, because it's really helped debug other initramfs problems on other systems in the past.
- Why is system even trying to mount `/dev/mapper/arch-root`? The kernel, initramfs and GRUB configuration are all located on it, so theoretically it's already unlocked.
- If it isn't unlocked for some reason, why am I not getting a password prompt?
- While I think the setup should support GPT partition automounting (at least it does for this regular Arch installation), do I need to set something up in `/etc/crypttab` or `/etc/crypttab,initramfs`? The `/etc/crypttab` template says I shouldn't add the root partition there, but I couldn't find any info on the wiki.

What I've already checked:
- The encrypted partitions can be mounted and accessed just fine, including from GRUB
- My mkinitcpio hooks are identical to the ones from the wiki
- Manually specifying `rd.luks.*` or `root` kernel parameters made no difference (caveat: I may have used a wrong UUID, LVM on LUKS has quite a few to choose from).
- I've gone through the various wiki pages related to this setup and followed all instructions (although I guess I have missed something to be asking this question). I've been going at this for days and I can't find anything else.

I'd really appreciate it if someone could help me! Thanks in advance.

Last edited by Unguarded5751 (Yesterday 12:45:37)

Offline

#2 2026-03-13 15:23:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,620

Re: [SOLVED]: Failure mounting root partition when booting LVM on LUKS

Unguarded5751 wrote:

- Why is the emergency shell locked? I could not find an answer on how to unlock it anywhere and it's a shame, because it's really helped debug other initramfs problems on other systems in the past.

https://wiki.archlinux.org/title/Mkinit … _is_locked

Unguarded5751 wrote:

- Why is system even trying to mount `/dev/mapper/arch-root`? The kernel, initramfs and GRUB configuration are all located on it, so theoretically it's already unlocked.

Grub accesses it, but that has nothing to do with the kernel or userspace access. It's a completely different system that needs to unlock and mount it.

Unguarded5751 wrote:

- If it isn't unlocked for some reason, why am I not getting a password prompt?

Usually a misconfigured initramfs. Post the config. Could also be related to your next question, as something has to point to the LUKS volume.

Unguarded5751 wrote:

- While I think the setup should support GPT partition automounting (at least it does for this regular Arch installation), do I need to set something up in `/etc/crypttab` or `/etc/crypttab,initramfs`? The `/etc/crypttab` template says I shouldn't add the root partition there, but I couldn't find any info on the wiki.

There are multiple options here, with crypttab.initramfs being one. The kernel command line is the other main option, automounting doesn't come into play here as we're talking about unlocking, not mounting.

Last edited by Scimmia (2026-03-13 15:35:43)

Online

#3 Yesterday 12:44:12

Unguarded5751
Member
Registered: 2026-03-13
Posts: 2

Re: [SOLVED]: Failure mounting root partition when booting LVM on LUKS

Thank you for the quick response! I managed to set the disk up normally from the emergency shell and eventually created a crypttab.Initramfs with a keyfile, so now it boots perfectly!

Offline

Board footer

Powered by FluxBB