Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed windows 7 and it destroyed my truecrypt volume.

I have the following setup:

/dev/sda  <-- truecrypt encrypted drive
/dev/sda1 <-- 100mb, probably windows boot loader (new, should not be here)
/dev/sdb1 <-- ubuntu
/dev/sdb2 <-- swap
/dev/sdb3 <-- windows 7 (new)

The bootloader of windows 7 seems to automatically install itself at sda1, not on the partition windows is beeing installed on.

I was able to restore the volume header of the truecrypt drive by using volume tools -> restore volume header -> restore the volume header from the backup embedded in the volume

If I now try to mount the truecrypt volume at /dev/sda I get the following error:

mount: wrong fs type, bad option, bad superblock on /dev/mapper/truecrypt3,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

I started truecrypt over command line, but there is no concrete error message.

syslog - try dmesg | tail gives me:

No command 'syslog' found, did you mean:
 Command 'dsyslog' from package 'dsyslog' (universe)
 Command 'syslogd' from package 'sysklogd' (universe)
 Command 'syslogd' from package 'inetutils-syslogd' (universe)
 Command 'syslogd' from package 'busybox-syslogd' (universe)
syslog: command not found

I already tried to google my problem but could not find a solution so far (and I am a little afraid of just trying stuff, because it would be a shame to loose all the data). Does anyone know a way to fix this? I would really appreciate any help.

// edit:

dmesg | tail gives me:

[ 2848.396620] EXT3-fs (dm-3): error: invalid journal inode
[ 2976.790464] EXT3-fs (dm-1): error: invalid journal inode
[ 3890.357971] EXT3-fs (dm-1): error: invalid journal inode
share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

It seems to me that you have managed to "Open" the Truecrypt containter, but the EXT filesystem in the container is corrupt (which would make sense if Windows has overwritten part of it as seems to be the case)

There is every probability that this command will make things worse, so I'd strongly recommend backing up the truecrypt container before trying it - but to repair the filesystem you could try /sbin/fsck.ext3 /dev/mapper/truecrypt3

You may want to try file recovery on the damaged partition instead, in which case you could do it the same way you would for a non-encrypted partition, only using /dev/mapper/truecrypt3 as the block device.

share|improve this answer
    
Thanks for your anwser. If I mount the drive normally with truecrypt, it is not "open"(/dev/mapper/truecrypt3 does not exist), but truecrypt offers "filesystem: do not mount" as option and then it is there. Truecrypt also has "check filesystem" and "repair filesystem" (i'm guessing it does the same as /sbin/fsck.ext3?). Sadly, I do not have the resources to back up an image of the drive, o I guess I will try file recovery first. Can you recomment any tools? –  tim Feb 1 '13 at 8:48
    
If the data has any value tat all, you really should back it up. How much space do you have on SDB (and each partition, and how big is sda ?) [ If you can find some space - and how much depends on what was on the corrupted drive you could even compress the unencrypted disk into an image ]. You could try Photorec to try identify files stored in contiguous blocks with known headers. cgsecurity.org/wiki/PhotoRec (Maybe try Photorec then fsck and see what that does ??) Again, you should back it up first - external USB drives are cheap. –  davidgo Feb 1 '13 at 9:02
    
sdb is an ssd drive, so there is not enough space, but I could probably manage to get a 1tb drive. sda (the drive, but also the truecrypt volume) is 2tb big, but the actual files on it should be below 500gb. I think I will try photorec (as I understand it is read-only, so it should not make matters worse) and if nothing else helps I will try fsck as last resort. thanks again for your help. –  tim Feb 1 '13 at 9:42
add comment

Installing Windows will always overwrite your MBR. The MBR is not stored inside a partition, but rather it is in the first 512 bytes of the disk. If sda was booting using truecrypt's bootloader, you need to re-install truecrypt's bootloader.

Windows knows nothing about GRUB, SYSLINUX, LILO or any other non-Microsoft bootloader. It also knows nothing about truecrypt disks/volumes. The MBR will ALWAYS be overwritten to the first bootable disk, because it assumes that the system cannot boot into windows otherwise. True-crypt has it's own super-secure bootloader that can unlock the volume and allow the OS to boot. If this has been damaged/overwritten/tampered with, it needs to be restored or corrected.

You may want to try using the TrueCrypt Rescue Disk.

share|improve this answer
    
I'm sorry if I was unclear, the drive at sda is just for storage, it's not an encrypted windows system. So I don't have a rescue disk, I'm trying to mount the volume using the truecrypt application. –  tim Jan 31 '13 at 20:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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