1 (edited by michio 2009-12-19 06:39:44)

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

Seems to be the same problem as others, a bit of a newbie so apologies in advance.

I was trying to reduce my 150gb drive with XP to 100 and create a new 50gb ntfs primary partition.

I'm having problems with sda1, saved the error message on mediafire (see link at bottom).
I used the latest version of GParted (0.5.0-3), downloaded on 12-dec-2009.


fdisk -l -u

root@debian:~# fdisk -l -u

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: 0xbf3dbf3d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   207543734   103771836    7  HPFS/NTFS
/dev/sda2       207543735   312576704    52516485    7  HPFS/NTFS

Disk /dev/sdb: 2032 MB, 2032664576 bytes
255 heads, 63 sectors/track, 247 cylinders, total 3970048 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x0008fb51

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     3970047     1984992+   e  W95 FAT16 (LBA)
Partition 1 has different physical/logical endings:
     phys=(246, 254, 63) logical=(247, 31, 40)

Disk /dev/sdc: 2000 MB, 2000682496 bytes
64 heads, 63 sectors/track, 969 cylinders, total 3907583 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1             129     3907007     1953439+   6  FAT16
root@debian:~#

parted /dev/sda unit s print

root@debian:~# parted /dev/sda unit s print
Model: ATA ST3160827AS (scsi)
Disk /dev/sda: 312581808s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start       End         Size        Type     File system  Flags
 1      63s         207543734s  207543672s  primary  ntfs         boot
 2      207543735s  312576704s  105032970s  primary  ntfs

root@debian:~#

mbr, pbr, and screen captures of the error message in GParted and the drives list in GParted, all stored on mediafire.com:
http://www.mediafire.com/?sharekey=85a7 … 767de0ad64

Let me know if there is anything else I can provide to help as I'd love to get my computer back.

Thanks in advance for any help!

2

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 312,576,632 sectors:
00000020   00 00 00 00  80 00 80 00  78 8A A1 12  00 00 00 00
To a new length of 207,543,671 sectors:
00000020   00 00 00 00  80 00 80 00  77 DD 5E 0C  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: sda1-michio_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=sda1-michio_new.pbr of=/dev/sda bs=512 count=1 seek=63

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.

3

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

Thanks!!! Still got a yellow error box in GParted (complained about sectors not matching up), but seems to started up again fine and chkdsk /f /r ran smoothly, so willing to call it solved.  Thanks again, especially for the quick turnaround!

4

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

The "chkdsk /f /r" should hopefully have taken care of the yellow error box shown in GParted.

I am glad to hear that the problem is now solved.  smile

And thanks for marking the initial post as solved.