You are not logged in.
Pages: 1
Topic closed
I want to encrypt my root volume. Checking docs here https://wiki.archlinux.org/title/Dm-cry … partitions
It mentions to run this command:
cryptsetup -y -v luksFormat /dev/sda2This will overwrite data on this partition (looking at this video: https://youtu.be/dI3bGeT31Bo?t=894). I have a system running now, is there any way to encrypt your root partition without erasing/overwriting data?
Last edited by dab9966 (2023-12-14 18:23:02)
Offline
If your root file system is shrinkable (e.g. ext4) and you have a separate /boot partition, then it's possible by following https://wiki.archlinux.org/title/dm-cry … ile_system. Make sure to have a backup of all data that you don't want to lose in case things go wrong.
It would most likely be faster to make a full system backup, repartition, set up LUKS and restore the file system contents (+ adjust, fstab, boot loader configuration, etc.) instead.
Offline
If your root file system is shrinkable (e.g. ext4) and you have a separate /boot partition, then it's possible by following https://wiki.archlinux.org/title/dm-cry … ile_system. Make sure to have a backup of all data that you don't want to lose in case things go wrong.
It would most likely be faster to make a full system backup, repartition, set up LUKS and restore the file system contents (+ adjust, fstab, boot loader configuration, etc.) instead.
Must have missed this page, thanks!
Offline
I knocked together a cheatsheet that goes through the steps to encrypt an existing root partition:
https://alfter.us/2025/07/29/cheatsheet … x-install/
I figured it out in a scratch VM first, then applied it to my notebook in about an hour.
Whatever you have in your root filesystem will be encrypted when you're done; it'll be accessible as long as you don't forget the passphrase. The OP was missing some options to cryptsetup that are needed to encrypt an existing filesystem.
Last edited by salfter (2025-07-29 20:57:26)
Offline
Thank you for contributing..
Please (re-)read Old threads/"necro-bumping" .
Closing this old thread.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Pages: 1
Topic closed