I've been using Mint for a number of years and I encrypted the drive. An annoyance is I have two drives and the second one needs a different encryption and needs to be mounted seperately when I log in (besides if I tell it to automount with a saved password) I've been looking to change distros and finally chose one, this time though it uses BTRFS. I read over a number of differences but am not technical enough to know what it all means.

My question for now is with BTRFS, when installing the distro, can I tell it to use my second drive as an extension of the main drive so it all gets recognized as one, seamless?

you are viewing a single comment's thread
view the rest of the comments
[–] [S] 1 point 15 hours ago (1 child)

Are you saying all this if I use Raid0 like crystalwalrus was saying?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 14 hours ago* (last edited 14 hours ago)

    When using the systemd hooks for your initramfs (and using rd.luks.name=<UUID>=<name> instead of cryptdevice=UUID=<UUID>:<name> in the kernel parameters) it will try to decrypt all listed drives with the first password typed in, and only ask for additional passwords if that fails. Unlike the "traditional" busybox hooks that will ask for a password for each device. Doesn't matter what you actually do with the drives themselves.

    So yes, you can for example have partitions/devices /dev/sda1, /dev/sda2, /dev/sdb1 all encrypted with the same password, format sda1 as your classic swap partition, sda2 as the first half of your btrfs raid0 root device and sdb1 as the second half (let's give them fitting names when decrypting, so /dev/mapper/cryptswap, /dev/mapper/cryptroot-a and /dev/mapper/cryptroot-b), with rd.luks.name=<UUID>=cryptswap rd.luks.name=<UUID>=cryptroot-a rd.luks.name=<UUID>=cryptroot-b in your kernel parameters.

    And at boot you will be asked for the password only once, which will unlock all three encrypted partitions. (Unless you mistype. Then it will fall back to the default behavior of asking for 3 passwords, one for each.)

    (PS: You can also just unlock other encrypted devices via /etc/crypttab later in the boot process. That's the much easier option and should be prefered unless you really need them early... as in they are your (or part of your) root device, swap etc.)

    The actual real question if you don't want to figure out everything manually is which options the installer supports.

  • source
  • parent