1 (edited by gedakc 2010-01-18 20:21:19)

Topic: SOLVED - NTFS resize issue

After shrinking my 1TB NTFS partition to make room for Ubuntu Karmic 9.10 I got an error about the volume being larger then the disk sad

I have seen others have the same issue and solving it with help from this forum, so here goes:

Heres one of there othere topics where the issue was solved http://gparted-forum.surf4.info/viewtopic.php?id=13757

The partition was resized to 911892MiB

>fdisk -l -u

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xc654d0cc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048  1867556249   933777101    7  HPFS/NTFS

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      206847      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2          206848   398295039   199044096    7  HPFS/NTFS


>parted /dev/sda unit s print

Model: ATA SAMSUNG HD103UJ (scsi)
Disk /dev/sda: 1953525168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End          Size         Type     File system  Flags
1      2048s  1867556249s  1867554202s  primary  ntfs         boot


>dd if=/dev/sdc of=sdc1.pbr bs=512 count=1 skip=63
http://a.jof.dk/deltefiler/sda.pbr

I hope you can help me correct the MBA wink

>dd if=/dev/sdc of=sdc.mba bs=512 count=1
http://a.jof.dk/deltefiler/sda.mba
0000:01C0   21 00 07 FE  FF FF 00 08  00 00 9A 9D  50 6F 00 00

Heres the error i get in GParted

ntfsresize -P -i -f -v /dev/sda1     
ntfsresize v2.0.0 (libntfs 10:0:0)
Device name : /dev/sda1
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 956188762624 bytes (956189 MB)
Current device size: 956187751424 bytes (956188 MB)
ERROR: Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partitioning?

2

Re: SOLVED - NTFS resize issue

Hi AJenbo,

From the parted and fdisk output you provided, it appears that your NTFS partition starts on sector 2048, and not 63.  Hence I will need a copy of the NTFS Partition Boot Record which starts at sector 2048.

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-ajenbo.pbr bs=512 count=1 skip=2048

where sda1-ajenbo.pbr is the name of the file that will need to be uploaded.

3 (edited by AJenbo 2010-01-18 09:42:09)

Re: SOLVED - NTFS resize issue

Thank you for the reply, luckily I have since been able to repair my partition using testdisk.
0000:01C0 on the MBA is now
21 00 07 FE FF FF 00 08 00 00 5B DC 50 6F 00 00

Heres the dump you asked for, maybe it is still usefull to you for debuggin?
http://a.jof.dk/deltefiler/sda1-ajenbo.pbr

I had set GParted to schrink the NTFS partition by about 40GB, make a 36GB ext4 and a 4GB swap
My girlfriend tells me that GParted was showing a OK/Cancle dialog, when she went to my computere to brows the web a bit, but she clicked OK as a reflex mad
When I came back the partition appeared to start 1101MiB in to the drive instead of 1MiB, and there was no ext4 or swap, not knowing what had happned i set it to create the ext4 and swap again, and then have the NTFS start at 0MiB. It created the ext4 and swap but then i got the nasty error for the NTFS.

For any one else that runs in to this, if you use testdisk you should just skip the "quick search" as it didn't find it for me, then start the "deep search", it should immediately find the correct partition info and you can then also be skip the rest of it. Remember to try and brows the files from with in testdisk, before you write the changes.

4

Re: SOLVED - NTFS resize issue

Thanks for reporting back with how you solved the problem.  smile

I will edit your initial post to prefix "SOLVED" in front of the title.