Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Booting from multi-device encrypted btrfs, dracut
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1771
Location: PB, Germany

PostPosted: Mon Mar 25, 2024 8:40 am    Post subject: Booting from multi-device encrypted btrfs, dracut Reply with quote

Hello,

when booting from a single-device encrypted btrfs, I usually create a LUKS device and pass the uuids to the ramdisk created by dracut:
Code:
# grep DEFAULT /etc/default/grub |grep -v "^#"
GRUB_CMDLINE_LINUX_DEFAULT="rd.vconsole.font=ter-u12n rd.vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8 rd.lvm=0 rd.md=0 rd.dm=0 rd.luks.uuid=80122c54-... rd.luks.allow-discards=80122c54-... root=LABEL=gentoo rootflags=subvol=volumes/root video.allow_duplicates=1"

Using OpenRC, all other LUKS devices I open via /etc/conf.d/dmcrypt .

Now if I like to add another device to btrfs which itself should also be encrypted, how can I make that available via CMDLINE?

Now the next issue is, when I get the 2nd device opened as well, I don't like to enter the same password again. I could use a keyfile stored on the first device which is opened by password. But having the first device opened, the btrfs filesystem is not ready yet without the 2nd device.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 222
Location: Pennsylvania, USA

PostPosted: Tue Mar 26, 2024 2:17 am    Post subject: Reply with quote

Cryptsetup can store "tokens" and passphrases in a kernel keyring, and use that before prompting for a passphrase. I've never done it myself and I don't know if dracut supports it. The only docs I could find are in /usr/share/doc/cryptsetup-2.6.1/v2.0.0-ReleaseNotes.bz2, under the header "Tokens and auto-activation". You may have to create a custom initramfs...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum