Partition corrupted Windows Xp / Linux Ext4

How to use TestDisk to recover lost partition
Post Reply
Message
Author
FantoMax
Posts: 3
Joined: 21 Mar 2013, 22:24

Partition corrupted Windows Xp / Linux Ext4

#1 Post by FantoMax » 21 Mar 2013, 22:44

Hi,
My original situation:
Hard disk : 1 Tbyte

1. Primary Partition: 300Gbyte NTFS - Windows XP [WDC_Disco_C]
2. Logical Partition: 200Gbyte NTFS - [WDC_DSK1_VOL2]
3. Swap Linux: 4 Gbyte
4. \root Linux: 40 Gbyte Ext4
5. \home Linux: 456 Gbyte Ext4

With Gparted I reduced the \home partition to 100Gbyte and increased the \root to 80 Gbyte, so at the end of my extended partition I haved around 320Gbyte free space.
Gparted move correctly my partition and at the reboot Windows XP and Linux boot without problem.
My error: with "computer manager\disk manage" of XP I manage the free space to create a new logical partition in NTFS, and this corrupted my Linux partition and also the boot (grub2).
Now I have this situation:

Code: Select all

TestDisk 6.14-WIP, Data Recovery Utility, September 2012
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

  1 P HPFS - NTFS              0    1  1  38244	254 63  614405862 [WDC_Disco_C]
  2 E extended LBA         38245    0  1 121600	254 63 1339114140
 No partition is bootable
  5 L HPFS - NTFS          38245    1  1  63741	254 63  409609242 [WDC_DSK1_VOL2]
    X extended             63742   17 21  64004	 12  8    4208703
    X extended             64004   43 41  72989	 28 63  144343103
>   X extended             72989   60 33  92111	141 62  307200063
  6 L Novell              119376  234  6 234707 251 51 1852793632

 Bad relative sector.
 Space conflict between the following two partitions
  2 E extended LBA         38245   0  1 121600 254 63 1339114140
  6 L Novell               119376 234  6 234707 251 51 1852793632
    Next
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
>[Quick Search]  [ Backup ]
                            Try to locate partition
Now can boot my hard disk but, if possible, I would to rescue my Linux partition.
I ordered a new hard disk to made a Backup so, I can try to rescue the Linux partition.
Someone have a clean solution to solve my problem???

Thanx in advance.
Max

Sponsored links

Lito
Posts: 83
Joined: 08 Sep 2012, 06:58

Re: Partition corrupted Windows Xp / Linux Ext4

#2 Post by Lito » 25 Mar 2013, 12:49

Just a couple of questions:
How do you start the NTFS Recovery Software if Windows does not work?
You would need another computer or you would have to create your own boot Windows CD.
May be something like Bart's Win PE?
My other question would be why the link to buy the software is different than site advertising it and also why the link to the selling site is disabled ?

advincluster
Posts: 1
Joined: 25 Mar 2013, 12:57

Re: Partition corrupted Windows Xp / Linux Ext4

#3 Post by advincluster » 25 Mar 2013, 13:00

With the help of a third party tool Kernel for Windows partition recovery software you can easily recover your corrupt and deleted windows partitions from hard disk.

Lito
Posts: 83
Joined: 08 Sep 2012, 06:58

Re: Partition corrupted Windows Xp / Linux Ext4

#4 Post by Lito » 25 Mar 2013, 14:04

It looks like I did post something in the wrong thread.
I am very sorry about that. Now about the problem with the corrupted parttion.

Might be you could save your XP boot partition using something like Redo-Backup and Recovery:

http://redobackup.org/

Also save all your important files from the other NTFS partition, either from Windows (you said that you can boot Windows) or using TestDisk to copy them. The problem is you will need another disk.
Or you could use the Minitool Partition Wizard:

http://www.partitionwizard.com/download.html
(bottom of the page- Home Edition - Local download)

to copy your XP boot partition and the other NTFS partition holding data. Same problem here: you do need another disk. Once this is done you can swap the disks to check that your XP system will boot.
The recommendation from SUSE Linux use to be that you should run FIXMBR from the Windows installation CD (you have to choose Repair pressing R, not install, when the CD boots). Windows will ask you for the Administrator password.

http://www.microsoft.com/resources/docu ... ixmbr.mspx

That will remove the damaged Grub. Next step remove your new disk with only the XP system. Replace the old disk back in the machine.

Now you can turn your attention to EXT4 partition and its data.

You can try the ideas in this page:

http://linuxexpresso.wordpress.com/2010 ... in-ubuntu/

Or you could use TestDisk to mark the offending partition as D(eleted, rescan the disk and take it from there. It all depends on how valuable the data in the EXT4 partition is to you or how much time and effort you are willing to spend.

Best of luck

FantoMax
Posts: 3
Joined: 21 Mar 2013, 22:24

Re: Partition corrupted Windows Xp / Linux Ext4

#5 Post by FantoMax » 26 Mar 2013, 20:33

Lito wrote:Just a couple of questions:
How do you start the NTFS Recovery Software if Windows does not work?
You would need another computer or you would have to create your own boot Windows CD.
May be something like Bart's Win PE?
My other question would be why the link to buy the software is different than site advertising it and also why the link to the selling site is disabled ?
The NTFS partion are fine (Primary and logical), so I can fix the MBR and made Active the primary Partition and Windows Start fine.
I normally use UBCD4win from here I can execute Testdisk, but with last UEFI/GPT-Based Hard Drive Partitions it's not good (it's not my case).

Lito
Posts: 83
Joined: 08 Sep 2012, 06:58

Re: Partition corrupted Windows Xp / Linux Ext4

#6 Post by Lito » 26 Mar 2013, 21:49

@Fantomax, that message was directed to someone that was advertising software to rescue NTFS partitions running from Windows. After I wrote my reply, the message dissapeared. I suspect the moderators removed it.
A similar message popped up later, with a different user name. I understood that your Windows was not the problem.
Only the boot sector, with a damaged Grub2.
In any case if you read in the recent posts by the author of TestDisk, Mr. Grenier, you should be aware that TestDisk does not recover Ext4 partitions.

Best of luck

Lito
Posts: 83
Joined: 08 Sep 2012, 06:58

Re: Partition corrupted Windows Xp / Linux Ext4

#7 Post by Lito » 26 Mar 2013, 21:58

I jus misquoted Mr. Grenier.
His message is here:

http://forum.cgsecurity.org/phpBB3/file ... t2147.html

What it does not is undelete files from Ext4.

It looks like is not my day.

FantoMax
Posts: 3
Joined: 21 Mar 2013, 22:24

Re: Partition corrupted Windows Xp / Linux Ext4

#8 Post by FantoMax » 28 Mar 2013, 23:43

Finally I rescued my EXT4 partition:
I used DeftLinuwx 7.2 with Testdisk 6.13.
Analyze with Deep Search option, after around 3 1/2 hours I haved this:

Code: Select all

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121602 255 63
     Partition               Start        End    Size in sectors
 * HPFS - NTFS              0   1  1 38244 254 63  614405862 [WDC_Disco_C]
 L HPFS - NTFS          38245   1  1 63741 254 63  409609242 [WDC_DSK1_VOL2]
 D HPFS - NTFS          63742   1  1 121600 254 60  929504769
 D HPFS - NTFS          63742   1  4 121600 254 63  929504769
>L Linux Swap           63742  18 21 64004  11 55    4208624
 L Linux                64004  44 41 72989  28 63  144343040
 L Linux                72989  61 33 92111 141 62  307200000
 D Linux                76240  73 58 95362 154 24  307200000
 D FAT16 >32M           92111 142 63 121600 254 63  473747842
 D Linux                118599  71  1 118600  76  4	 16384
 D Linux                118878 183 26 118879 188 29	 16384
 D Novell               119376 234  6 234707 251 51 1852793632

Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
Keys A: add partition, L: load backup, T: change type,
     Enter: to continue

SWAP2 version 1, 2154 MB / 2054 MiB
EXT4 Large file Sparse superblock, 73 GB / 68 GiB
EXT4 Large file Sparse superblock, 157 GB / 146 GiB
I set Logical the 3 linux partition and check with the option "list files" If i can see the files and this was OK.
At the end Write the MBR with this configuration and now I have this:

Code: Select all

TestDisk 6.14-WIP, Data Recovery Utility, September 2012
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

 1 * HPFS - NTFS              0   1  1 38244 254 63  614405862 [WDC_Disco_C]
 2 E extended LBA         38245   0  1 92111 254 63  865373355
 5 L HPFS - NTFS          38245   1  1 63741 254 63  409609242 [WDC_DSK1_VOL2]
   X extended             63742  17  1 64004  11 55    4208707
 6 L Linux Swap           63742  18 21 64004  11 55    4208624
   X extended             64004  43  1 72989  28 63  144343143
 7 L Linux                64004  44 41 72989  28 63  144343040
   X extended             72989  60  1 92111 141 62  307200095
 8 L Linux                72989  61 33 92111 141 62  307200000


*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
>[Quick Search]  [ Backup ]
                            Try to locate partition
Now I must align the Linux partition.
Thank you very much to Christophe GRENIER for your great tool.
Bye
Max

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests