You are not logged in.

#1 2023-12-22 02:25:18

garnish
Member
Registered: 2023-12-22
Posts: 2

Encrypting two partitions with one password

Hello everyone. I installed arch using the archinstall script and I created two different partitions for the root and home volumes and then checked both of them in the disk encryption option and archinstall encrypted them both with the same password and it asks for my encryption password at boot and unlocks and mounts them both which is perfect as it was exactly what I wanted.

Now my question is, because I separated my home and root partitions if I would like to wipe my root partition and reinstall arch or perhaps another distro in the future while still retaining my home partition, what would be the best way of recreating this setup again? I haven't tried it but reinstalling arch on the root partition, encrypting it, leaving the home partition untouched and then editing the fstab file to change my home mount point to the original one should do it but that only works if the home partition is unecrypted, with encryption I'm not sure how to do this as it won't unlock both partitions at boot with the password I set for the root volume. It seemed impossible to me at first but the archinstall script does this effortlessly but I can't see how and I'm not sure how to check for it. Any help would be greatly appreciated. Thanks.

Offline

#2 2023-12-23 22:15:39

DumbInACan
Member
Registered: 2021-12-15
Posts: 11

Re: Encrypting two partitions with one password

I think archinstall used cryptlvm to make the encryption volume that the partitions will live in.  You can probably decrypt, wipe, and mount the root partition in a live environment.  archinstall has an option for you to premount the drives.  I am not sure how well it works though.

Make sure that the bootloader and the kernel both know about the Encryption.

For Arch: https://wiki.archlinux.org/title/Dm-cry … VM_on_LUKS
You can check out the area about configuring mkinitcpio and the bootloader.

It might be that the installers can auto figure that stuff out, but idk for sure.

either way introducing the home partition should be as simple as updating fstab because when the root partition gets decrypted so does the home partition. You just need to tell the system to mount it.

Last edited by DumbInACan (2023-12-23 22:19:06)

Offline

Board footer

Powered by FluxBB