1 (edited by z3r0x 2010-06-27 06:26:33)

Topic: [SOLVED]Current NTFS Volume Size is bigger than the device size

Hey everyone,

I was trying to shrink my external hard drive from 750GB ntfs partition to around 650GB. After running the program I got the error "Current NTFS volume size is bigger than the device size". I'm really new to this so I'm not sure what I'm supposed to do now. I tried looking around the forums and I think I'm supposed to provide this info

fdisk -l -u:

Disk /dev/sdb: 750.2GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/0 size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x0002abe3

       Device Boot          Start                 End                Blocks                  Id          System
/dev/sdb1                   8192           1221941247         610966528          7          HPFS/NTFS



parted /dev/sdb unit s print:

Model: Seagate FreeAgent Pro (scsi)
Disk /dev/sdb: 1465149168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number    Start      End                      Size                     Type         File system  Flags
1             8192s    1221941247s      1221933056s       Primary

I'm using GParted live 0.6.0

2

Re: [SOLVED]Current NTFS Volume Size is bigger than the device size

You've got the first step done correctly.  smile

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

It is interesting to note that your drive is recognized as /dev/sdb, instead of /dev/sda.  When performing the following commands, it would be good to check to see if your drive is still recognized as /dev/sdb.  If not you will need to alter the commands to reflect the correct device.

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/sdb of=sdb-z3r0x.mbr bs=512 count=1

where sdb-z3r0x.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/sdb of=sdb1-z3r0x.pbr bs=512 count=1 skip=8192

where sdb1-z3r0x.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, and post the link to these files in this forum post.

3

Re: [SOLVED]Current NTFS Volume Size is bigger than the device size

Here is my mbr file

http://www.mediafire.com/?yzjmzydwzda

Here is my pbr file

http://www.mediafire.com/?3n2z4mtyzwi

4

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 1,465,143,992 sectors:
00000020   00 00 00 00  80 00 80 00  B8 52 54 57  00 00 00 00
To a new length of 1,221,933,055 sectors:
00000020   00 00 00 00  80 00 80 00  FF 37 D5 48  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: sdb1-z3r0x_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=sdb1-z3r0x_new.pbr of=/dev/sda bs=512 count=1 seek=8192

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.

5

Re: [SOLVED]Current NTFS Volume Size is bigger than the device size

My drive is up and running again big_smile Thank you so much gedakc!!

6

Re: [SOLVED]Current NTFS Volume Size is bigger than the device size

Glad to hear you are up and running again.  smile