1

Topic: NTFS resize issue

Hello,

I'm having the NTFS problem again - read the previous posts, and attached the relevant files below.

http://www.mediafire.com/?sharekey=967a … fef9ed9be3

In this case, I have what was a single NTFS drive w/ WinXP on it that I am trying to shrink so I can fit ubuntu on the drive as well. I'm using 150Gb of 320, and defragmented, but I could only successfuly get 30Gb off the end of the drive. However, that makes WinXP give me the BSOD and Gparted can't resize the partition back to the original size.

Could someone help with fixing the MBP/PBR, and how I can get a big chunk of space on my ubuntu partition? I don't have a spare drive to put all the data on to it...

Thanks!
Alex

2

Re: NTFS resize issue

It would help if you would save and post the gparted_details.htm file so that we can see the error message when you try to resize the partition back to the full partition size.

Which previous posts are you referring to?  It would help if you place links to the relevant posts in this post.

3 (edited by Alex36 2009-11-10 02:59:31)

Re: NTFS resize issue

Sorry - I forgot to reference the previous threads. There are a few similar ones, but this latest thread is basically the same problem:

http://gparted-forum.surf4.info/viewtopic.php?id=13757
  (in particular, I think the same thing you did on post #8 is what I need for my system - but I have no clue how to read MBRs)
I'm also using the latest version of Gparted (download ISO today)

The error in Gparted is (summarized):
ntfsresize -P -i -f -v /dev/sda1
ntfs , libntfs 10:0:0
Device name: /dev/sda1
NTFS volume version 3.1
Cluster size 4096
Current volume size: 320070283776 bytes (320071MB)
Current device size: 289340642304 bytes (289341MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?

4

Re: NTFS resize issue

It appears that the NTFS volume size is indeed larger than the partition size.

565,118,442 - length in sectors of partition 1
625,137,272 - length in sectors of NTFS volume size

Since it is not apparent which value is correct, I think it is safer if we increase the partition size to encompass the entire NTFS volume.

The change I have made to the file is from a length of 565,118,442 sectors:
000001C0   01 00 07 FE  FF FF 3F 00  00 00 EA 05  AF 21 00 00
To a new length of 625,137,273 sectors:
000001C0   01 00 07 FE  FF FF 3F 00  00 00 79 D6  42 25 00 00

Note:  The NTFS volume size is always 1 sector less than the total number of sectors in the partition table entry because the NTFS backup sector is not considered part of the NTFS volume.

To apply this change:

1)  Download the new mbr: sda_new.MBR

2) Load the new MBR on your hard disk.
NOTE:  Be extra careful when entering the commands.  Data loss could result otherwise.

dd if=/path-to-file/sda_new.MBR of=/dev/sda bs=512 count=1

3)  Let "GParted" CHECK the partition again.

4)  If all seems fine then I would advise running "chkdsk /f /r" multiple times, until there are no more faults.

Also if you know a set of steps to recreate this problem then I would like to hear them.  So far I have been unable to recreate this problem where suddenly the "NTFS volume size is bigger than the device size".