Root filesystem encrypted with btrfs and 2 ssds

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
ulbr
Level 1
Level 1
Posts: 1
Joined: Tue Aug 21, 2018 5:16 pm

Root filesystem encrypted with btrfs and 2 ssds

Post by ulbr » Tue Aug 21, 2018 5:35 pm

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.

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Root filesystem encrypted with btrfs and 2 ssds

Post by deepakdeshp » Wed Aug 22, 2018 8:42 am

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, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

gm10
Level 9
Level 9
Posts: 2796
Joined: Thu Jun 21, 2018 5:11 pm

Re: Root filesystem encrypted with btrfs and 2 ssds

Post by gm10 » Wed Aug 22, 2018 9:48 am

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 15
Level 15
Posts: 5625
Joined: Tue May 26, 2015 10:11 am

Re: Root filesystem encrypted with btrfs and 2 ssds

Post by Laurent85 » Wed Aug 22, 2018 2:58 pm

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

Post Reply

Return to “Installation & Boot”