[dm-crypt] How to manipulate an encrypted partition in a switched_root environment.

Tamateas Kostas k.tamateas at dataways.gr
Tue Jun 5 14:06:06 CEST 2012

Hello evertybody. I am using cryptsetup to work with encryption. 
Everything is ok and working nice. However I have an issue and I don't 
know how to solve it. Well, the kernel is loaded, same for the ramdisk. 
In the ramdisk I use *cryptsetup luksOpen blabla*.. and then I use 
*mount /dev/mapper/enc /media/root*. Then I switch_root to /media/root. 
Everything works normally.

Inside the switched_root system, I do e2fsck or dumpe2fs on /dev/sda2, 
where sda2 is that encrypted partitionand it returns: bad superblock and 
stuff like this.In the ramdisk I had the /dev/mapper/enc device, but in 
switched_root system I don't have it. I only have /dev/mapper/control.

So can anyone tell me how I can manipulate my sda2 device in the 
switched_root environment ?

Thanks, Kostas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20120605/4cbf7648/attachment.html>

More information about the dm-crypt mailing list