1 (edited by JeffW 2009-12-15 16:54:17)

Topic: SOLVED - NTFS volume size / device size error

I'm experiencing this error and am unable to start Windows XP since resizing the partition using GParted 0.4.8 from the Knoppix live DVD.

I set up to remove the Recovery partition and resize the main partition on a Seagate 1.5 tb drive. I resized it down to 500gig. Initially the delete partition ran, and the resize failed. I must have messed something up mounting the floppy drive and saving the info file because when I went to mount it on my windows laptop the info file wasn't there. So naturally I went back in and ran it again, expecting to generate the same error. However the second time it completed without error. Now Windows XP aborts with a UNMOUNTABLE_BOOT_VOLUME error.

GParted now shows Current volume size 1471264023040 bytes (1471265 MB)
Device size 524287540224 (524288 MB)

First sector: 63
Last sector: 1023999164
Total sectors: 1023999102
/dev/sdb1 488.28 GiB

I used commands I saw elsewhere in this forum to create an mbr file and stored it at http://www.mediafire.com/?mrulnedt2ro

Thank you in advance for any help you can give me. Let me know if you need any additional info.

Jeff

2

Re: SOLVED - NTFS volume size / device size error

Hi JeffW.  From your comments about the partition details, it looks like the problem is with drive /dev/sdb, and not with drive /dev/sda.  If this is the case then we will need the following details from drive /dev/sdb.
If this is not the case, then please replace "/dev/sda" with "/dev/sdb" in each of the following commands.

Would you be able to provide the output from the following two commands?

fdisk -l -u /dev/sdb

where one of the options is a lower case "L" and not the number one.

parted /dev/sdb unit s print

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

where sdb-jeffw.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-jeffw.pbr bs=512 count=1 skip=63

where sdb1-jeffw.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 - NTFS volume size / device size error

Thanks, here's the details:

root@Microknoppix:/tmp/usb# fdisk -l -u /dev/sdb

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xf7253e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63  1023999164   511999551    7  HPFS/NTFS

root@Microknoppix:/tmp/usb# parted /dev/sdb unit s print
Model: ATA ST31500341AS (scsi)
Disk /dev/sdb: 2930277168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End          Size         Type     File system  Flags
1      63s    1023999164s  1023999102s  primary  ntfs         boot

pbr: http://www.mediafire.com/?2mogqjxlh
mbr: http://www.mediafire.com/?mzzgmyynf0q

4

Re: SOLVED - NTFS volume size / device size error

For some reason the link to the NTFS PBR does not work for me.  It just takes me to the default mediafire.com home page.

Would you please repost the NTFS PBR?

5 (edited by JeffW 2009-12-12 21:05:45)

Re: SOLVED - NTFS volume size / device size error

gedakc wrote:

For some reason the link to the NTFS PBR does not work for me.  It just takes me to the default mediafire.com home page.

Would you please repost the NTFS PBR?


Try this link, it may work better
http://www.mediafire.com/file/2mogqjxlh … -jeffw.pbr

I see it now, 2 bytes were missing at the end. http://www.mediafire.com/?2mogqjxlhwg

6

Re: SOLVED - NTFS volume size / device size error

Hello,
Will you be able to help me today? My machine is dead. Please advise if you are still unable to access the pbr file.

Jeff

7

Re: SOLVED - NTFS volume size / device size error

I am looking into your situation now.

8

Re: SOLVED - NTFS volume size / device size error

With your situation we have two options available.  Since you wished to shrink your NTFS file system, 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 2,873,562,544 sectors:
00000020   00 00 00 00  80 00 80 00  B0 15 47 AB  00 00 00 00
To a new length of 1,023,999,101 sectors:
00000020   00 00 00 00  80 00 80 00  7D FC 08 3D  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-jeffw_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-jeffw_new.pbr of=/dev/sdb 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.

9

Re: SOLVED - NTFS volume size / device size error

Thanks, that fixed the problem with no data loss. Is it safe to use this version of gparted on this computer again?

10

Re: SOLVED - NTFS volume size / device size error

In some ways that is a complex question.

The problem arises with certain combinations of newer Linux kernels (such as 2.6.31), unpatched parted versions (such as 1.9.0), and any GParted version.

Since the problem occurred with your Knoppix Live CD, I would say that it is not safe to use your Live CD for resizing partitions.

For information on a GParted Live CD that is known to work see the following post:
WARNING! Problem Resizing File Systems with GParted