Recovering from broken boot loader

If you’re like me — a fanatic Linux tester using Windows part time — you’ve probably experienced a few installation failures. When that happens, sometimes the Linux installation breaks the grub boot loader, leaving you with a computer that won’t do anything besides displaying a discouraging black grub console. Well, here’s how to actually boot your Windows installation manually from that grub console. If the console isn’t already there when you start the computer, simply hit ‘c’ and then type the following:

rootnoverify (hd0,0)
chainloader +1
boot

That will boot you into Windows again, so you can e.g. burn a new copy of a working Linux distro which would fix the situation permanently. Obviously, this doesn’t work for the distros that use lilo instead of grub, but most popular distros use grub today, including Ubuntu, Fedora Core, and SuSE.

Note that the numbers in (hd0,0) represent the drive number and the partition number, both starting at zero. So if Windows is e.g. on the second partition of the first disk, use (hd0,1) instead.

About these ads

3 thoughts on “Recovering from broken boot loader

  1. Lim Chee Aun

    I got to admit this is quite important sometimes. I faced this problem just few days after installing Linux for the first time.

    And uh, it’s not ‘bool’ :-D

    Reply

Comment on this post:

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s