1 (edited by cjosh 2011-04-17 07:13:03)

Topic: Error: Current NTFS Volume Size is Bigger Than The Device Size

Hi, I've seen a few of these posts around and I'm assuming the fix is different for each person, so here's mine:
http://img811.imageshack.us/i/screenshotgq.png
It's the D partition that seems to be the problem after trying to create the partition under it.
v 0.7.0

fdisk -l -u displays

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x76692ca8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    30716279    15357116   1c  Hidden W95 FAT32 (LBA)
/dev/sda2        30716280   186996599    78140160    7  HPFS/NTFS
/dev/sda3       186996661   625135615   219069477+   5  Extended
/dev/sda5       186996663   541937590   177470464    7  HPFS/NTFS
/dev/sda6       583139328   614899711    15880192   83  Linux
/dev/sda7       614901760   625135615     5116928   82  Linux swap / Solaris

and the parted /dev/sda s print  displays

Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
Apply COMMANDs with PARAMETERS to DEVICE.  If no COMMAND(s) are given, run in
interactive mode.

OPTIONs:
  -h, --help                      displays this help message
  -l, --list                      lists partition layout on all block devices
  -m, --machine                   displays machine parseable output
  -s, --script                    never prompts for user intervention
  -v, --version                   displays the version
  -a, --align=[none|cyl|min|opt]  alignment for new partitions

COMMANDs:
  align-check TYPE N                        check partition N for TYPE(min|opt)
        alignment
  check NUMBER                             do a simple check on the file system
  cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER   copy file system to another partition
  help [COMMAND]                           print general help, or help on
        COMMAND
  mklabel,mktable LABEL-TYPE               create a new disklabel (partition
        table)
  mkfs NUMBER FS-TYPE                      make a FS-TYPE file system on
        partition NUMBER
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
  mkpartfs PART-TYPE FS-TYPE START END     make a partition with a file system
  move NUMBER START END                    move partition NUMBER
  name NUMBER NAME                         name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]     display the partition table,
        available devices, free space, all found partitions, or a particular
        partition
  quit                                     exit program
  rescue START END                         rescue a lost partition near START
        and END
  resize NUMBER START END                  resize partition NUMBER and its file
        system
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition
        NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and
        copyright information of GNU Parted

2

Re: Error: Current NTFS Volume Size is Bigger Than The Device Size

Hi cjosh.  You are correct that the fix is specific to each individual situation.

The correct command for parted is:

parted /dev/sda unit s print

I think you simply missed the keyword "unit".   wink

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

where sda-cjosh.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=sda5-cjosh.pbr bs=512 count=1 skip=186996663

where sda5-cjosh.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 (edited by cjosh 2011-04-17 20:14:28)

Re: Error: Current NTFS Volume Size is Bigger Than The Device Size

Oh, my bad. Here's the correct one:

Model: ATA ST9320325AS (scsi)
Disk /dev/sda: 625142448s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start       End         Size        Type      File system     Flags
 1      2048s       30716279s   30714232s   primary   fat32           boot, hidden, lba
 2      30716280s   186996599s  156280320s  primary   ntfs
 3      186996661s  625135615s  438138955s  extended
 5      186996663s  541937590s  354940928s  logical   ntfs
 6      583139328s  614899711s  31760384s   logical   ext4
 7      614901760s  625135615s  10233856s   logical   linux-swap(v1)

And here are the files: http://www.mediafire.com/?9wb9qfl0k8bsc7r

4

Re: Error: Current NTFS Volume Size is Bigger Than The Device Size

The NTFS PBR appears to be mostly blank, which I find unusual.  Still let's try the following steps to try to get the NTFS partition size to fit within the partition.  You already have a backup of the NTFS PBR that we can restore if need be.

The change I have made to the file is from a length of 396,018,251 sectors:
00000020   00 00 00 00  80 00 00 00  4B C2 9A 17  00 00 00 00
To a new length of 354,940,927 sectors:
00000020   00 00 00 00  80 00 00 00  FF F7 27 15  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: sda5-cjosh_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=sda5-cjosh_new.pbr of=/dev/sda bs=512 count=1 seek=186996663

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.