Unable to Restore MBR, HELP!!!

Topics about disk partitioning (fdisk, parted, gparted, partimage), Volumes Management (lvm, evms, dmraid), Storage, file systems, ...
Post Reply
VegasTech702
Posts: 3
Joined: 26 Oct 2009, 08:12

Unable to Restore MBR, HELP!!!

Post by VegasTech702 » 26 Oct 2009, 08:28

Hello,

I made an image of my winxp partition (ntfs) using partimage. I now need to restore my windows partition with the image file. I successfully got the partition restored, but I need my master boot record (mbr) back. I have my partition with the image mounted, and no the partition I am trying to restore is NOT mounted.

SO... I am trying to extract the mbr info from the compressed (gzip) file. I am using the following command with no success:

Code: Select all

gunzip -c /mnt/windows/winrestore/winxp.partimage.000.gz | partimage restmbr /dev/sda1 stdin
This command just takes me to the partimage splash screen. If I try to enter the image filepath and restore mbr, the next screen says I have an incorrect file compression level, then partimage exits back to the terminal.

When I do the command below it goes to a screen where I could select the mbr restore options then freezes the terminal.

Code: Select all

gunzip -c /mnt/windows/winrestore/winxp.partimage.000.gz | partimage restmbr stdin
I really hope someone can give me an idea of what to do. I imagine my command syntax is off somewhere.

VegasTech702
Posts: 3
Joined: 26 Oct 2009, 08:12

Re: Unable to Restore MBR, HELP!!!

Post by VegasTech702 » 29 Oct 2009, 05:34

Nobody has any ideas???

VegasTech702
Posts: 3
Joined: 26 Oct 2009, 08:12

Re: Unable to Restore MBR, HELP!!!

Post by VegasTech702 » 30 Oct 2009, 07:45

I figured out how to get the system to boot again, I booted off a windows xp install cd, restarted the computer and done.

In the future I can prevent all this by simply using the: dd if=/dev/hda of=backup-hda.mbr count=1 bs=512 and sfdisk -d /dev/hda > backup-hda.sf commands prior to wiping out the HD.

Post Reply