23
submitted 3 days ago* (last edited 2 days ago) by nettie@lemmy.world to c/linux@lemmy.ml

I have a file system on LVM inside LUKS on a 2nd SSD that I'd like to mount at boot time. The OS boots fine on the main (non-LUKS) SSD.

/etc/crypttab contains a line mapping a UUID to a name, with no keyfile.

/etc/fstab contains a line mapping /dev/LVMvg/volume to /home/special

But I'm not asked for the passphrase at boot.

I can do it manually once booted (cryptdisks_start asks for the passphrase, decrypts it, and then LVM picks up the volumes enabling me to mount /home/special.) But I'd like all this to happen early in the boot.

How can I make the early processes ask me for the crypt password?

Thanks!

EDIT: Solved!

Thanks (blush) to man crypttab ... Add initramfs to the options field in crypttab does the trick. I was a bit confused though because man crypttab tells me that Systemd's crypttab is different and doesn't support the initramfs option... but I'm using systemd and it worked. Anyway, it did work. Phew.

Thanks for answers though!

you are viewing a single comment's thread
view the rest of the comments
[-] nettie@lemmy.world 2 points 2 days ago

Thanks for your post. Yeah I've done encrypted OS partitions myself and it's worked fine - it's asked for the password. This was a bit different because I was needing something unlocked that - as far as the boot loader was concerned - was not needed for boot. I did find the solution though - see my edit in OP above.

[-] akunohana@piefed.blahaj.zone 2 points 2 days ago

Ah, my bad. Cool that you got it working! And while it could be the "right" way, I wonder if crypttab is the only way to do this, or if it's possible to do decryption of a non boot volume as an option in a boot loader entry or in the kernel command line. Just thinking out loud. 🤣

this post was submitted on 23 Jul 2026
23 points (92.6% liked)

Linux

66618 readers
407 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS