linuxarchlinuxmanjaroluks

Make existing or already installed root file system encrypted


I'm having an existing manjaro linux installation and my root file system is not encrypted. How do i encrypt my file system without reinstall or lossing any data. Is it possible to copy root file system to another encrypted drive using live cd then make that as my root file system. Can anyone guide me on this.

/dev/sda1 is my root file system which is of size 80gb /dev/sda2 is my swap which is of size 4GB


Solution

  • superuser.com is more relevant for this kind of questions.

    Check out this answer, which uses cryptsetup-reencrypt to do an offline in-place encryption of a block device, e.g. a partition.

    If that doesn't suit you, you can also create an encrypted partition and copy files using rsync -a /old /new.