Cylinder/Head mismatch on NTFS after GParted resize

How to use TestDisk to recover lost partition
Post Reply
Message
Author
osmorphyus
Posts: 7
Joined: 06 Aug 2015, 02:19

Cylinder/Head mismatch on NTFS after GParted resize

#1 Post by osmorphyus » 06 Aug 2015, 03:02

Hello,

Last night I used GParted to increase the size of my bootable G: partition in effort to well, have more usable space for video editing. After completing the resize "successfully" the computer will now no longer boot.

GParted has TestDisk on it. As of this time, I have wrote NOTHING to the disk in question, but have ran scans on the partition through TD in effort to find out whats going on.

I am writing this from an old Vista PIII, a whopping 512 of ram. This is my shitbox from hell, the keyboard is destroyed and I really need help rectifying my HD Partition issues.

I will now by hand, type what I wrote from the Deep Search results from TD.

Code: Select all

1]  HPFS - NTFS  |         0  |  32    |    33    |        12    |   223    |   19   |        204800
2]  HPFS - NTFS  |        12 | 223    |   19    |        25    |   159     |    5   |        204800
3]  HPFS - NTFS  |        12 | 223    |    20   |   12669    |     43    |   46   |   203323392
4]  HPFS - NTFS  |        12 | 223    |    27   |   12669    |     43    |   46   |   203323385
5]  HPFS - NTFS  |   12669 |   43    |   47    |   19457    |     53    |   52   |   109049856
6]  HPFS - NTFS  |   12669 |   43    |    54   |   19457    |     53    |   52   |   109049849


(ALL STRUCTURES REPORT OK STATUS)
1]  NTFS,    BLOCKSIZE=4096,    104 MB / 100 MB
2]   "                  "            "              "             "
3] NTFS,    BLOCKSIZE=4096,      104 GB / 96 GiB
4] NTFS FOUND USING BACKUP SECTOR,    BLOCKSIZE=4096,    104 GB / 96 GiB
5] NTFS,    BLOCKSIZE=4096,        55 GB / 51 GiB
6] NTFS FOUND USING BACKUP SECTOR,    BLOCKSIZE=4096,      55 GB / 51 GiB


BASIC ANALYZE REPORT
1]     *     HPFS-NTFS                                         0   |    32  |    33  |         12  |  223  |    19  |   204800
2]     P    HPFS-NTFS   >BAD SECTOR COUNT<    12  |   223  |    20  |   12669  |    43  |    46  |   203323392
3]     P    HPFS-NTFS   >WARNING: NUMBER OF HEADS/CYLINDERS MISMATCHES 224 (NTFS) !=255 (HD)
                                                                   12669  |   43  |   47  |   19457  |   53  |   52  |   109049856

So there's my information. I hope someone can help me with this. I look forward to hearing from someone, Thanks guys.

Sponsored links

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: Cylinder/Head mismatch on NTFS after GParted resize

#2 Post by Fiona » 06 Aug 2015, 06:43

Normally testdisk creates a log file.
You'll find it within your testdisk folder.
Can you open it using wordpad and easily copy and paste the content into your next post?
It has more significance and provides more info.
Did you have a try to list your data?
You can select a partition, and pressing p will have a try to list your data.
The disk values are not available, only partitions.
Since vista, partitions are not aligned on cylinder boundaries, but on mega byte boundaries.
So they're not Intel Standard anymore.
That's why I can't clearly judge the message ">WARNING: NUMBER OF HEADS/CYLINDERS MISMATCHES 224 (NTFS) !=255".

Fiona

osmorphyus
Posts: 7
Joined: 06 Aug 2015, 02:19

Re: Cylinder/Head mismatch on NTFS after GParted resize

#3 Post by osmorphyus » 06 Aug 2015, 07:26

Hello, and thank you for your time and reply.

I am currently booting through a very slim Gentoo distro now which also includes TD. All of my files remain in tact on my hard drive, I can view them using the "P" keystroke as well as with the Gentoo included FM.


The partition was mislabeled during the windows installation, it is actually a WIN7 system on the partition, sorry.


I will run TD again and try to gather a log file in the live enviornment. I was under the impression that since I was running live and without a mount point to the drive that I was unable to create a log file.

Thanks again, I'll post more information soon.

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: Cylinder/Head mismatch on NTFS after GParted resize

#4 Post by Fiona » 06 Aug 2015, 08:06

Windows often creates a separate boot partition called like System Reserved etc..
Boot problem differs from datarecovery.
The size of a system reserved partition is approximately 100 MB.
Might be this partition here:
1] * HPFS-NTFS 0 | 32 | 33 | 12 | 223 | 19
The star at the left side means, that your partition is active and bootable and it looks correct.
I was under the impression that since I was running live and without a mount point to the drive that I was unable to create a log file.
Yes, a live CD is read only.
If you're running testdisk from an USB key, you can check your testdisk folder for your testdisk.log.
To execute testdisk you should run:
sudo -s
testdisk
Some user used a camera and created some photos of the testdisk display in low resolution and were uploading it.
For me, your current partition structure after confirm at "Analyse" ( partition table) would be important.

Fiona

osmorphyus
Posts: 7
Joined: 06 Aug 2015, 02:19

Re: Cylinder/Head mismatch on NTFS after GParted resize

#5 Post by osmorphyus » 06 Aug 2015, 08:41

Stage one:

Code: Select all

TestDisk 6.13, Data Recovery Utility, November 2011                             
Christophe GRENIER <grenier@cgsecurity.org>                                     
http://www.cgsecurity.org                                                       
                                                                                
                                                                                
TestDisk is free data recovery software designed to help recover lost           
partitions and/or make non-booting disks bootable again when these symptoms     
are caused by faulty software, certain types of viruses or human error.         
It can also be used to repair some filesystem errors.                           
                                                                                
Information gathered during TestDisk use can be recorded for later              
review. If you choose to create the text file, testdisk.log , it                
will contain TestDisk options, technical information and various                
outputs; including any folder/file names TestDisk was used to find and          
list onscreen.                                                                  
                                                                                
Use arrow keys to select, then press Enter key:                                 
>[ Create ] Create a new log file                                               
 [ Append ] Append information to log file                                      
 [ No Log ] Don't record anything         
Stage 2

Code: Select all

Select a media (use Arrow keys, then press Enter):                              
>Disk /dev/sda - 160 GB / 149 GiB - Hitachi HTS545016B9A300                     
 Disk /dev/mapper/live-rw - 497 MB / 473 MiB                                    
 Disk /dev/sr0 - 269 MB / 257 MiB (RO) - TSSTcorp CDDVDW TS-L633M               
 Disk /dev/dm-0 - 497 MB / 473 MiB
                                                                                
>[Proceed ]  [  Quit  ]                                                         
                                                                                
Note: Disk capacity must be correctly detected for a successful recovery.       
If a disk listed above has incorrect size, check HD jumper settings, BIOS       
detection, and install the latest OS patches and disk drivers.  
Stage 3

Code: Select all

Disk /dev/sda - 160 GB / 149 GiB - Hitachi HTS545016B9A300                      
                                                                                
Please select the partition table type, press Enter when done.                  
>[Intel  ] Intel/PC partition                                                   
 [EFI GPT] EFI GPT partition map (Mac i386, some x86_64...)                     
 [Humax  ] Humax partition table                                                
 [Mac    ] Apple partition map                                                  
 [None   ] Non partitioned media                                                
 [Sun    ] Sun Solaris partition                                                
 [XBox   ] XBox partition                                                       
 [Return ] Return to disk selection

Note: Do NOT select 'None' for media with only a single partition. It's very    
rare for a drive to be 'Non-partitioned'.  
Stage 4

Code: Select all

Disk /dev/sda - 160 GB / 149 GiB - CHS 19457 255 63                             
                                                                                
>[ Analyse  ] Analyse current partition structure and search for lost partitions
 [ Advanced ] Filesystem Utils                                                  
 [ Geometry ] Change disk geometry                                              
 [ Options  ] Modify options                                                    
 [ MBR Code ] Write TestDisk MBR code to first sector                           
 [ Delete   ] Delete all data in the partition table                            
 [ Quit     ] Return to disk selection
Stage 5

Code: Select all

Disk /dev/sda - 160 GB / 149 GiB - CHS 19457 255 63                             
Current partition structure:                                                    
     Partition                  Start        End    Size in sectors             
                                                                                
 1 * HPFS - NTFS              0  32 33    12 223 19     204800                  
                                                                                
Bad sector count.                                                               
 2 P HPFS - NTFS             12 223 20 12669  43 46  203323392                  
                                                                                
Bad relative sector.                                                            
Warning: Incorrect number of heads/cylinder 224 (NTFS) != 255 (HD)              
 3 P HPFS - NTFS          12669  43 47 19457  53 52  109049856 [Vista Ultimate]
Stage 6

Code: Select all

Disk /dev/sda - 160 GB / 149 GiB - CHS 19458 255 63                             
     Partition               Start        End    Size in sectors                
>* HPFS - NTFS              0  32 33    12 223 19     204800                    
 P HPFS - NTFS             12 223 20 12669  43 39  203323385                    
 P HPFS - NTFS          12669  43 47 19457  53 45  109049849 [Vista Ultimate]
Stage 7

Code: Select all

Run DEEPER SEARCH
Stage 8

Code: Select all

It then lists the partition diagram I wrote out by hand.  If I then look at a partition with "Enter" it says on some partitions, that there is no partition data to display.  It then only provides a "Quit" button rather than a "Go back to list" button.

At this point I am left to rescan again.

How do I find the Log file, so I may post it here?

osmorphyus
Posts: 7
Joined: 06 Aug 2015, 02:19

Re: Cylinder/Head mismatch on NTFS after GParted resize

#6 Post by osmorphyus » 06 Aug 2015, 08:44

I suppose this tells it all, as see in the Bash terminal after running TD,

Code: Select all

TestDisk: Log file corrupted!

I don't know what to do now. Pretty sure I just need to fix the geometry of the disk, but I don't know how and I don't want to lose my data.

I don't have many resources available as I live in the woods. I do not have blank Cd's or DVD's, and my only USB flash drive is 128 MB. Do you know of a live USB linux that includes TD that would fit such a small drive? I have used Damn Small Linux extensively in the past, but I do not know if TD is available for such an old system.

osmorphyus
Posts: 7
Joined: 06 Aug 2015, 02:19

Re: Cylinder/Head mismatch on NTFS after GParted resize

#7 Post by osmorphyus » 07 Aug 2015, 00:10

just a polite bump...

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: Cylinder/Head mismatch on NTFS after GParted resize

#8 Post by Fiona » 07 Aug 2015, 08:25

Fixing geometry should only be used if partitions are not correct or not found.
I've already mentionned, since Vista, partitions are aligned on megabyte boundaries.
Intel partition table aligns partitions on cylinder boundaries.
That's why it can cause such messages and has mostly no significance.
As long as your partitions are found and you're able to list your files, you shouldn't change your geometry.
Now I've more info and I found something!
2 partitions in your partition table (current partition strucure) have different length.
Even if the difference is only 7 sectors.
But it can cause such behavior.
Info:
Your current partition structure:
Current partition structure:
Partition Start End Size in sectors

1 * HPFS - NTFS 0 32 33 12 223 19 204800

Bad sector count.
2 P HPFS - NTFS 12 223 20 12669 43 46 203323392

Bad relative sector.
Warning: Incorrect number of heads/cylinder 224 (NTFS) != 255 (HD)
3 P HPFS - NTFS 12669 43 47 19457 53 52 109049856 [Vista Ultimate]
And your result after Quick Search:
Disk /dev/sda - 160 GB / 149 GiB - CHS 19458 255 63
Partition Start End Size in sectors
>* HPFS - NTFS 0 32 33 12 223 19 204800
P HPFS - NTFS 12 223 20 12669 43 39 203323385
P HPFS - NTFS 12669 43 47 19457 53 45 109049849 [Vista Ultimate]
Your second and third partition in your partition table ends at sector 46 and 52.
After Quick Search, your partitions end at sector 39 and 45.
It can fix your problem?
So you should write your partitions using the menu Write in testdisk and reboot your PC.

TestDisk allows to create a backup at the menu Analyse and your current partition structure to set your partition table back to the start position.
You'll find it at the bottom of the display.
But if you cannot create a log file, you probably wouldn't be able to create a backup either?

Fiona

osmorphyus
Posts: 7
Joined: 06 Aug 2015, 02:19

Re: Cylinder/Head mismatch on NTFS after GParted resize

#9 Post by osmorphyus » 07 Aug 2015, 23:49

Fiona, Thank you for taking the time to analyse the data I entered. I will do as you suggested, using the "Write" command and touch base from there. Yes, since I cannot save a .LOG file I won't be able to save a backup.

I will write back after doing this with the results. Thank you so very much again for your time and knwoledge in this subject.

osmorphyus
Posts: 7
Joined: 06 Aug 2015, 02:19

SOLVED - Re: Cylinder/Head mismatch on NTFS after GParted re

#10 Post by osmorphyus » 08 Aug 2015, 02:03

Alright, progress update.. Fiona, your advice - WORKED! THANK YOU!

After "Writing" the partition data in TD as you suggested, I was ABLE TO BOOT into my Windows partition, once again. This was great news, but not the end of the journey. Upon getting into this boot, I had a blue screen with no icons or start menu, Windows also reported that the copy was not genuine.

This was frustrating, but a little google keyword query took me to SevenForums.com (http://www.sevenforums.com/windows-upda ... fix-3.html), which had a thread dedicated to this very issue.

Knowing that my Windows was previously installed to the G: partition, I took the advice in the forum thread and renamed various key entries before finally getting the correct key named to G: (previously the "bad-boot" was booting into an F: partition entry and later a D: entry. Renaming the D: to G: solved the issue.)

I thank you immensely for taking the time to read my partition data I entered here previously and steering me AWAY from HD Geometry. My computer is now back up and online, responsive, and making full use of the resized partition created with GParted. In the future, for Windows, I will stick with and recommend using Easeus Partition Editor within Windows, now that I have enough disk space for changing Windows Partitions.

Thank you again, Fiona. Your intelligence in this subject is highly appreciated. This journey has led me to wonder how you learned so much about these technical aspects of HD partitions, sectors, etc.

Cheers!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests