1 (edited by bishopolis 2010-01-02 22:41:02)

Topic: [SOLVED] GParted 0.4.5 NTFSResize bug "Current NTFS volume size" bug

Stop me if you've heard this one before:  So I was resizing the wife's desktop machine, with only a partial backup, since I wanted to convert it easily into an ESX4i machine from a USB boot, and use the last 1/3 of the SATA HDD as hopefully local storage.  So I'm not smart enough to do a full backup despite warnings, and I resized the C: on the box, and XPProSP2 totally bluescreened and rebooted on boot.  And then I cursed such that, had a passing infantryman heard me he'd be instantly moved and would buy me booze in support.  Sadly, there was none.

The bizarre promise of a magic fix with only the cost of a few diagnostic commands has calmed me, and I've regged and am posting now with so much hope.  I'm on GParted 045, it seems, off the live CD, if it's any added help.

Here's my offering:

ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 320062059008 bytes (320063 MB)
Current device size: 215091039744 bytes (215092 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?

and

root@PartedMagic:~# fdisk -u -l

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
Disk identifier: 0x40ceeb45

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   420099749   210049843+   7  HPFS/NTFS

and

root@PartedMagic:~# parted /dev/sda unit s print
Model: ATA SAMSUNG HD321LJ (scsi)
Disk /dev/sda: 625142448s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End         Size        Type     File system  Flags
 1      63s    420099749s  420099687s  primary  ntfs         boot 

Oh gurus of the hidden mysteries partitioned off from normal sight, should I begin fleeing now, or is my situation one from which I can be saved?  I should mention that my wife's red hair and vivid green eyes warn passers-by as to her strong Scottish bloodline, true but for the barest of Irish influences; rather like vivid fauna markings in nature, really.  If I can end with "but these nice people saved the machine and your newborn nephew's pictures," I'll be your best friend forever.

2

Re: [SOLVED] GParted 0.4.5 NTFSResize bug "Current NTFS volume size" bug

You situation is recoverable.  smile

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

where sda-bishopolis.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=sda1-bishopolis.pbr bs=512 count=1 skip=63

where sda1-bishopolis.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] GParted 0.4.5 NTFSResize bug "Current NTFS volume size" bug

Well that's a relief.  She's really quite lovely, you know.  She likes Siamese cats too -- who'd've thought?

I've got crunchy MBR and PBR goodness here:

http://www.datafilehost.com/download-265f7d51.html (MBR)
http://www.datafilehost.com/download-4187b98d.html (PBR)

If you can indeed dig me out of this hole, it'll be a great day.

- bish

4

Re: [SOLVED] GParted 0.4.5 NTFSResize bug "Current NTFS volume size" bug

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 625,121,208 sectors:
00000020   00 00 00 00  80 00 80 00  B8 97 42 25  00 00 00 00
To a new length of 420,099,686 sectors:
00000020   00 00 00 00  80 00 80 00  66 36 0A 19  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-bishopolis_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-bishopolis_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.

5

Re: [SOLVED] GParted 0.4.5 NTFSResize bug "Current NTFS volume size" bug

Success!  A chkdsk or two and it's right as rain.  Phew.

So, have you seen a release that's immune to this glitch?  I can't follow fora like usenet, and wasn't sure if the fix for this bug hit production.  I'll be wanting to update my tools, and hopefully not see this one again.

Thanks a heap for the help!

6

Re: [SOLVED] GParted 0.4.5 NTFSResize bug "Current NTFS volume size" bug

I am glad to hear that your NTFS file system is working again.  smile

To help other users with searches on this forum, would you be able to edit your initial post and prefix the title with "SOLVED"?

As for your question, unfortunately there is no fix yet.  The problem appears to crop up with newer GNU/Linux distributions and any version of the GParted application.

We are tracking this problem with resizing file systems in the following forum post:
WARNING! Problem Resizing File Systems with GParted

7

Re: [SOLVED] GParted 0.4.5 NTFSResize bug "Current NTFS volume size" bug

Remove password when entering a NTFS partition while in Ubuntu?
Currently, I am using a dual-boot system running Vista and Ubuntu. I have a 320 GB hardrive in this laptop I'm using. The drive has 4 partitions.
Partition 1: Toshiba Recovery Partition(Partition with the information to recover my computer and such. When I bought my laptop, this partition was already there.)
Partition 2:Vista
Partition 3:Ubuntu
Partition 4: This is a "shared folder" i made to share my music between Vista and Ubuntu so I won't have doubles of my music collection on Vista and Ubuntu.
Also, I made Vista access this partition for music. I made this NTFS partition using GParted.

While using Ubuntu, I made Songbird get music from Partition 4 but everytime I log out then log in again, Songbird said something that it can't acess this partition so I went to open this partition and had to enter the my Ubuntu password to access it and allow songbird to access the music there.

So, how do I remove this password from Ubuntu so Songbird on Ubuntu can access the music there without having to always enter my Ubuntu password?

Thanks in advance. Linux FTW.

Melanie H. McCormick

8

Re: [SOLVED] GParted 0.4.5 NTFSResize bug "Current NTFS volume size" bug

MelanieMcCormick, please create a new post for your issue.  This post is already solved.