windwows 7 installing then linux partitions deleted

(dual boot),I have Installed windows 7 over windows xp in the first partition (primary) and I lost linux partitions and there are two ntfs partitions didn’t deleted.want to recover linux partiotns becose they have important data ,or recover files from deleted partitions.

used opensuse DVD trying to recover grub but it says there are no linux partitions

I have the folowing before the the problem:

fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
240 heads, 63 sectors/track, 64601 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x0039857c

Device Boot Start End Blocks Id System

/dev/sda1 1 11828 89419648+ 7 HPFS/NTFS

/dev/sda2 * 11829 64601 398963880 f W95 Ext’d (LBA)

/dev/sda5 29913 64601 262248808+ 7 HPFS/NTFS

/dev/sda6 11829 11861 247117 83 Linux

/dev/sda7 11861 13525 12578863+ 82 Linux swap / Solaris

/dev/sda8 13525 29912 123885216 83 Linux

Partition table entries are not in disk order
------want help

sda1 ----- C windows 7
sda5----------ntfs partition
sda7-----------swap
sda8------------/ linux root

Recovering is a risky operation.

If you think it is worth, try to copy the unrecovered disk’s content, byte-wise, to a new disk which shall be of the same or larger size, with command dd. This will copy the partition table as well.

I haven’t done, but I know that fdisk is able to create partitions at given cylinders (start and end). Maybe train on a disk or USB memory stick…

I have checked: it is possible to restore a deleted partition in Yast, once the start/end cylinder numbers are known.

Naturally, the partiton shall not be formatted at creation.

Perhaps a good way to do this is through opensuse 11.2 LiveCD.

Please download and burn yourself this:
Parted Magic: Downloads

Here is how to boot from it:
Using Parted Magic an Introduction - openSUSE Forums

Open the ROXterminal and do:

fdisk -l

If you don’t have internet in Parted Magic, take a screenshot, save the file to a pen drive and post the image here either from a different PC or reboot to windows. Once I see fdisk I will advise

caf4926 Ok I will do this

sorry to be late. this pmagic seems fantastic.
Now this is the screenshot.
http://i752.photobucket.com/albums/xx165/lightspeed2000/Screenshot.png

I installed windows 7 by booting from its DVD and formatted C.

I had made image for C partition before the problem (windows Xp partition) coz I thought this will restore the booting area,and I used it but the linux partitions still unallocated area.

I think all data still there coz I checked it by some programs running from another HD.

Hope I can restore all data, and keeping last ntfs partition which contains data.

thank you all very much for help.

That doesn’t look good for you.

Windows 7 looks to be installed in Logical Partition sda5
Note sda5 is 29913 - 64601

Notice 64601 is the end point of extended sda2
BUT the start point of sda5 29913 means there is free space in sda2 before sda5
This free space is shown in Parted as Unallocated and will occupy 11829 - 29913

So as it is your Linux partitions have been deleted.
However. In Parted Magic there is an application called Test Disk
Run it to see if you can recover lost partitions.

thank you for your reply,
sda5 is ntfs 250gbyte and it still working normal,
I scanned unallocated area with Acronis and it gave me the following :
http://i752.photobucket.com/albums/xx165/lightspeed2000/Acronis2.jpg

I want to calculate sda8(root),sda7(swap)from the following to make correct selection

fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
240 heads, 63 sectors/track, 64601 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x0039857c

Device Boot Start End Blocks Id System

/dev/sda1 1 11828 89419648+ 7 HPFS/NTFS

/dev/sda2 * 11829 64601 398963880 f W95 Ext’d (LBA)

/dev/sda5 29913 64601 262248808+ 7 HPFS/NTFS

/dev/sda6 11829 11861 247117 83 Linux

/dev/sda7 11861 13525 12578863+ 82 Linux swap / Solaris

/dev/sda8 13525 29912 123885216 83 Linux

Partition table entries are not in disk order

Is this right or wrong?

That looks correct from what you lost. And the partition table numbering looks correct too.
You might be in luck

the ntfs partition appears in Acronis is old partition before installing any linux,and there are old and new partitions for opensuse.

How can I calculate correct spaces for sda8,sda7 ?

I might know enough to have lead you here. But I have never had the misfortune of having to do this personally.

I can’t see exactly what you want to do here. My main concern would be to get back my /home partition, which by my estimation is sda8.
Forget the rest.
Once you recover it and can mount it in Parted Magic you can copy the data you need. Where you copy it to is another question, perhaps the windows partition for now. Then I would delete it, and create a new layout with newly formatted partitions.

thank you very much for your help,

Ok ,yes I want to restore sda8 to get back my /home to another HD or to local ntfs temporarily and then create a new layout with newly formatted partitions

(/home is in root partition I didn’t make it in a separate partition)

are you sure?
Because earlier you quoted

/dev/sda6 11829 11861 247117 83 Linux

/dev/sda7 11861 13525 12578863+ 82 Linux swap / Solaris

/dev/sda8 13525 29912 123885216 83 Linux

let us know how you get on anyway

sda6----/boot ext3 I think 250 Mbyte

sda7----swap 12 or 8 Gbyte don’t remember

sda8----/ root ext3

for clear look
http://i752.photobucket.com/albums/xx165/lightspeed2000/2.jpg

Is your last post just a recopy of fdisk from first post or is it a new output.

If it is just a recopy, dump Acronis and run ‘testdisk’ posted by caf4926 , it give more needed information.

1 track (63 sectors) before each and every logical volume is an extended partition table that links all logical volumes together. It seems you lost the link from sda5 to sda6. Its not hard to figure out (if one has done needed research) but also easy to make a dumb mistake, I normally do. ‘testdisk’ normally does it correctly but not always.

If the data is important would say get a 2nd hdd of same or larger and do a sector to sector transfer. Fixing a hdd partition structure is risky and sometime not repairable if mistake is made.

yes my last post is just a recopy of fdisk from first post.

Ok, I will try testdisk.

the real partitions order is :

http://i752.photobucket.com/albums/xx165/lightspeed2000/5.jpg

why there is a link from sda5 to sda6?

Personally I would concentrate on sda8 as that holds all your data.

Once you have done that I would delete everything inside sda2 and repartition it. Nicely this time;)