You are not logged in.

#1 2019-04-06 05:07:07

Thme
Member
From: Raleigh NC
Registered: 2012-01-22
Posts: 105

[SOLVED] reencrypted partition won't mount

I'm relatively new to block level encryption and setup. I created a snapshot of my running system using rsync (excluding /dev, /proc, /tmp and other ram related directories). Once I created the snapshot I encypted using:

cryptsetup-reencrypt /dev/sdb5 --new  --reduce-device-size 4096S

everything went smooth when mapping the device

cryptsetup open /dev/sdb5 recrypt

however I get the following error:

mount /dev/mapper/recrypt /mnt/newroot
mount: /mnt/newroot: wrong fs type, bad option, bad superblock on /dev/mapper/recrypt, missing codepage or helper program, or other error.

What am I missing or doing wrong?

Solution:
since I was basically trying to create an encrypted snapshot of my running system I changed the order of my steps and used cryptsetup normally instead of cryptsetup-reencrypt to create a new volume:

cryptsetup luksFormat /dev/sdb5

opened it:

cryptsetup open /dev/sdb5 newroot

formated and mounted

mkfs.ext4 /dev/mapper/newroot
mount /dev/mapper/newroot /mnt/newroot

Then used rsync to take a snapshot of my running system into the new encrypted volume

rsync -aAXv --exclude={/dev/,/proc/,/mnt/,/home/*,/tmp/,/var/lib/pacman/,/var/cache/,/sys/,/run/,/media/} /  /mnt/newroot/ 

 
I believe everything should go fine from there. Once I'm booting this partition I'll look into adding an entry to the wiki on making encrypted snapshots from a live system then booting from them...

Last edited by Thme (2019-04-07 02:32:02)


"Hidden are the ways for those who pass by, for light is perished and darkness comes into being." Nephthys:
Ancient Egyptian Coffin Texts

Offline

Board footer

Powered by FluxBB