1

Topic: Unable to boot windows7 after resizing hard disk

After using Gparted 0.5.2 Windows7 will not boot.
error massage

file system : ntfs
Size : 280.45 GB
boot

/dev/sdal
Current volume size : 738048963072
Current device size: 301127468544

Error: current volume bigger then device size.Unable to read contents of this file system.




I hope you will/can help me.
--
Met vriendelijke groet.
Jan Hazelaar

2

Re: Unable to boot windows7 after resizing hard disk

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.

From these we can determine how to capture the Master Boot Record and the NTFS Partition Boot Record.

3

Re: Unable to boot windows7 after resizing hard disk

gedakc wrote:

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.

From these we can determine how to capture the Master Boot Record and the NTFS Partition Boot Record.

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

Device Boot                     Start                End             Blocks           id           system
/dev/sdal1      *               63                 588139649    294069793+   7            HPFS/NTFS
/dev/sdal2           1441505280            1697505279   128000000     7            HPFS/NTFS
/dev/sdal3           1697505280            1953519615   128007168     7            HPFS/NTFS
/dev/sdal4             588139650            1441496384   426678367+   7            HPFS/NTFS


The second command i put in the path for my usb stick and got the follow output.
Disk  /dev/sdd: 4030463s
Sector size (logical/physical) : 512B/512B
Partition table: msdos

Number  Start    End                    Size                type             File system          Flags
1             63s      40300462s        4030400s       primary        fat16                   boot

4

Re: Unable to boot windows7 after resizing hard disk

I'll assume that the problem is with the first partition (/dev/sda1).  If this is not the case then the skip value will need to be altered to be the correct starting sector for the boot partition.

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

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

where sda1-noothaas.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.

5

Re: Unable to boot windows7 after resizing hard disk

I uploaded the files you asked for,


http://www.mediafire.com/file/w0mdzjgxm … othaas.mbr

http://www.mediafire.com/file/mtwnntm1w … othaas.pbr

6

Re: Unable to boot windows7 after resizing hard disk

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 1,441,501,880 sectors:
00000020   00 00 00 00  80 00 80 00  B8 92 EB 55  00 00 00 00
To a new length of 588,139,586 sectors:
00000020   00 00 00 00  80 00 80 00  42 4C 0E 23  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-noothaas_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-noothaas_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.

7

Re: Unable to boot windows7 after resizing hard disk

One more question how do i upload the new file from an usb stick?

8

Re: Unable to boot windows7 after resizing hard disk

You will need to mount the usb stick.

See Saving Details for Bug Reports for an example of how to mount the usb stick.