Index of /andrejciho/Linux/Restore Windows Bootloader

Post Title Posted Description
Back Parent Directory
Restore Windows Bootloader 2006-03-22 19:44

...after it you lost it


Be Sociable, Share!

The following has been tested between a donor of bootloader (Compaq desktop with XP Home and windows on 1st partition) and recipient (Dell laptop with XP Professional and windows on 2nd partition)
1. You need to find a computer that has a default Windows boot loader in its MBR. Capture the first 440 bytes of the MBR of that computer. IMPORTANT: 440 bytes not the full 512, because the difference contains information about your partitions, their sizes etc. I learned this the hard way. Or, better said, I taught Mark and myself the hard way. Sorry Mark!
dd if=/dev/hda bs=440 count=1 of=$YOURUSBKEY/windowsMBR
2. Backup your current MBR and BACK IT UP SOMEWHERE OTHER THAN YOUR HARDDRIVE by running the following command and then copying it somewhere else as well:
dd if=/dev/hda bs=512 count=1 of=$YOURUSBKEY/oldMBRbackup
3. Now replace the first 440 bytes of your MBR with the other computers MBR
dd if=$YOURUSBKEY/windowsMBR bs=440 count=1 of=/dev/hda
4. Reboot and pray


Leave a Comment
*Required
*Required (Never published)
 

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

This website is powered by Wordpress