Saturday, June 07, 2008

Correcting Windows crashes & FIXMBR vs FIXBOOT

Lately, every time I boot into windows, the system crashes after after a few minutes. Therefore I decided to do a re-install (from the IBM Pre-Desktop partition). It started fine but soon I encountered a small problem.

Windows made some changes to MBR. As a result, GRUB started hanging (I have a dual boot system - XP and Ubuntu). Earlier it used to give an option to choose Ubuntu vs XP. But now, it just did not move. Thus, Pre-desktop utility could not complete windows xp installation (as computer is rebooted many times when installation is done).

Following steps solved the issue:
a. I booted the machine using a Windows XP retail install CD
b. When uit asked me to choose whether to install or go to recovery console. I chose recovery console by pressing "R"
c. Here I ran "FIXMBR"

The above fixed the problem and after this when I rebooted, IBM pre-desktop was able to continue windows installation. (infact its going on as I type this from my home laptop)

Also, whule looking for a solution I learn the following two options to cure booting problems. Both are available in the Recovery console of Windows XP.
1. FIXMBR
2. FIXBOOT

FIXMBR vs FIXBOOT : whats the difference?
(taken from a post by bbz_Ghost here
FIXMBR grabs the original MBR code from the drive's EEPROM chip and restores it, effectively wiping out anything that might be in there, be it LILO, GRUB, a Windows bootloader, and any possible traces of a virus, etc. When that command is finished, the MBR is as good as it was the moment the drive passed QA testing at the factory.

FIXBOOT restore the native ability for Windows to boot with the NTLDR file and bootloader, simply put.

There's also BOOTCFG which lets you modify boot time parameters just like you can inside Windows by modifying the boot.ini file under Advanced System Properties.
There's also a proper order for the commands if you need to use them from the Recovery Console:
FIXMBR first, then FIXBOOT right after that, then type exit and press Enter to reboot.