1 (edited by Munko 2009-12-17 15:34:47)

Topic: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

Hi there! I've try to shrink and move to right my 1,5 Tb NTFS partiton and... now my computer unable to boot.

I've try recover my partition testdisk utility. May be it destroy my data sad

Here is the requested outputs:

Gparted log file (Russian :-) ) - http://eter.asia/tmp/gparted_details.htm

fdisk: ---------------------------------------------------------------

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63  2930272064  1465136001    7  HPFS/NTFS - "Start 63" I think is result testdisk work

Parted: ---------------------------------------------------------------

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

Number  Start  End          Size         Type     File system  Flags
1      63s    2930272064s  2930272002s  primary  ntfs         boot

My PBR and MBR - ftp://eter.asia

(PBR command - "dd if=/dev/sda of=sda-munko.pbr bs=512 count=1 skip=83891430")
(MBR command - dd if=/dev/sda of=sda-munko.mbr bs=512 count=1)

Thank you for your help. Best regards! (sorry my English, co'z I from Russia )

2 (edited by Munko 2009-12-17 15:44:47)

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

I've try manualy edit my sda-munko.pbr in HEX editor:

00 00 F8 00 00 3F 00 FF 00 E6 14 00 05 00 00 00
00 80 00 80 00 01 67 A8 AE 00 00 00 00 CB C8 B7       - old
09 00 00 00 00 CC DF E5 0A 00


00 F8 00 00 3F 00 FF 00 E6 14 00 05 00 00 00 00
80 00 80 00 E6 14 00 05 00 00 00 00 CB C8 B7 09     - new
00 00 00 00 CC DF E5 0A

If I export this file in to my drive (dd if=sda-munko.pbr of=/dev/sda bs=512 count=1 seek=83891430) may be it worked? Correct me

3 (edited by gedakc 2009-12-17 20:36:52)

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

You have made a good attempt at solving this problem.  Unfortunately you should not have written the results from testdisk because these were incorrect for your situation.  All that needed changing was the volume size in the NTFS Partition Boot Record.

You correctly figured out that your NTFS partition boot record (and partition) now begins at:
83891430 decimal
050014E6 hexadecimal

To fix the problem, we need to do two things:
A) correct the partition table, and
B) decrease the size of the volume in the NTFS partition boot record.

The log file contains the important information we need.  It is very good that you saved the log file :-)

Now it begins: 83891430 sectors
now ends: 2930272064 sectors
new size: 2846380635 sectors (1.33 TB)

Now we fix the two problems:

A)  Correct the partition table (New MBR file)

The old partition file indicates start sector 63 and length of 2,930,272,002 sectors:
000001B0   00 00 00 00  00 2C 44 63  00 01 80 8F  00 00 80 01
000001C0   01 00 07 FE  FF FF 3F 00  00 00 02 67  A8 AE 00 00
The new partition file indicates start sector 83,891,430 and a length of 2,846,380,635 sectors:
000001B0   00 00 00 00  00 2C 44 63  00 01 80 8F  00 00 80 FE
000001C0   FF FF 07 FE  FF FF E6 14  00 05 5B 52  A8 A9 00 00

EDIT:  Accidentally hit submit instead of preview big_smile

B)  Decrease the size of the NTFS volume (New NTFS PBR file)

The change I have made to the file is from a length of 2,930,272,001 sectors:
00000020   00 00 00 00  80 00 80 00  01 67 A8 AE  00 00 00 00
To a new length of 2,846,380,634 sectors:
00000020   00 00 00 00  80 00 80 00  5A 52 A8 A9  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 these changes:

1) Download the new MBR: sda-munko_new.mbr

2) Load the new MBR on your hard disk.
NOTE:  Be extra careful when entering the commands.  Data loss could result otherwise.

dd if=sda-munko_new.mbr of=/dev/sda bs=512 count=1

3) Download the new NTFS PBR: sda1-munko_new.pbr

4) 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-munko_new.pbr of=/dev/sda bs=512 count=1 seek=83891430

5) Reboot the computer

6) Check that the file system is recognized in GParted

7) If all seems fine then I would advise booting into Windows and running "chkdsk /f /r" multiple times, until there are no more faults.

4

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

Thanks. Can you correct my PBR and MBR files and pick to this post?

5 (edited by Munko 2009-12-17 20:45:49)

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

Bad news sad File system not recognized in Gparted. Windows chkdsk report file system is RAW

6

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

Okay, let me take a look again.  In the meantime, what do the following commands show?

fdisk -l -u

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

parted /dev/sda unit s print

7

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

fdisk out:

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *    83891430  2930272064  1423190317+   7  HPFS/NTFS

parted out:

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

Number  Start      End          Size         Type     File system  Flags
1      83891430s  2930272064s  2846380635s  primary               boot

8

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

After double checking the calculations these seem right.  For some reason parted and gparted are not recognizing the file system as NTFS.

Have you tried booting into Windows?

9 (edited by Munko 2009-12-18 11:41:19)

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

I try boot system recover dvd windows 7. Chkdsk report: file system is RAW. XP install cd report file system contain error and not check it with any check parameters such as /p or /s
Update: i boot slax live cd in single mode (without automount). Next I try mount partition manualy in read only mode and I can look my files! Now me attempt create JBOD RAID massive from my 3 old disks (120, 160, 400 gb) and try copy all 570 Gb data to new raid massive. I hope everything to be ok

10

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

The data should still be intact.  I do not yet know why parted and gparted do not recognize the file system as NTFS.

Hopefully you can recover all of your data.

11

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

Hi there! So. I've install Debian Linux in to my old disk, then create virtual RAID massive (because my BIOS fake RAID copy data with very much mistakes) and copy my data without any problems.
Thank you very much gedakc smile.  I think you can close this post

12

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

Thank you for reporting back.  I will edit the initial post and prefix the title with SOLVED.

13

Re: SOLVED- NTFS problem resizing using Gparted 0.5.0-3. My MBR destroyed?

I think we can use this process during windows setup for save our document in C drive. Am i right ? please inform me.