Recover Missing Linux Boot Loader

Because I like to tinker with Linux, and use different distributions, I have been multi-booting Windows 7, and three different Linux distributions using Grub 2 as my boot loader for a about a month now. As with all things Linux off the mainstream, tinkering and  multi-booting is a problem waiting to happen. Yesterday it happened again – with gusto.

One of the three linux distributions on my hard drive wanted a distribution upgrade. I allowed the upgrade, but was not happy with the results. Something in the upgrade went wrong and the system was very sluggish. Because all three distributions were XFCE or XFCE/Gnome, I thought perhaps a KDE distribution would be a fun change.

The Linux using KDE distribution I was installing had no option to not install Grub Legacy during install. How bad could this be I thought to myself as I let Grub legacy be installed. Perhaps for a Grub using expert it is not big deal.

As for myself, it was a problem. After some tinkering trying to recover gracefully, I went from Grub 2 with four main boot options, to two Linux only boot options, to no boot loader at all. All boot loading options were destroyed.

Parted Magic , saw my hard drive as one big blank space.

Screen shot from Parted Magic home page screenshotsI use a method I developed out of similar desperation as a result of past tinkering gone bad to fix my no boot loader dilemma. It is not the best, prettiest, or quickest way to fix a boot loader manager problem, but it works and is simple.

The best method I have read about is ‘Chroot’ing into a failed system and recovering the system. Reading about Chroot from the man page and random postings does not sound simple to me. There are probably other methods of fixing a non booting hard drive too, but I am not aware of them.

I developed my fail safe, easy way to recover my non booting hard drive through trial and error recovering from my past errors. I am only a system administrator for my home computers, so speed, elegance, and efficiency are not top priorities for me, though I have improved from days of old when I would wipe the hard drive and do a complete install starting with Windows.

My recovery system method is simple, and it saves the day at the expense of thirty minutes and for me an extra linux install.

I always have a Parted Magic CD , and an Ubuntu CD around. These two cd’s are part of my all around fix serious problems emergency kit. Both of them are about a year old, so I do not think they need to be the latest and greatest.

Here are the steps I use to recover from boot failure for a simple minded Linux user like myself. Recovery from times when my tinkering creates problems of epic proportion for myself. Times like today when I once again lost all ability to boot to either Windows or one of three installed Linux distributions on my hard drive.

Using Parted magic cd either reformat any current Ubuntu partitions for an Ubuntu re-install, or create two new small partitions using empty drive space for an initial Ubuntu install. Designate the two partitions as /root and /home and of course use the /swap partition you already have from previous installs.

Ubuntu is the best distribution I know for finding, identifying, and listing all operating systems on a hard drive. When Ubuntu installs Grub, it will find and list all bootable partitions on your hard drive, at least in my experience. Install Ubuntu to the two partitions you created or have made available using a manual install as you do not want to wipe out your hard drive.

You now have recovered Windows and all Linux operating systems on your hard drive. Ubuntu itself does not take up much space and you need not change anything or delete Ubuntu unless the space it takes up is needed. If Grub was your previous boot loader, you can boot into your Linux of choice and re-install grub and make a new configuration file.

If Lilo was your previous boot loader, it is best not to try to re-install Lilo as Lilo does not do well  over writing Grub boot data.

05/22/10 – PCLinuxOS includes MBR recivery on the live CD. Might want to check it out, it is a great Distribution, my second Linux install, and one of my recommended favorites.

Share