Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to create an image of Windows XP and clone it to several partitions on the same hard drive using Partimage. I seem to be running into a problem when I restore the image onto another partition - when I boot into the OS from the partition I just restored, it brings up this message during the boot sequence: autochk program not found - skipping autocheck, and then after this, the OS reboots the PC and the whole process repeats itself in an infinite loop.

After doing some Google search, it is suggested that this loop was caused by the partition being hidden or the mountmgr.sys file is missing. I checked my configuration and verified that this was not the case.

I'm just wondering:

  • Has anyone else experienced this and is there a solution for it?
  • Is this what happens when you try to restore the image to a different partition on the same hard disk or is Partimage itself the problem?
  • Should I be trying out a different partition cloning software?
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

An NTFS partition has a BIOS Parameter Block at its start where one field (a DWORD at offset 0x1C, the "Number of Hidden Sectors") says where on the disk it is located.

You must either (a) restore the partition at the exact same sector in the harddisk, or (b) patch this field (writing number in Little-Endian style), if you want to boot from it.

E.g. to state that a partition is loaded at sector 63 (default in XP), use:

echo 63 | gawk '{printf("%c%c%c%c",$1,rshift($1,8),rshift($1,16),rshift($1,24))}' | dd bs=1 count=4 seek=28 of=/dev/sda1

where /dev/sda1 is the partition in question.

You can use fdisk to view current partitions:

# fdisk -l /dev/sda

...
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *      321300   192089204    95883952+   7  HPFS/NTFS/exFAT
/dev/sda2       192089210   408998834   108454812+   7  HPFS/NTFS/exFAT
/dev/sda3       409001982   625141759   108069889    5  Extended
/dev/sda4              63      321299      160618+  83  Linux
...

# dd bs=1 count=4 skip=28 if=/dev/sda1 | hd

...
00000000  14 e7 04 00
...

In this example I have NTFS partition /dev/sda1 (with Win Vista) at sector 321300 (0x0004e714).

share|improve this answer
    
Thanks. This pointed me in the right direction. A couple of other sources indicates that this field needs to be changed as well. Although I think it is called a Bios Parameter Block and not Boot. It also seems that I need to modify the boot.ini file to point to the correct partition after the restore. –  Xolstice Jun 6 '11 at 11:27
    
Indeed it is a Freudian slip; BPB is the BIOS Parameter Block! –  RolKau Jun 10 '11 at 21:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.