1

Topic: Current NTFS Volume size is bigger than the device size

I have managed to hose my laptop HD when resizing it using gparted-live-0.5.2-9

I don't quite understand what I need to do to fix it however when it comes to editing the PBR.


Write your pbr in a file: dd if=/dev/sda of=/some/where/myCurrentPbr.pbr bs=512 count=1 skip=63
Make a backup cp /some/where/myCurrentPbr.pbr /some/where/myCurrentPbr.bak

How do I know what the skip value should be?

My drive has a partition at the start of it which I think is recovery media for the ThinkVantage software (according to GParted it's 1542240 total sectors)

Output from the relevant commands:

fdisk -l -u

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders, total 195371568 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x2601aada

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *     1542240   171895499    85176630    7  HPFS/NTFS

Disk /dev/sdb: 1058 MB, 1058275328 bytes
255 heads, 63 sectors/track, 128 cylinders, total 2066944 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x005741c4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     2066943     1033440+   b  W95 FAT32
Partition 1 has different physical/logical endings:
     phys=(127, 254, 63) logical=(128, 168, 40)

parted /dev/sda unit s print

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

Number  Start     End         Size        Type     File system  Flags
 1      1542240s  171895499s  170353260s  primary  ntfs         boot

Can somebody help me figure this out please? I don't really want to rebuild this laptop...

Thanks

Gordon

2

Re: Current NTFS Volume size is bigger than the device size

From the parted output, it appears that your primary boot partition begins at sector 1542240.  Hence this is the value to use as the "skip=1542240" sector.

3

Re: Current NTFS Volume size is bigger than the device size

Thanks. I still have a problem however:

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

Number  Start     End         Size        Type     File system  Flags
 1      1542240s  171895499s  170353260s  primary  ntfs         boot

Taking 1 off the length would give

echo "obase=16;170353259" |bc
A27626B

So reversed, it's
6B 62 27 0A

I made a backup of my pbr:

http://www.mediafire.com/?zyzzv2mgwyn

and my edited version is this

http://www.mediafire.com/?dfh4jmnnxae

I've copied it back to the system.

Can you spot anything wrong?


Thanks for your help

4

Re: Current NTFS Volume size is bigger than the device size

Your calculation appears correct.

Did you restore the sector to the same location (seek=1542240)?

Did you reboot in GParted Live to check if the error message still appears?

5

Re: Current NTFS Volume size is bigger than the device size

Thanks for the help, I've given up trying to fix this. It'll be quicker to rebuild the laptop I think.

Cheers

Gordon