LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   loop-aes remounting existing partitions (https://www.linuxquestions.org/questions/linux-software-2/loop-aes-remounting-existing-partitions-554864/)

wingcom 05-18-2007 04:38 AM

loop-aes remounting existing partitions
 
Heya,

Anyone familiar with loop-aes? I got these 2 encrypted partitions that I mount using a gpg key on a USB stick. I still have the partitions, the gpg key and the password.

Now I reinstalled my system (new mobo etc) and I would like to get those partitions back up. Loop-aes is compiled and tested.

So... anyone who knows which steps to perform to be able to remount these existing drives again? The instructions in the README start from scratch, which include formatting the partitions and even writing random data to it :s Obviously I don't want that. I tried to skip those steps but somehow I need to setup things between /dev/loop3 and my /dev/hdc correctly without formatting.

ive also tried to just put the info in fstab but then i get this when mounting:

PHP Code:

[root@ENTERPRISE ~]# mount /private
Password:
mountwrong fs typebad optionbad superblock on /dev/loop3,
       
missing codepage or other error
       In some cases useful info is found in syslog 
- try
       
dmesg tail  or so 

and syslog tells me its a wrong filesystem. So i need something to associate /dev/loop3 with /dev/hdc which is probably losetup? but how do I use it?

PHP Code:

May 18 11:30:55 localhost kernelVFSCan't find ext3 filesystem on dev loop3. 

thanx,

wiNGCom

macemoneta 05-18-2007 09:45 PM

What is your fstab entry?

wingcom 05-20-2007 08:42 AM

PHP Code:

/dev/hdc5 /mnt/winDATA ntfs-3g defaults 0 0
/dev/hda6 /public ext2 defaults,noauto,loop=/dev/loop6,encryption=AES128,gpgkey=/home/wingcom/key/wingcom-hdd.gpg 0 0
none 
/proc proc defaults 0 0
/dev/hda7 /usr ext3 defaults 1 2
/dev/hda5 swap swap defaults 0 0 

I tried to follow the README as much as possible. The partitions where created with an earlier version. So I hope the samples are alike (like AES128 encryption instead of AES256 or ext2 vs. ext3 - i remember that i followed the README so if its the same sample this entry should be good)

It tells me that no ext2 system is found on /dev/loop6 Could this be caused by wrong encryption scheme or any other wrong setting? Although i tried both of them and they don't seem to work

macemoneta 05-20-2007 10:16 AM

Try this instead:

Code:

/dev/hda6 /public ext2 noauto,users,rw,exec,loop,encryption=aes,gpgkey=/home/wingcom/key/wingcom-hdd.gpg 0 0
Before mounting (in your rc.local at boot, for example):

/sbin/modprobe loop
/sbin/modprobe cryptoloop
/sbin/modprobe aes

wingcom 05-21-2007 01:28 PM

Still a no-go...

I don't have cryptoloop though so probing it didn't return something joyfull. But isn't loop-aes supposed to replace cryptoloop? I think "modprobe loop" loop should suffice since I turned it off in my kernel config and recompiled without it, then installed loop-aes giving me a new loop.ko

The rest was successfull but i still can't mount the disk :s

edit: oh yeah and of course the linux utils were patched also ofcourse

macemoneta 05-21-2007 02:49 PM

I use both cryptoloop and the encfs on fuse, and I'm not having any problems (Fedora). I tried getting loop-aes at one point, but had problems (though I read that those were later fixed). Maybe try one of the alternatives?

wingcom 05-21-2007 03:35 PM

yeah good plan but I still have my hopes up on recovering that data. That's the shit with encrypted data: you make it secure so you don't have any unencrypted backups of it :s

Or will it be possible to mount that partition with one of those other tools? its worth a shot. Do they also work with gpg keys?


All times are GMT -5. The time now is 03:51 PM.