Sunday, April 27, 2008

Recover dual booting in Suse/openSUSE 10.x after Lilo/Grub hides your Windows installation.

4/27/2008 11:07:00 PM |

New Linux users sometimes find that the dual-boot menu generated by Lilo or Grub will disappear [or sometimes never appear] after/during the installation of a Linux distro on a computer that already carries an installled version of MS Windows. The new Linux user was hoping to multiboot between Linux and Windows; but one of the following happens:

The multiboot choices go away and the computer boots straight to Linux or Windows but not both.


The computer won't boot at all! Well don't despair. We'll show HowTo fix all that quite simply.


Usually after a new Linux user installs a Linux distribution a new menu appears which includes Windows as a choice along with Linux. But sometimes Windows isn't presented as an option -- you only see Linux in the menu. Sometimes no choices are available. This HowTo addresses restoring the menu for the simple case where two operating systems are installed, one of which may be Windows.

Don't install Windows on your hard disk after the Linux partition unless you are VERY experienced. Don't install Windows in a logical partition. It can be done but if you're readiing this for advice then you'll likely have a bad day if you try. You can easily multiboot three or more distros by "Chainloading": See this Tutorial/HowTo for multiple distros.

The Method:

There are several published methods. This is just the one I use for 2 distributions. First assume someting nasty got into the master boot record where the bootloader was laid down by Linux. So clean it out and replace it with what's supposed to be installed there by Windows. Then reinstall the bootloader from Linux and it will pick up Windows with its so-called "Chainloader".

This HowTo just shows the way using Suse, Debian and Mandriva as examples. But it is generally applicable to most distros.

First: Get Windows back:

If your Windows is Win95, Win98 or Win98_SE and you have a Win98 install disk you're OK. Boot off the Win98 disk, select to start Windows with CDROM support and when you get the prompt, enter "fdisk /mbr". This should restore access to Windows (see later for Linux). You can reboot without the install disk to test Windows. You won't see the Grub/Lilo menu because you have just cleaned it out of the master boot record

If your Windows is Win 2000 or Win XP and you have the install disk from any of 98, 2000 or XP, you're OK. If you have the 98-type disk, just use the fdisk/mbr routine shown above. If you have the 2000 or the XP disk then boot off the install disk and wait through the very extended dialogue and select Recovery at the end. When you get the prompt select the installation drive (probably C drive), enter "fixmbr" and when it comes back to the prompt enter "exit", reboot etc. This should restore access to Windows (see later for Linux). You now can take out the install disk and reboot into Windows. You won't see the Grub or Lilo menu because you have just cleaned it out of the master boot record.

Second: Get Linux back:

You can usually reboot Linux by putting the Linux install DVD/CD in and rebooting off that. You start going through the install process again and aim to achieve only an upgrade/revision of your boot manager (Lilo or Grub).

For SuSE 10.x:

Reboot using Suse install DVD. Go through the sections for Language, Check media (skip) and Licence until you reach the Installation mode. When you get to the screen where the choices are "install", "upgrade" or "other" then select "other". Of the two choices in "other" select Boot Installed System. You will boot into the installed version of SuSE and from there you can Yast-> system-> bootloader and check that Windows has been included. If it hasn't been, then select Add-> Other system -> chainloader-> enter "Windows" in top box and use the down arrow in lower box to select /device/hda1 and proceed. Modify hda1 to sda1 for openSUSE 10.3+. And if you have a non-standard windows installation on a partition other than the first, modify the 1 in hda1/sda1 accordingly. You should be fine to remove media and reboot. You should get a menu with SuSE and Windows as choices.

You Might Also Like :