1 (edited by jeromep 2010-06-30 23:06:48)

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

Greetings,

Novice user who has used Gparted Live in the past for moving around and resizing NTFS/FAT32 partition a few times before with no problems.  I recently used Gparted to move my Windows 7 NTFS partition and then I guess the software wanted to automatically resize it down ~1 MB.  I ran the move and resize in 'fault protection mode' and the test run went fine.  However, after the actual move, I received the error "Current NTFS Volume size is bigger than the device size.

Another issue I ran into is I am not able to use the mouse in VM Ware Fusion.  I can use keyboard commands ok, but the mouse moves around the screen, but the alignment appears to be off.  Any ideas on this?

Gparted Live v 0.6.0-1
VM Ware Fusion 3.0

I researched the tutorials on this forum and I am not familiar with UNIX commands, but I think I have managed to stumble my way through it.
Here it the data I have gathered after running fdisk -l -u and dev/sda unit s print

NTFS partition starts on sector 2048
I took the existing size of 440725504 -1 = 440725503.
Then I converted 440725503 to HEX using an web page util; then took the inverse of that result.
Old Hex values:  A0 F6 44 1A
New Hex values: FF EF 44 1A
*** Please let me know if this calculation is correct or not.

I then used hexedit to modify the HEX values on line 20 and saved the new .pbr file

I saved the following files to the following FTP;

http://www.mediafire.com/?sharekey=116b … a77d7aad89
sda-jerome.mbr (original .mbr file)
sda1-jerome.pbr.bak (original .pbr file before I edited the HEX Values)
sda1-modifiedjerome.pbr (modified .pbr after I edited the HEX Values)


Provided the modified .pbr file is correct, I just need to enter the following command;

dd if=/tmp/usb/modifiedjerome.pbr of=/dev/sda1 bs=512 count=1 seek=2048

Do I need to make any changes to the .mbr file?

Thanks for your help,

Jerome

2

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

jeromep wrote:

Another issue I ran into is I am not able to use the mouse in VM Ware Fusion.  I can use keyboard commands ok, but the mouse moves around the screen, but the alignment appears to be off.  Any ideas on this?

Perhaps "guestOS" is set to "Windows" instead of "Linux" in your *.vmx configuration file?

jeromep wrote:

Provided the modified .pbr file is correct, I just need to enter the following command;

dd if=/tmp/usb/modifiedjerome.pbr of=/dev/sda1 bs=512 count=1 seek=2048

Do I need to make any changes to the .mbr file?

Based on your description, the above command appears correct.  You do not need to make any changes to the .mbr file.

If the calculation is incorrect, we can always restore the original .pbr file and start again with the calculations.

3 (edited by jeromep 2010-06-27 17:50:59)

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

Unfortunately, it appears that process didn't work. sad  Still getting NTFS errors. So I am going to admit defeat and start over from square one and hopefully you can guide me through the process step by step.  I thought I had the process down.  Perhaps I made the wrong HEX calculations.

I have restored the original .pbr file and here is the data from the fdisk and parted cmds;


fdisk -l -u

Disk /dev/sda: 320.1 GB, 320111447040 bytes

255 heads, 63 sectors/track, 38918 cylinders, total 625217670 sectors

Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x1d8d3f8e


   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *        2048   440727551   220362752    7  HPFS/NTFS


Partition 1 has different physical/logical endings:
     phys=(975, 254, 63) logical=(976, 0, 48)


parted /dev/sda unit s print

Model: VMware, VMware Virtual S (scsi)

Disk /dev/sda: 625217670s

Sector size (logical/physical): 512B/512B

Partition Table: msdos


Number  Start  End         Size        Type     File system  Flags

1      2048s  440727551s  440725504s  primary  ntfs         boot

4

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

I double checked your calculation, and the values you entered for the modified PBR are correct.

What types of errors are you receiving in your NTFS file system?

5 (edited by jeromep 2010-06-27 22:49:24)

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

Interesting...

I have re-applied the modified .pbr file and the error in Gparted is;

Current NTFS volume size is bigger than the device size.
Current volume size 225652326912 (225653 MB)
Current Device size 22561458048 (225652 MB)

First Sector 2048
Last sector 440727551
Total sectors 440725504


Gparted screenshots here (gparted.dmp and gparted2.dmp);
http://www.mediafire.com/?sharekey=116b … a77d7aad89

6 (edited by jeromep 2010-06-28 18:42:59)

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

Not sure if this helps or not, but I ran the fdisk and parted commands after I applied the modified .pbr file.  However, it still shows the size as 440725504, NOT 440725503.  I've followed the steps exactly, I've verified that I am applying the modified .pbr file with the HEX values changed. When I execute the cmd, it says 1 file in 1 file out 512 MB copied.  So it appears it IS actually copying, but the size is not changing. 

Any ideas?

I'm almost ready to give up and just re-migrate the data over to a new virtual machine. However, I don't want to admit defeat -- I want to learn how to do this process and succeed.


Thanks!

7

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

jeromep wrote:

Provided the modified .pbr file is correct, I just need to enter the following command;

dd if=/tmp/usb/modifiedjerome.pbr of=/dev/sda1 bs=512 count=1 seek=2048

Aha!  This is where the problem is!  The device to write to should be /dev/sda.

/dev/sda1 is the first partition.  If we were to write to this device then the seek parameter would be 0.

As it stands we have overwritten one sector in the partition.  This sector might have been empty, might have contained metadata for the file system, or might have contained your data.  Hopefully nothing important has been lost.

The command that should be used is:

dd if=/tmp/usb/modifiedjerome.pbr of=/dev/sda bs=512 count=1 seek=2048

8

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

EXCELLENT!  That seems to have been the problem. Good news is this was a newly created VM and the data I migrated over is still in tact on a separate physical machine.

So now I will start the entire process over again (NTFS Resizing, and should be able to execute the proper commands this time around) with no data loss.

Is this NTFS resizing problem a bug in the newer versions of Gparted Live?  Should I use an older version to prevent this from happening again?


Thanks for your help -- I'll let you know how it goes the second time around.

9

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

I am glad to hear that that was indeed the problem.

Unfortunately, the NTFS resizing problem might occur with any version of libparted after 1.8.8.  At least that has been our findings while tracking this problem.  Later versions of libparted contain code to help minimize the problem, but a definitive cure has not yet been found or implemented.

We are tracking this issue in the following post:
WARNING! Problem Resizing File Systems with GParted

If your situation is now resolved, would you consider editing the initial post to prefix SOLVED in front of the title?

10 (edited by jeromep 2010-06-30 07:32:07)

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

jeromep wrote:

EXCELLENT!  That seems to have been the problem. Good news is this was a newly created VM and the data I migrated over is still in tact on a separate physical machine.

So now I will start the entire process over again (NTFS Resizing, and should be able to execute the proper commands this time around) with no data loss.

Is this NTFS resizing problem a bug in the newer versions of Gparted Live?  Should I use an older version to prevent this from happening again?


Thanks for your help -- I'll let you know how it goes the second time around.

Much better second time around and knew exactly what to do.  Thanks for the help.

Can't figure out how to edit my thread title....steps to do this?

11

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

At the bottom of your first post in this thread there is a line that reads:
"Report   Delete   Edit   Reply   Quick quote"

If you click on the "Edit" link, then the original message should be displayed and also the title of the post.  You can then prefix SOLVED in front of the title and save/submit the post.  smile

12

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

gedakc wrote:

At the bottom of your first post in this thread there is a line that reads:
"Report   Delete   Edit   Reply   Quick quote"

If you click on the "Edit" link, then the original message should be displayed and also the title of the post.  You can then prefix SOLVED in front of the title and save/submit the post.  smile

Great, it worked.  Thanks for all your help.