Page 1 of 1

Partition corrupted Windows Xp / Linux Ext4

Posted: 21 Mar 2013, 22:44
by FantoMax
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

Re: Partition corrupted Windows Xp / Linux Ext4

Posted: 25 Mar 2013, 12:49
by Lito
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 ?

Re: Partition corrupted Windows Xp / Linux Ext4

Posted: 25 Mar 2013, 13:00
by advincluster
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.

Re: Partition corrupted Windows Xp / Linux Ext4

Posted: 25 Mar 2013, 14:04
by Lito
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

Re: Partition corrupted Windows Xp / Linux Ext4

Posted: 26 Mar 2013, 20:33
by FantoMax
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).

Re: Partition corrupted Windows Xp / Linux Ext4

Posted: 26 Mar 2013, 21:49
by Lito
@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

Re: Partition corrupted Windows Xp / Linux Ext4

Posted: 26 Mar 2013, 21:58
by Lito
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.

Re: Partition corrupted Windows Xp / Linux Ext4

Posted: 28 Mar 2013, 23:43
by FantoMax
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