Root filesystem encrypted with btrfs and 2 ssds

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ulbr

Root filesystem encrypted with btrfs and 2 ssds

Post by ulbr »

Hello Forum,

I am new here and also new to Mint Linux. So please forgive me if I ask a bad question.

I have setup a fresh installation of Mint Linux. Using encryption and btrfs on a single device. As the installer did not give me the option to add directly a second device I try to do this by myself like this after cryptsetup:

Code: Select all

btrfs device add /dev/mapper/sdb1_crypt /
This works very well if I not reboot.So I got the pool up and running. But on reboot I get only the chance to enter the passwort for the first device. And ending up in the busybox. So this one I got fixed by performing a new fresh install.

So the question is how to add a second encrypted device to my btrfs pool? Perhaps adding the device to the fstab?

Thanks a lot for any useful hints.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
deepakdeshp
Level 20
Level 20
Posts: 12334
Joined: Sun Aug 09, 2015 10:00 am

Re: Root filesystem encrypted with btrfs and 2 ssds

Post by deepakdeshp »

Please see https://btrfs.wiki.kernel.org/index.php ... le_Devices
At the same time keeping things simple avoids complications. May be use Mint for 6 months , get a hang of it , try different things , then try btrfs .Do you really need it?btrfs?
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
gm10

Re: Root filesystem encrypted with btrfs and 2 ssds

Post by gm10 »

You need to add the second partition to /etc/crypttab for it to get unlocked automatically on boot. Use the same format as for your existing encrypted partition.

I imagine you'll also have to register it in /etc/fstab as part of your pool but I lack experience with btrfs in this context. The link in the post above should provide further guidance.
Laurent85
Level 17
Level 17
Posts: 7081
Joined: Tue May 26, 2015 10:11 am

Re: Root filesystem encrypted with btrfs and 2 ssds

Post by Laurent85 »

ulbr wrote: Tue Aug 21, 2018 5:35 pm This works very well if I not reboot.So I got the pool up and running.
Before you reboot list uuid partition ids:

Code: Select all

sudo blkid
Add to /etc/crypttab second device, use uuid of /dev/sdb1 in second column:

Code: Select all

sdb1_crypt   UUID=xxx   none   luks
For an ssd drive use this line instead, notice the "discard" option at end of line:

Code: Select all

sdb1_crypt UUID=xxx none luks,discard
Update initrd file to get a prompt at startup for unlocking both drives:

Code: Select all

sudo update-initramfs -u
Image
Locked

Return to “Installation & Boot”