1 (edited by skin81 2010-05-26 00:13:15)

Topic: [SOLVED] Current NTFS Volume Size is bigger than the device size

Hi!
I used 0.5.2.9 GParted live to resize a NTFS partition from 120gb to 200gb.

Now ntfsresize show me this message :

ntfsresize v2.0.0 (libntfs 10:0:0)
Device name  : /dev/sda3
NTFS volume version: 3.1
Cluster size  : 4096 bytes
Current volume size : 391992164864 bytes (391993 MB)
Current device size: 210591843840 bytes (210592 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?

fdisk -l -u /dev/sda

Disco /dev/sda: 500.1 GB, 500107862016 byte
255 testine, 63 settori/tracce, 60801 cilindri, totale 976773168 settori
Unità = settori di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x0964eb36

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      821247      409600   27  Sconosciuto
/dev/sda2          835380   123700499    61432560    7  HPFS/NTFS
/dev/sda3       123700500   535012694   205656097+   7  HPFS/NTFS
/dev/sda4       535012695   976768064   220877685    5  Esteso
/dev/sda5       535012758   969185384   217086313+  83  Linux
/dev/sda6       969185448   976768064     3791308+  82  Linux swap / Solaris

parted /dev/sda unit s print

Modello: ATA FUJITSU MJA2500B (scsi)
Disco /dev/sda: 976773168s
Dimensione del settore (logica/fisica): 512B/512B
Tabella delle partizioni: msdos

Numero  Inizio      Fine        Dimensione  Tipo      File system     Flag
1      2048s       821247s     819200s     primary   ntfs            avvio
2      835380s     123700499s  122865120s  primary   ntfs
3      123700500s  535012694s  411312195s  primary   ntfs
4      535012695s  976768064s  441755370s  extended
5      535012758s  969185384s  434172627s  logical   ext4
6      969185448s  976768064s  7582617s    logical   linux-swap(v1)

MBR and PBR  : http://www.filefactory.com/file/b1d3e43/n/sda.zip

MBR :
dd if=/dev/sda of=/home/skin/sda.MBR bs=512 count=1
PBR :
dd if=/dev/sda of=/home/skin/sda.PBR bs=512 count=1 skip=63


Can you help me?

Thank you so much!!

2

Re: [SOLVED] Current NTFS Volume Size is bigger than the device size

From the output from fdisk and parted, it appears that your first NTFS partition begins at sector 2048, and not at sector 63.  Thus to capture the NTFS PBR you will need the following command:

NOTE:  Be extra careful to type this command in properly, otherwise loss of data could result.

dd if=/dev/sda of=sda1-skin81.pbr bs=512 count=1 skip=2048

where sda1-skin81.pbr is the name of the file that will need to be uploaded.

3

Re: [SOLVED] Current NTFS Volume Size is bigger than the device size

gedakc wrote:

From the output from fdisk and parted, it appears that your first NTFS partition begins at sector 2048, and not at sector 63.  Thus to capture the NTFS PBR you will need the following command:

NOTE:  Be extra careful to type this command in properly, otherwise loss of data could result.

dd if=/dev/sda of=sda1-skin81.pbr bs=512 count=1 skip=2048

where sda1-skin81.pbr is the name of the file that will need to be uploaded.

sda1-skin81_pbr : http://www.filefactory.com/file/b1db9hf … skin81_pbr

Thanks!

4

Re: [SOLVED] Current NTFS Volume Size is bigger than the device size

Based on the sda1-skin81.pbr file, it appears that the /dev/sda1 partition is okay.

Now that I reread your first post, I see that the problem arises with the /dev/sda3 partition.

Please use the following command to capture the NTFS PBR for the /dev/sda3 partition:

NOTE:  Be extra careful to type this command in properly, otherwise loss of data could result.

dd if=/dev/sda of=sda3-skin81.pbr bs=512 count=1 skip=123700500

where sda3-skin81.pbr is the name of the file that will need to be uploaded.

5

Re: [SOLVED] Current NTFS Volume Size is bigger than the device size

gedakc wrote:

Based on the sda1-skin81.pbr file, it appears that the /dev/sda1 partition is okay.

Now that I reread your first post, I see that the problem arises with the /dev/sda3 partition.

Please use the following command to capture the NTFS PBR for the /dev/sda3 partition:

NOTE:  Be extra careful to type this command in properly, otherwise loss of data could result.

dd if=/dev/sda of=sda3-skin81.pbr bs=512 count=1 skip=123700500

where sda3-skin81.pbr is the name of the file that will need to be uploaded.

Ops! You are right, sorry!
sda3-skin81_pbr : http://www.filefactory.com/file/b1dc11f … skin81_pbr

Thanks!

6

Re: [SOLVED] Current NTFS Volume Size is bigger than the device size

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 756,609,696 sectors:
00000020   00 00 00 00  80 00 80 00  E0 46 A2 2D  00 00 00 00
To a new length of 411,321,194 sectors:
00000020   00 00 00 00  80 00 80 00  42 20 84 18  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: sda3-skin81_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=sda3-skin81_new.pbr of=/dev/sda bs=512 count=1 seek=123700500

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.

7

Re: [SOLVED] Current NTFS Volume Size is bigger than the device size

gedakc wrote:

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 756,609,696 sectors:
00000020   00 00 00 00  80 00 80 00  E0 46 A2 2D  00 00 00 00
To a new length of 411,321,194 sectors:
00000020   00 00 00 00  80 00 80 00  42 20 84 18  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: sda3-skin81_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=sda3-skin81_new.pbr of=/dev/sda bs=512 count=1 seek=123700500

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.

Thank you so much gedakc ! It worked.

8

Re: [SOLVED] Current NTFS Volume Size is bigger than the device size

'Glad to hear you are up and running again.  smile

And thanks for editing the initial post and prefixing the title with SOLVED.