0

Long story short:

Currently I have a /home partition (with no os installed, no root partition) encrypted with ecryptfs. Following numerous tutorials and guides, I have successfully mounted the decrypted folder from a Live Ubuntu 18.04 USB at /tmp/ecryptfs.5vNHafiU. I can see all my files and have access to them perfectly fine. However, I have no idea what to do now. All the tutorials stops at this point.

I would like to replace the encrypted /home partition with the decrypted data.

After that, I plan to install Ubuntu using that /home partition. Apparently the data will be preserved as long as I uncheck the 'format' box for the partition. I don't think I can do it when it's still encrypted, correct me if I'm wrong please.

Any help will be greatly appreciated :)

  • How much data do you have on this partition? Can you copy it off to a usb drive? If so copy it off, do your Ubuntu install and copy the data back. Alternatively can you make enough space on your existing drive for a new partition and copy it there? – PonJar Dec 20 '19 at 8:25
0

I've solved the problem quite quickly after I posted. Sorry for not posting this immediately.

What I did:

I had about 300 Gb of data on a 1Tb drive. So I created another partition large enough to hold the data, mounted it and copied everything to the new partition using the cp command.

cp -R /tmp/ecryptfs.5vNHafiU /NEW_PARTITION/MOUNTPOINT the extention of the ecryptfs folder will be different for yours.

At this point I could've used the standard ubuntu live usb install method, however I came across a bug report post saying that it would fail, where the op's system was, very similar to mine, completely destroyed(bit of an exaggeration).

Instead, I ran the ubuntu boot repair. To be frank I am not sure what it did, I'm certain that it reinstalled GRUB, but apparently it reinstalled ubuntu as well since that's what happened.

P.S I noticed that PonJar also commented this method, I much appreciate that.

| improve this answer | |
  • By the way, I feel the need to comment on the extraordinarily long time that the copying took. Normally moving that partition using gparted would take about 2 hours, whereas this took more than 6 hours. I'm not sure why. – Kenivia Dec 20 '19 at 9:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.