Fixing GRUB after Windows install

23 07 2008

For me it’s a fact by now. Every time i decide to install WinXP back onto my laptop, something goes wrong. Big time.

After creating a 25 GB partition on my laptop i proceeded into installing Windows Xp Sp2 (which the laptop had preinstalled anyways when i got it).
The installation went smooth enough and as expected the MBR is messed up at this point and the computer boots directly into Windows.

As done a few times before, but still worth mentioning, the procedure in these cases is:

1. Boot the Live CD
2. Open a terminal window and type:

sudo grub

3. On the new prompt:

grub>> find /boot/grub/stage1
the answer in my case (hd0, 0)

4. Proceed

root (hd0,0)
setup (hd0)

After the reboot all should be good and the boot menu should appear.
The windows installation needs to be installed manyally by editing menu.lst.

Funnily enough, this was not my case.
In every attempt to issue any command on the grub shell i kept getting:

Error:27 Unrecognized command over and over again.

Rebooting the computer continuously resulted in :

Error Loading Operating System

After messing around with CMOS parameters for a while, i also noticed that after booting the live cd and setting a boot flag on the windows partition instead, everything went fine.

To make this short, the solution was reached by starting another installation,
choosing Manual on the installation partitioner.
Choosing to NOT FORMAT any of the partitions and continuing the process. At the end the setup will execute a grub-install

All my files and docs were kept intact but the entire filesystem is swapped for the new one, so all
installed software, gone.

Not the end of the world anyways, i had a AptOnCd copy of my system.

I made the Windows installation to fuss around with the Warelex Mobiola Webcam application for symbian phones.
I’ll write soon enough an entry about it.




3 responses

14 08 2008
Muhammad Jafari

Please edit commands in No. 4 to root (hd0,0) setup (hd0)
Just insert a space between the root and (hd0,0) and between the setup and (hd0), too!

14 08 2008

Done. 😉

16 10 2009


I have a doubt in 4th step what is (hd0,0), what does it mean .
Has it is partion hardisk name like hd02,hd03

Actually i deleted my xp and ubuntu due to some reasons . Now installed ubuntu in 30gb hard disk i think in 3rd partion(hrd03) rest of the drives are still in ntfs format

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: