Linux & Windows 7 Dual Boot

by Ver Pangonilo

Reprinted with permission from his blog.

The pre-installed Windows Vista Home in my laptop just kept irritating me. It came to a point where most shortcuts in "My Documents" do not work anymore, as it prompts me that I don't have the rights to those directories. My open source programs kept on crashing. Until I decided to dual boot it with PCLinuxOS 2009.

The choice of PCLinuxOS 2009 was easy, since it was the only LiveCD distro (and Mandriva Live) that enabled my wireless connectivity out-of-the-box. It was unfortunate that Ubuntu, gOS, Fedora Core nor Zenwalk failed in that respect.

The installation of PCLinuxOS was a breeze, with no glitch at all. The bootloader was able to detect the current Windows. I was able to dual boot Linux with Windows Vista. Now came Windows 7. I decided to upgrade my pre-installed OS with this much hyped Windows. Like the PCLinuxOS 2009 installation, I did not have any problem, not until I wanted to boot my PCLinuxOS. Windows 7 had overwritten the GRUB boot loader and failed to (or deliberately did not) include non-Windows operating systems.

Why do I still need Windows when, in fact, I have my Linux? Well, I still use some Windows only programs. I only use it for these programs, and nothing else.

Back to my problem: how can I reactivate my Linux. I don't want to re-install it as I did so much custom configuration and I don't want to lose them. I tried searching the net about GRUB re-installation. The simplest is at Doctor's Blog.

To summarize the steps in re-installing GRUB:

  1. Boot with the PCLinuxOS 2009 LiveCD as root
  2. Open terminal as a super user
  3. Type "grub" then enter. The grub> prompt will appear.
  4. Type grub>find /boot/grub/stage1 then enter. A list similar to this will appear.
    (hd0,0)
    (hd0,4)
    (hd0,5)
    
  5. You need to know which partition your Linux OS is located. In my case it is (hd0,4), thus I typed the command
    root (hd0,4).
  6. Next, enter setup setup (hd0) at the grub> prompt.
  7. Exit GRUB by typing "quit"
  8. Restart you computer. The GRUB bootloader should now appear.

In my case, the problem did not stop there. If I select Windows 7, it just fails to start. So, at this instance, my Linux works but my Windows not.

I remembered that during the installation of Windows 7, there was a menu about repair so I tried clicking it, then selected restore from a previous restore point. After this process, I restarted my laptop and was able to boot either PCLinuxOS or Windows 7 without any glitch at all.