1 (edited by coralisigns 2010-06-02 10:01:38)

Topic: [SOLVED] Problem with NTFS partition after resize

Hi,
I used 0.5.2 GParted to resize a NTFS partition from 1000gb to 500gb.

# ntfsresize --info --force /dev/sdb1

ntfsresize v2.0.0 (libntfs 10:0:0)
Device name        : /dev/sdb1
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 475914662400 bytes (475915 MB)
Current device size: 475913652224 bytes (475914 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?

# fdisk -l -u /dev/sdb

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xfd12ffa3

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   929520899   464759426    7  HPFS/NTFS

# sudo parted /dev/sdb unit s print

Model: WD 10EADS External (scsi)
Disk /dev/sdb: 1953525168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start    End                Size               Type      File system  Flags
1           2048s  929520899s  929518852s  primary  ntfs

MBR # dd if=/dev/sdb of=sdb-coralisigns.mbr bs=512 count=1
PBR # dd if=/dev/sdb of=sdb-coralisigns.pbr bs=512 count=1 skip=2048

Download link: http://dl.dropbox.com/u/5327639/sdb-coralisigns.tgz

Thanks in advance,

Kyriakos Bellios

2

Re: [SOLVED] Problem with NTFS partition after resize

Since you were trying to shrink the partition, we will decrease the NTFS volume size to fit within the partition.

The change I have made to the file is from a length of 929,520,824 sectors:
00000020   00 00 00 00  80 00 80 00  B8 5C 67 37  00 00 00 00
To a new length of 929,518,851 sectors:
00000020   00 00 00 00  80 00 80 00  03 55 67 37  00 00 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 NTFS PBR: sdb1-coralisigns_new.pbr

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

dd if=sdb1-coralisigns_new.pbr of=/dev/sdb bs=512 count=1 seek=2048

3) Reboot the computer

4) Check that the file system is recognized in GParted

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

3

Re: [SOLVED] Problem with NTFS partition after resize

Thank you very much gedakc. I' m up and running again !!. Problem solved.

4

Re: [SOLVED] Problem with NTFS partition after resize

It is good to hear that you are back up and running.  :-)

Thanks also for editing your initial post and prefixing the title with SOLVED.