1

My home directory is encrypted with ecryptfs. I wanted to try some things that required reinstalling my system, so I backed up to a flash drive with this command:

sudo tar cf backup.tar.zstd --one-file-system --acls --xattrs --zstd /

My system has 3 partitions, efi, root, and swap. The --one-file-system was intended to grab the encrypted ecryptfs data and skip the decrypted mount.

I did my tests then, from a live usb, restored the backup this way:

tar xf backup.tar.zstd --xattrs --zstd -C /mnt
genfstab -U /mnt > /mnt/etc/fstab
arch-chroot /mnt
grub-install /dev/nvme0n1
grub-mkconfig -o /boot/grub/grub.cfg

And it boots, I can log into sddm with my password and reach a desktop, but my ecryptfs will not mount. What broke?

5
  • Did you actually backup anything not on the / filesystem? Your $HOME is on a different file system if I understand you correctly, it's ecryptfs, so with --one-file-system I would expect that only / and not your $HOME. Is that not what happened? Commented Jan 3, 2023 at 15:15
  • @terdon The decrypted mount got skipped yes, but the encrypted /home/.ecryptfs was backed up successfully. My problem is that it won't decrypt anymore Commented Jan 3, 2023 at 15:51
  • 1
    Ah, right, gotcha. OK, then please edit your question and show us the commands you run to mount it, and any error messages you get. Commented Jan 3, 2023 at 16:32
  • @terdon I don't mount it manually it mounts via a pam module. ecryptfs-recover-private managed to find the files, then i just copied everything over. My question is, what caused it to stop mounting at login? What didn't the tar command back up, and what's the right way to do it? Commented Jan 3, 2023 at 18:04
  • OK, then please add this to your question. Explain that you expected this to mount on login. Explain exactly what you have done (are you actually booting into this system or are you using arch-chroot)? You probably also want to mention that you're using Arch, if that is what you are using. Have you checked journalctl for any error messages? Anything there? How had you set up the automatic boot originally? I don't know the answer, mind you, I'm just thinking of what might be relevant and what information someone more knowledgeable than I might need. Commented Jan 3, 2023 at 18:08

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.