Linux and Windows 7 Dual Boot

The pre-installed Windows Vista Home in my laptop just pissing me off. 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 PCLinux 2009 was that, 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 want to boot on my PCLinuxOS. Windows 7 have overwritten GRUB boot loader and failed (or deliberately did not) to include non-Windows operating systems.

Why do I still need Windows where in fact I have my Linux? Well, I still use some Windows only programs. I only use it for these programs 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 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 commands
    grub> root (hd0,4)
    grub> setup (hd0)
  6. Exit GRUB by typing “quit
  7. 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 fail 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.

9 thoughts on “Linux and Windows 7 Dual Boot

  1. old-polack

    Ver,

    You’re more than welcome. Looks much nicer now. ;-D

    Cheers back at ya.

    O-P

  2. Ver Post author

    Hi old-polack,

    I have updated & corrected the steps. Thanks a lot.

    Cheers,

    Ver

  3. old-polack

    Ver,

    Seriously, you need to rewrite the part in the article above, where you summarize the grub commands from the Doctor’s Blog. Trust me on this, as I’m the guy who wrote the original post, that Doctor Tux used for that blog article. As current written in your article, it won’t work, You need the “root (hd0,4)” line to tell grub which partition’s grub to use, and the setup line needs to point to the MBR of the disk, (hd0)

    As written above, you say;

    In my case it is (hd0,4) thus I typed the command
    setup (hd4,0)

    first, the drive and partition numbers are transposed, and that should be the line;

    grub> root (hd0,4)

    followed by;

    grub> setup (hd0)

    then

    grub> quit

    I’m not trying to be picky, as the article overall is great, but it also needs to be accurate in the details where grub is concerned, or it loses credibility for those who try the commands as presently written, and they don’t work.

  4. parnote

    Ver,

    Thank you for the permission to reprint your blog entry in the PCLinuxOS Magazine. LOL … I don’t know why I didn’t think of posting a reply when I was looking for a way to contact you.

    parnote

  5. Robert Chambers

    The person who runs the PClinuxOS Magazine has looked on your blog site for a way to contact you to ask for permission to add this article to the PClinuxOS Magazine.

    If you decide to go to the PClinuxOS forums he is known as parnote

    • Ver Post author

      Hi Robert,

      Please do so, It is my pleasure to have my blog be added into the PCLinuxOS Magazine.

      Cheers,

      Ver

  6. old-polack

    Your grub commands are wrong.

    grub.> find /boot/grub/stage1
    (hd0,4)

    grub> root (hd0,4)

    grub> setup (hd0)

    grub> quit

  7. Phil Wadsworth

    If you make a LiveCD remaster of your running PCLinuxOS system then you can use this to put your full Linux configuration back to what it was if it gets borked, including the Grub menu. I’ve done this several times afrer playing around with Windows installs on my dual boot machine.

  8. David

    PCLos and Mandriva make it even simpler – no CLI. With the Live disk go to “Configure My Computer” -> “Boot” section -> “Set Up Boot System” and it will do it for you. You can also easily change the default OS (if you really want) and do further tweaks although I just suggest you agree to everything as you go along. Also in the System menu you have “Redombr” which basically show you your boot (grub) configuration.

Comments are closed.