1 (edited by gedakc 2010-04-07 17:09:50)

Topic: SOLVED - Seem to have been bitten by the ntfs resize bug

Hello there, I'm currently writing this from the gparted livecd smile

I seem to have been bitten by the ntfs resizing issue with libparted in Fedora 12. I really need a hand here as I'm not entirely comfortable working around the Dell's diagnostic and utility partitions.

As discussed at http://gparted-forum.surf4.info/viewtopic.php?id=13777, the following is my geometry:

parted /dev/sda unit s print
Model: ATA ST31000528AS (scsi)
Disk /dev/sda: 1953525168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start        End          Size        Type      File system  Flags
 1      63s          128519s      128457s     primary   fat16
 2      129024s      31586303s    31457280s   primary   ntfs
 3      31586304s    981202004s   949615701s  primary   ntfs         boot
 4      981202005s   1953520064s  972318060s  extended
 5      981202068s   981611667s   409600s     logical
 6      1015042934s  1953518452s  938475519s  logical                lvm

http://www.users.on.net/~motk/ohno.jpg

Unfortunately, I braino'd my way through parted warnings about the kernel not acknowleding new partition info - gparted et al has always work well for me in the past and that message is not uncommon sad

Edit: Might as well show an image of my gparted screen also.

http://www.users.on.net/~motk/ohno2.jpg

2

Re: SOLVED - Seem to have been bitten by the ntfs resize bug

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

where sda-snerd.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=sda3-snerd.pbr bs=512 count=1 skip=31586304

where sda3-snerd.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 - Seem to have been bitten by the ntfs resize bug

Thanks for responding!

http://www.users.on.net/~motk/sda3-snerd.pbr
http://www.users.on.net/~motk/sda-snerd.mbr

4

Re: SOLVED - Seem to have been bitten by the ntfs resize bug

To resolve this problem 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 983,039,992 sectors:
00000020   00 00 00 00  80 00 80 00  F8 FF 97 3A  00 00 00 00
To a new length of 949,615,700 sectors:
00000020   00 00 00 00  80 00 80 00  54 FC 99 38  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: sda3-snerd_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=sda3-snerd_new.pbr of=/dev/sda bs=512 count=1 seek=31586304

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 - Seem to have been bitten by the ntfs resize bug

That all worked splendidly; thanks for your help!

I still have a 500M ext2 partition that I want to expand into a 16G one, but I'm not sure how trustworthy that is yet.

Once again, thanks.

6

Re: SOLVED - Seem to have been bitten by the ntfs resize bug

If you are resizing partitions, be sure to use the latest version of GParted.

See the following link for more details:
WARNING! Problem Resizing File Systems with GParted

I have taken the liberty of editing the initial post to prefix the title with solved.