1 (edited by Manuel 2009-11-13 18:54:24)

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

Hi to all
always same problem...

using rescuecd 1.3.1 with gparted 0.4.6

    GParted 0.4.6

    Libparted 1.9.0

    Check and repair file system (ntfs) on /dev/sda2  00:00:00    ( ERROR )
           
    calibrate /dev/sda2  00:00:00    ( SUCCESS )
           
    path: /dev/sda2
    start: 337365
    end: 165822929
    size: 165485565 (78.91 GiB)
    check file system on /dev/sda2 for errors and (if possible) fix them  00:00:00    ( ERROR )
           
    ntfsresize -P -i -f -v /dev/sda2
           
    ntfsresize v2.0.0 (libntfs 10:0:0)
    Device name : /dev/sda2
    NTFS volume version: 3.1
    Cluster size : 4096 bytes
    Current volume size: 159866536448 bytes (159867 MB)
    Current device size: 84728609280 bytes (84729 MB)
    ERROR: Current NTFS volume size is bigger than the device size!
    Corrupt partition table or incorrect device partitioning?

fdisk -l-u result

    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x70e3d797
       
    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1              63      337364      168651   de  Dell Utility
    /dev/sda2   *      337365   165822929    82742782+   7  HPFS/NTFSDisk

parted /dev/sda unit s print result

    Model: ATA WDC WD1600BJKT-7 (scsi)
    Disk /dev/sda: 312581808s
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Number  Start    End         Size        Type     File system  Flags
    1      63s      337364s     337302s     primary  fat16
    2      337365s  165822929s  165485565s  primary  ntfs         boot

I hope it's fine if I write in this thread...

2

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

Thank you Manuel for posting this problem in a new thread.  I have deleted the entry from the previous thread.  Now on to fixing the problem smile

I will need both the Master Boot Record, and the NTFS Partition Boot Record to investigate this problem.


You can capture the Master Boot Record in a file with the following command:

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

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

where sda-manuel.mbr is the name of the file that will need to be uploaded.


You can capture the NTFS Partition Boot Record in a file with the following command:

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

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

where sda2-manuel.pbr is the name of the file that will need to be uploaded.


Upload these files to a media sharing site, such as mediafire, and post the link to these files in this forum post.

3

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

pbr file http://www.mediafire.com/?mymwqzt1j22

and mbr http://www.mediafire.com/?jgjyyhht3jj

4

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

From these two files I can see the following:

165,485,565 sectors - length of partition in MBR
312,239,328 sectors - size of NTFS file system from NTFS PBR

To fix this problem I think it is safest to change the partition size to encompass the whole NTFS file system.
The change I have made to the file is from a length of 165,485,565 sectors:
000001D0   01 15 07 FE  FF FF D5 25  05 00 FD 1B  DD 09 00 00
To a new length of 312,239,329 sectors:
000001D0   01 15 07 FE  FF FF D5 25  05 00 E1 64  9C 12 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-manuel_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=sda-manuel_new.mbr of=/dev/sda bs=512 count=1

3) Reboot the computer

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

NOTE:  We are tracking a problem with GParted resizing file systems.  See post:
WARNING! Problem Resizing File Systems with GParted

5 (edited by Manuel 2009-11-13 18:57:17)

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

for me it's urgent, I try to change it...
I hope to do it right!


P.S.: I saw your reply and I see my file seems to be ok
one day to understand what you have done in less then 5 minutes!

P.P.S.: It seems to run correctly, it has to finish the second chkdsk, but I think there're no problems!

THANK YOU!