I had a dual boot system with Win7 and Ubuntu 11.10 but I felt that it had slowed down a lot. So, I decided to install fresh copies of Win7 and 12.04 LTS. So I removed the Ubuntu partitions and formatted Windows and reinstalled it. Windows worked like a charm so I went ahead and created a partition for Ubuntu. Using a live USB I booted into Ubuntu and selected custom partitions....

I selected the 36 GB partition which I had created for installing Ubuntu and continued but it then asked for a swap space (I have heard it doesn't really matter, but I still wanted to create one) so I selected my E drive (which ONLY has work data, movies, games etc) and thought I could chip off 2GB for swap from it. Now here's where I went wrong. I selected the size of the new partition to be 2GB less than its actual size and selected do nothing in the what do you want to do with the partition option.

To my horror, it wiped off the partition and showed it to bee 100% free !!!

I closed the installation and booted into Windows to see that the E drive wasn't there
and the disk management showed it as an empty partition (100% free).

So I looked up on the internet and downloaded testdisk and tried to follow these instructions (although they aren't exactly about my problem)


I found that my partition was still there with all the files. So a put a L (logical) infront of the partition and ran write. Reboot.

Windows failed to boot...some error about Intel.

Tried to run bootrec /fixboot but it didn;t recognize any installation of Windows so it didn't work.

Now, all I have is a live USB with 12.04 on it and the internet. I ran fdisk and this is the output :

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf37b1052

Device Boot Start End Blocks Id System
/dev/sda1 63 80324 40131 6 FAT16
/dev/sda2 81920 66484223 33201152 83 Linux
/dev/sda3 66486272 189364223 61438976 7 HPFS/NTFS/exFAT
/dev/sda4 189364224 976773119 393704448 f W95 Ext'd (LBA)
/dev/sda5 189366272 976769023 393701376 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 3951 MB, 3951034368 bytes
122 heads, 62 sectors/track, 1020 cylinders, total 7716864 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20ac7dda

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sdb1 ? 3224498923 3657370039 216435558+ 7 HPFS/NTFS/exFAT
/dev/sdb2 ? 3272020941 930513678 976730017 16 Hidden FAT16
/dev/sdb3 ? 0 0 0 6f Unknown
/dev/sdb4 50200576 974536369 462167897 0 Empty

Partition table entries are not in disk order

Also, I can't install testdisk for some reason :

ubuntu@ubuntu:/$ sudo apt-get install testdisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package testdisk

Can someone help ?? I don't care about Windows cause it was fresh and on a separate drive. But I really, really need the E drive back. I am on a laptop, if that helps.