1 (edited by tuxfusion 2009-12-12 19:59:34)

Topic: [SOLVED] Current NTFS volume size is bigger than the device size!

Hello all,
i resized my only NTFS partition (sda2) with gparted and created antother ext4 (sda3) behind it .
You may guess what happened.

ERROR: Current NTFS volume size is bigger than the device size!<br />Corrupt partition table or incorrect device partitioning?

Unbootable, unmountable, BSOD etc.

Is latest gparted buggy or why is there so many posts with this issue ?

I tried to follow other posts and hex edit the pbr myself but i'm not getting the right numbers like in the other threads. I don't understand enough of sectors or hex'ing to do it myself i guess.
If someone could alter my pbr please ? Very frustrating  : (

The numbers :

fdisk -l -u /dev/sda

Platte /dev/sda: 320.1 GByte, 320071851520 Byte
255 Köpfe, 63 Sektoren/Spuren, 38913 Zylinder, zusammen 625140335 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Disk identifier: 0x46c046bf

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sda1              63   502256159   251128048+  83  Linux
/dev/sda2   *   502256160   584171594    40957717+   7  HPFS/NTFS
/dev/sda3       584171595   625137344    20482875   83  Linux

parted /dev/sda unit s print

Modell: ATA SAMSUNG HD322HJ (scsi)
Festplatte  /dev/sda:  625140335s
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: msdos

Nummer  Anfang      Ende        Größe       Typ      Dateisystem  Flags
 1      63s         502256159s  502256097s  primary  ext4
 2      502256160s  584171594s  81915435s   primary  ntfs         boot
 3      584171595s  625137344s  40965750s   primary  ext4

dd if=/dev/sda of=sda2-tux.pbr bs=512 count=1 skip=502256160

http://tuxfusion.de/storage/sda2-tux.pbr

dd if=/dev/sda of=sda-tux.mbr bs=512 count=1

http://tuxfusion.de/storage/sda-tux.mbr


Thanks in advance !

Steffen

2

Re: [SOLVED] Current NTFS volume size is bigger than the device size!

UPDATE:
I got impatient :
deleted partition 3
deleted partiton 2
recreated partition 2 with old size before resizing
fixed

Would still like to know how / what number i had to hammer into pbr to fix it

3

Re: [SOLVED] Current NTFS volume size is bigger than the device size!

From your MBR file, the size of the second partition is 81,915,435 sectors.
From your PBR file, the size of the NTFS volume is 122,881,176.

Since you already have another partition after the second partition, the safest route would be to decrease the NTFS volume size to fit within the 2nd partition.

The hex editing required for the NTFS PBR was:

Change from a length of 122,881,176 sectors:
00000020   00 00 00 00  80 00 80 00  98 04 53 07  00 00 00 00
To a new length of 81,915,434 sectors:
00000020   00 00 00 00  80 00 80 00  2A EE E1 04  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.

The trick with Intel x86 hex numbers is to reverse the order.

4

Re: [SOLVED] Current NTFS volume size is bigger than the device size!

tuxfusion wrote:

Is latest gparted buggy or why is there so many posts with this issue ?

There are at least two situations that cause problems with GParted.  You can see both bug reports listed in the News section of the GParted web site.

The first bug was tracked down to patches required for parted-1.9.0 when it is used with newer Linux kernels (and any version of GParted).

The second bug is still under investigation and we have not been able to reliably reproduce it.

5

Re: [SOLVED] Current NTFS volume size is bigger than the device size!

Thank you , Sir.

Reverse the order , that explains  smile

I wish you guys good luck with bug squashing/updating !