DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] How to manipulate an encrypted partition in a switched_root environment.
@ 2012-06-05 12:06 Tamateas Kostas
  2012-06-05 13:46 ` Javier Juan Martínez Cabezón
  0 siblings, 1 reply; 2+ messages in thread
From: Tamateas Kostas @ 2012-06-05 12:06 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 782 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 2511 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dm-crypt] How to manipulate an encrypted partition in a switched_root environment.
  2012-06-05 12:06 [dm-crypt] How to manipulate an encrypted partition in a switched_root environment Tamateas Kostas
@ 2012-06-05 13:46 ` Javier Juan Martínez Cabezón
  0 siblings, 0 replies; 2+ messages in thread
From: Javier Juan Martínez Cabezón @ 2012-06-05 13:46 UTC (permalink / raw)
  To: dm-crypt


> 
> 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.

Since sda2 is encrypted e2fsck cant find superblock and fs data. You
must pass e2fsck to the fs unlocked.

Look for which device is mounted as rootfs and do e2fsck to this one.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-05 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-05 12:06 [dm-crypt] How to manipulate an encrypted partition in a switched_root environment Tamateas Kostas
2012-06-05 13:46 ` Javier Juan Martínez Cabezón

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox