1 (edited by silv3r 2011-03-24 18:37:17)

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

Please help. I cannot boot into my /dev/sda2 (win7 ntfs) partition. This occurred when I attempted to shrink sda2 to create a new partition.

1)  Which partition is experiencing the error?
* /dev/sda2
2)  Which version of GParted or Live CD you used?
* Gparted 0.5.1 from Knoppix Live CD
3)  The output from the following two commands:
root@Microknoppix:~# fdisk -l -u

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x3f33aedf

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2          206848   894852629   447322891    7  HPFS/NTFS

Disk /dev/sdb: 2003 MB, 2003795968 bytes
32 heads, 63 sectors/track, 1941 cylinders, total 3913664 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x5d5d7ddc

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     3913055     1956496+   c  W95 FAT32 (LBA)

root@Microknoppix:~# parted /dev/sda unit s print
Model: ATA WDC WD5000BEVT-2 (scsi)
Disk /dev/sda: 976773168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start    End         Size        Type     File system  Flags
1      2048s    206847s     204800s     primary  ntfs         boot
2      206848s  894852629s  894645782s  primary  ntfs

2

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

Next we will need copies of the Master Boot Record and the NTFS Partition Boot Record.

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-silv3r.mbr bs=512 count=1

where sda-silv3r.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-silv3r.pbr bs=512 count=1 skip=206848

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


Then upload these files to a media sharing site, such as mediafire or filefactory, and post the link to these files in this forum post.

3

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

Thanks for the quick reply. Here it is...

http://www.mediafire.com/file/0l2y42is9 … silv3r.mbr
http://www.mediafire.com/file/unwm7h10r … silv3r.pbr

4

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

one more info that you might find useful. When I do a "check" for /dev/sda1 in gparted it's ok. But when I try to do it in /dev/sda2 it show's this error.
The exclamation point symbol is only shown in /dev/sda2.

GParted 0.5.1

Libparted 1.8.8.git-dirty
Check and repair file system (ntfs) on /dev/sda2  00:00:02    ( ERROR )
        
calibrate /dev/sda2  00:00:01    ( SUCCESS )
        
path: /dev/sda2
start: 206848
end: 894852629
size: 894645782 (426.60 GiB)
check file system on /dev/sda2 for errors and (if possible) fix them  00:00:01    ( 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: 500000879104 bytes (500001 MB)
Current device size: 458058640384 bytes (458059 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?

5

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 976,564,216 sectors:
00000020   00 00 00 00  80 00 80 00  F8 2F 35 3A  00 00 00 00
To a new length of 894,645,781 sectors:
00000020   00 00 00 00  80 00 80 00  15 36 53 35  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: sda2-silv3r_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=sda2-silv3r_new.pbr of=/dev/sda bs=512 count=1 seek=206848

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.

For future partition editing (and to avoid the problem you encountered), we highly recommend a newer version of GParted such as that contained on the most recent GParted Live image (0.8.0-5).

6

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

Thanks gedakc!!! It worked! I've downloaded the latest gparted version now smile

7

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

'Glad to hear that you are back up and running.  smile

And thanks also for editing the initial post to prefixed SOLVED in front of the title.  This can help others searching for solutions to the same problem.