1 (edited by Maxence770 2011-06-17 01:36:22)

Topic: That's quite embarrassing! (solved)

After I use gparted, i can't boot my windows... I have the same problem than skin81 in http://gparted-forum.surf4.info/viewtopic.php?id=14125

Here's the problem :

ntfsresize -P -i -f -v /dev/sda1
ntfs resize v2.0.0. (libntfs 10:0:0)
Device name :/dev/sda1
NTFS volume information : 3.1
cluster size : 4096
Current volume size : 250058076672 bytes (250059)
Current device size : 229085512192 bytes (229086)
ERROR : Current NTFS volume size is bigger than the device size!
Corrupt partition table or incorrect device partioning?

With the command : fdisk -l :

Partition 1 has different physical/logical beginnings (non-Linux?) : phys=(793, 22, 13) logical=(838544, 58, 21)
Partition 1 has different physical/logical endings : phys(870, 235, 61) logical(902717, 40,48)



Can it be repair?

2

Re: That's quite embarrassing! (solved)

Most often this problem can be repaired.

You can see find the tutorial by following the link for this problem on the FAQ page.


Otherwise if you would like help resolving this problem then we will need some more information.  If this is the way you would like to proceed then would you be able to provide the output from the following two commands?

fdisk -l -u

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

parted /path-to-your-device unit s print

where /path-to-your-device is something like /dev/sda.

3

Re: That's quite embarrassing! (solved)

For fdisk –l –u

Disk /dev/sdb : 1993 MB, 1993342976 bytes
62 heads, 62 sectors/track, 1012 cylinders, total 3893248 sectors
Units = sectors of 1 * 512 : 512 bytes
Sector size (logical/physical) : 512 bytes / 512 bytes
I/O size (minimum/optimal) : 512 bytes/512 bytes
Disk identifier : 0x0009e87d

This doesn’t look like a partition table
Probably you selected the wrong device.

Device    Boot   Start            End              Blocks         Id   System
/dev/sd1 ?       3223366752  3470046675 123339962  f4   Speedstor
Partition 1 has different physical/logical beginnings (non-Linux?):
Phys:(793, 22, 13) logical:(838544, 58, 21)
Partition 1 has different physical/logical endings:
Phys:(870, 235, 61) logical:(902717, 40, 48)
Partition 1 does not end on cylinder boundary.
/dev/sdb2 ?      378192737    710426324   166116794  10  OPUS
Partition 2 has different physical/logical beginnings (non-linux?):
phys:(205, 7, 0) logical:(98385, 12, 54)
Partition 2 has different physical/logical endings:
Phys:(870, 235, 50) logical:(184814, 21, 7)
Partition does not end on cylinder boundary
/dev/sdb3 ?      225603442    22560351      5                74  Unknow
Partition 3 has different physical/logical beginnings (non-Linux?):
Phys:(367, 66, 47) logical:(58689, 47, 13)
Partition 3 has different physical/logical endings:
Phys:(370, 32, 37) logical:(58689, 47, 22)
Partition 3 does not end on cylinder boundary.
Partition table entries are not in disk order


For parted /dev/sda1 unit s print

Model: ATA ST 9250315AS (scsi)
Disk /dev/sda: 488397168s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End              Size             Type       File system  Flags
1           63s    447432703s  447432641s  primary  ntfs             boot

4

Re: That's quite embarrassing! (solved)

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

where sda-maxence770.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/sdc of=sda1-maxence770.pbr bs=512 count=1 skip=63

where sda1-maxence770.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 or filefactory, and post the link to these files in this forum post.

5

Re: That's quite embarrassing! (solved)

Here's the file for the first command line : http://www.filefactory.com/file/ccb459b … nce770_mbr
But the second command doesn't work : dd: opening '/dev/sdc' : No such file or directory

6

Re: That's quite embarrassing! (solved)

Maxence770 wrote:

But the second command doesn't work : dd: opening '/dev/sdc' : No such file or directory

Oops, my bad.  The second command should have read sda and not sdc.  Hence the full command is:

dd if=/dev/sda of=sda1-maxence770.pbr bs=512 count=1 skip=63

7

Re: That's quite embarrassing! (solved)

Here's the second file : http://www.filefactory.com/file/ccb85b8 … nce770_pbr

8

Re: That's quite embarrassing! (solved)

Since you were trying to shrink the partition, 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 488,394,680 sectors:
00000020   00 00 00 00  80 00 80 00  B8 4F 1C 1D  00 00 00 00
To a new length of 447,432,640 sectors:
00000020   00 00 00 00  80 00 80 00  C0 47 AB 1A  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: sda1-maxence770_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=sda1-maxence770_new.pbr of=/dev/sda 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: That's quite embarrassing! (solved)

It's ok, my computer is working again!

Thank you! Hail to master gedakc!

10

Re: That's quite embarrassing! (solved)

'Tis good to hear.  :-)

To help others in their search for solutions you can edit the initial post and prefix "SOLVED" in front of the title.

11 (edited by umuench 2012-02-27 21:43:37)

Re: That's quite embarrassing! (solved)

fdisk -l -u
Disk /dev/sdd: 4127 MB, 4127195136 bytes
255 heads, 63 sectors/track, 501 cylinders, total 8060928 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00a1009f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *          63     8060927     4030432+   c  W95 FAT32 (LBA)
Partition 1 has different physical/logical endings:
     phys=(500, 254, 63) logical=(501, 196, 15)

parted /dev/sdd
Model:  USB DISK 2.0 (scsi)
Disk /dev/sdd: 4127MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
1      32,3kB  4127MB  4127MB  primary  fat32        boot, lba

dd if=/dev/sdd of=/dev/.../dd_usb.pbr bs=512 count=1 skip=63
https://rapidshare.com/files/2467870919/dd_usb.pbr

Can you help me?

12

Re: That's quite embarrassing! (solved)

umuench, would you please create a new post in a new thread?

A new thread will help to keep each problem and solution separate, and minimize the chance of errors.

Also in the new thread please describe the steps you took and what the problem is that you are experiencing.