1 (edited by rgernon 2010-02-21 20:18:05)

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

I was using GParted 0.5.0 from SystemRescueCD 1.3.4.  I took the defaults and left the checkmark next to "round to cylinders" when I tried to expand the NTFS boot partition.

Gparted reports the Device Size (30878 MB) is smaller than the Volume size (51515 MB) and the cluster size is 4096 bytes with NTFS version 3.1.

root@sysresccd /root % fdisk -l -u

Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders, total 398297088 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x2420241f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    60308009    30153973+   c  W95 FAT32 (LBA)
/dev/sda2       100615095   398283479   148834192+   f  W95 Ext'd (LBA)
/dev/sda5       100615158   398283479   148834161    7  HPFS/NTFS

root@sysresccd /root % parted /dev/sda unit s print
Model: ATA Maxtor 6Y200P0 (scsi)
Disk /dev/sda: 398297088s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start       End         Size        Type      File system  Flags
1      63s         60308009s   60307947s   primary   ntfs         boot, lba
2      100615095s  398283479s  297668385s  extended               lba
5      100615158s  398283479s  297668322s  logical   ntfs

Here is a link to the MBR and PBR files:

http://www.mediafire.com/?sharekey=9e5e … 6b9a6e1ed0

Thanks for any help.



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 100,615,024 sectors:
00000020   00 00 00 00  80 00 80 00  70 43 FF 05  00 00 00 00
To a new length of 60,307,946 sectors:
00000020   00 00 00 00  80 00 80 00  EA 39 98 03  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-rgernon_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-rgernon_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.


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

Thank you Gedakc for the reply.  Tuesday night I downloaded the new file and installed it, and Gparted gave me different errors.  It looked like it was only saying I basically needed to run Chkdsk.  So I booted the PC with XP CD and ran chkdsk /P.  It found a couple of errors and looked happy.  I booted the PC normally and it came up perfectly.  Then Windows said it had found new hardware, and I would need to reboot for the new setting to take effect (in order to use the "new" hardware).  When I rebooted, everything went to hell in a hand-basket, again.  I will try this again soon.  If nothing else I will be able to copy stuff off the drive as a slave, or if I copy it on the first boot.

On the other hand, if I have to pursue the current error seen by GParted, how do I copy the error message from the information window?  Where is the log file when you are running it from SystemRescueCD or from Live CD?

I'm still learning Linux.  Ubuntu is cool!  cool  Thanks.



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

The following documentation should help.  It might be old, but most of it still applies.



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

Well, I am able to copy all data off the drive, which is what I wanted.  Rewriting the PBR a second time did not buy me another boot into Windows XP.

In the interests of Full Disclosure, I think my problem was complicated by other factors, one being I forgot there was a Drive Overlay program running on the PC to allow it to access a 250 GB drive (MaxBlast 3).  I do not know if this caused any problems for GParted, or the Recovery process, but I am pretty sure when I booted from the XP CD (w SP2 slipstreamed) and ran chkdsk that it corrupted a couple of XP files required for booting.  This has happened to me before.

The PC is one of the first Pentium 4 PCs with the expensive Rambus memory, and was built 3 months before XP came out:
Gateway Performance 1300 (32-bit)
Intel Pentium 4 1.3 GHz
128 MB RAM (currently 512 MB)
64 MB ATI Video (Gateway special, retail ATI was 32 MB)
USB 1.1 (no booting from USB!!!)
Diamondtron VX720 monitor (Flat Screen CRT, very cool in its day)

This all started because my son got boot virii, and I had to overwrite the boot sector, which also overwrote the MaxBlast Drive Overlay.  When I got all that fixed, I used a bad version of GParted to give him more space.  I was so close.

I will start from scratch and install Ubuntu and partition it correctly, then he will have a good second PC.  Linux is much less picky about changes made to the hardware (ex: if an IRQ changes, it will still boot).

Thanks for all the help.



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

Best wishes with your rebuild.  smile