1

Topic: Novice seeking recovery of dot files

Until very recently, I have had my 250GB hard drive divided into three partitions:   an NTFS partition used by Windows, an ext3 partition used by Linux, and a Linux swap partition (about twice the size of my RAM).   I divided it up like this at the beginning of 2007 using GParted 0.3.1-1 LiveCD.   I only have one hard drive permanently attached to my computer.   At the beginning of 2007, it was a GRUB-based dual-boot  computer.

This week, I have been unable to boot either OS, so I backed up all the files that I wanted to  save, planning to delete the partitions--linux first, then windows--then write zeroes to the entire harddrive, in order to start over from scratch, reinstalling windows, linux, and GRUB.

Well, Robin Miller's video 5 made this look very easy with GParted, so I used a technique similar to his.
You can view his videos here:
http://www.linux.com/article.pl?sid=06/07/20/1654251

Unlike Robin "Roblimo" Miller in video 5, I did NOT resize the Windows ptn. I just removed the two linux partitions and quit.

A short time later, I discovered a major problem:

Some important files I had backed up off my hard drive's ext3 partition were encrypted with GnuPG (public key encryption). I had assumed that I could decrypt them on a different drive using my public key and my passphrase. But I was wrong.

When I tried to decrypt the files, I got an error message from GnuPG.   It never even prompted me for passphrase.

Apparently, GnuPG also requires information from the "keyrings" stored in the .gnupg subdirectory. GnuPG had stored seven files in that subdirectory:

gpg.conf
options
pubring.gpg
pubring.gpg~
random_seed
secring.gpg
trustdb.gpg

I guess the files ending in .gpg are the "database", or so-called keyrings, it uses to hold and use data essential for encrypting/decrypting files.

Anyway, I had forgotten about any dot files except my bookmarks stored in .mozilla/.    And I don't have backups of these secret Gnupg files.      So my question is,

"How do I "undo" my linux ptn. removal in order to recover these secret Gnupg files from my linux ptn.?"

If I cannot recover the secret Gnupg files, then my encrypted files are history.

Nothing has been written to the hard drive since I used GParted to delete the two linux partitions.   Not a single bit.    I can no longer read or write the hard drive's files because I can no longer mount the Linux partition when using SImply Mepis 6.0 live CD, a linux distro.   I haven't tried to access any files on the Windows ptn.    Neither OS stored on the hard drive will boot.    So all the data on the hard drive is exactly the same as it was when I deleted the two linux partitions, except the partitions are deleted.

I don't want to change anything on my hard drive until I see if there's any way to recover these files. Otherwise, my encrypted files are hosed down the drain.  So is it possible to "undo" my removal of that partition in order to recover these files?      Either theoretically or practically?   Any advice?

Alan

2

Re: Novice seeking recovery of dot files

Since nobody seems to know how to "undo" the deletion, I will take a look at the source code for gParted.    Can someone provide a hypertext link to the section where one can get gParted's source code?

3

Re: Novice seeking recovery of dot files

It would be rather easy to undo the partition deletion if you had backup of the master boot record. I take backup of floppy disk after any modification.

I don't know many things about ext3 system, and even lesser about encrypted files. I think someone who knows how ext3 works can recover files using a disk editor (I did that in the past in msdos disks and in Apple floppy disks, before the hard disk era... ).  About source, I think you could search in the main gparted site.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

4

Re: Novice seeking recovery of dot files

I don't know if I have an MBR backup.     I'll check when I get home.

5

Re: Novice seeking recovery of dot files

No, unfortunately, I don't have an MBR backup.     Any ideas on how to recover those files?

6

Re: Novice seeking recovery of dot files

A good tool is TestDisk:
http://www.cgsecurity.org/wiki/TestDisk
Many people did partition recovery successfully.

*** It is highly recommended to backup any important files before doing resize/move operations. ***