Dual-booting XP and Linux - It's really easy!

Dual-booting XP and Linux - It's really easy!

Summary: Over the past few weeks several people have asked me if it's possible to set up a Windows XP/Linux dual-boot system on a PC that already has Windows XP installed on it, and if it's possible, how easy is the process.


Over the past few weeks several people have asked me if it's possible to set up a Windows XP/Linux dual-boot system on a PC that already has Windows XP installed on it, and if it's possible, how easy is the process. 

Well, I'm here to tell you that it's pretty easy to do.  In fact, the process is only marginally more work that installing Linux in the first place (which, if you've installed Linux before, you'll know if pretty easy).

Here's how it's done.

  1. First, start off with a machine with XP already installed on it.
  2. Next, download a Linux distro.  I'll be using my personal favorite, Ubuntu 7.04 Feisty Fawn.
  3. Burn a CD of the ISO you downloaded and pop it into the drive and boot up off of it.
  4. Start the install process.  This will take you through the Welcome screen, the Where are you? screen and the Keyboard layout screen.
  5. Now you'll come to the disk partitioner.  Choose the Resize [main partition] and use freed space option.  This is where you find out if you have enough free space to do the job.  The default recommendation for the new partition size will be ideal, but you can move the slider along to change the values to suit.  When you're done, click Forward.
  6. Now you can go away and leave the install to churn away until it's done.  It shouldn't take all that long.
  7. When the install is complete the system will reboot.
  8. When the system boot up, now you'll be greeted by the GRUB boot menu.  From here you can choose which OS to boot into.  In my case Ubuntu will be the default and will start automatically in 10 seconds.
  9. The first time that you reboot into Windows the OS will more than likely want to check the disk since the partition has changed size since Windows was last running.  XP will also likely want to re-detect hardware and such and probably reboot.
  10. That's it!  Yes, it's that simple.

In Ubuntu I can also tweak the GRUB bootloader settings.  To do this you need to fire up a Terminal window (ApplicationsAccessories Terminal) and type the following into the window:

sudo gedit /boot/grub/menu.lst

Hit ENTER and then type in your password hit ENTER again and you get access to the boot menu file in gedit.

The default boot entry is defined by the default value. Change this value to reflect which OS you want to boot up automatically.  The default value is 0, which means that the first entry in the list (in this case Ubuntu) will be loaded automatically.  If you want to change it so that Windows XP loads by default, change the value to 4 (because here XP is the fifth item in the list and the numbering system starts at 0).  You can also increase the boot menu timeout by changing the value of timeout from the default 10 to something else. Save the file to committ the changes.



Topics: Windows, Hardware, Linux, Microsoft, Open Source

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.


Log in or register to join the discussion
  • Its easy going one way

    Its much harder unfortunately trying to install windows with Linux already installed. Most of the time the windows installer throws a fit if it can't be on the first partition of the primary drive. At least thats been my experience, has this gotten better with Vista or later releases of XP?
    • Actually, it's really easy if you have more than one hard drive.

      GRUB allows you to trick any Windows OS into thinking it's on the primary partition. I have a quad boot system which includes Win XP and Win NT 4.0 of which neither are on the primary partition. My Win XP OS is on a secondary master drive and my NT 4.0 OS is on the primary slave drive.

      If you have multiple hard drives, all you need to do is install windows on the first partition of it's drive when the drive is in the primary master. When the install is done, you can physically change the drive to an alternate location and mess all you want with GRUB and other installs.
      • RE: Dual-booting XP and Linux - It's really easy!

        @aeriform But can I install a 64-bit Linux OS? My MB is 64-bit. Just kept XP after I changed it.
  • Linux is a lot easier ....

    ... than some people would have you believe. Two things hold people back

    1) Fear.
    2) Applications not available.

    If 2) were tackled (and it slowly *is* being tackled) then 1) will slowly diminish.
    • Yes, because

      sudo gedit grub is so intuitive and non-intimidating.

      Two words: Boot Camp.

      Linux still need to play catch up.
      • You sure it's not you that needs to 'catch up'? NT

      • I don't know why...

        ... he choose to do it that way. I just would have clicked on the "editor" icon myself or used the Grub loader in YaST (aka "control panel")
      • re: Yes, because


        Can I use Boot Camp to install OS X on my Vista/XP MCE box?

        I thought not...
        M.R. Kennedy
      • Mac needs 2 words, everyone else needs NONE

        Did you not notice that the command line was only used to [b]tweak[/b] the configuration? The initial install actually set everything up for you, no user modifications required. So, while the Mac needs 2 words (Boot Camp), the Dell requires none. Hmm, it would appear that it is Apple that needs to catch up!!

        Oh, and before you get all high and mighty about the fact that some things can, if the user chooses to do so, be done with the command line (though note that there is a GUI for editing GRUB options), feast your eyes on this beauty:
        [url=http://www.mymac.com/showarticle.php?id=2525] Command Line HELL on a Mac [/url]

        [i] After opening Terminal, a window will open with a text prompt. At the prompt type:
        sudo nvram boot-args=""[/i]

        Yeah, because [b]sudo nvram boot-args=""[/b] is so intuitive and non-intimidating!!
        • You really should try the software you rail against

          because if you did, you would have found a much stronger argument against Boot Camp.

          The fact that you cannot choose the OS you want when you boot with Boot Camp makes it an inferior choice to grub or just about any other bootloader. In fact, Boot Camp isn't even a bootloader, all it does is change the active partition on your boot drive and change your boot drive if you have a different physical drive. So you want to cold boot into OS X but Windows was the last OS you booted, you'd have to boot into Windows and go into the control panel to choose OS X as your new boot partition. Which is why anyone wanting to dual or triple boot with a Mac should use rEFIt.
          Michael Kelly
        • diagnostic mode

          What does the ability to boot OS X in diagnostic mode have to do with setting up a dual boot scheme - which every flavour of Windows sucks at? Or do you think being able to boot an OS in diagnostic mode is a bad thing?
        • Actually . . .

          You can bring your menu.lst up in a simple test editor, and edit it that way. No command line involved.

          In PCLinuxOS, when I go to edit this file, it brings up the password screen so I can log in as root, then opens the file for me, and when I'm done, it automatically logs me out as root. No muss, no fuss.
      • Not all Linux distros are like this...

        There are many Linux distros to choose from, and they all have their strengths and weaknesses. In this particular example with Ubuntu - configuring the boot loader requires the use of command line (sudo, gedit, etc.). In my distro of choice, SUSE Linux, you can use a graphical tool to make all changes to the boot loader (part of YAST). It's very easy to do, and no command line is required.

        It's a mistake to assume that all Linux distros are the same -- for good and for bad.
        • You are so right and I agree

          I have to say I think your post is right on, although I tried SuSE, a commercial version which was ok as I believe one should support the services you want to use. SuSE is Debian based which many linux distros are derived from including Xandros Business Edition 3.0 and Xandros Professional 4 which I upgraded to. This is not an ad for Xandros as it has it's shortcomings and I doubt I will stay with it as I don't agree with Xandros or SuSE in their signing their agreements with Microsoft. SuSE was the first to sign and it paved the way for Xandros which I found disturbing as it was not something that Xandros nor SuSE were forced to do but chose to do. I will be moving on to another version of linux, most likely Debian, until I get a look at what Mac's new Leopard OSx has to offer. The reason I think Debian will be my next choice is because so many chose it to base their versions on. Windows is no longer an option as the terms and conditions of it's licensing agreement is way past the point of where I'm willing to go. I do wish MS continued success.
      • Of course, that's not the only way...

        You could just use the GUI of GrubEd to do the job, it *IS* easier that way (and saves one from incorrect formatting of the changes). Linux is about having choices!

        I think the real difference is how comfortable you are typing - as [b][i]gksudo gedit /boot/grub/menu.lst[/i][/b]
        is probably faster by quite a bit :)
      • Then again

        When you have used IBM's BOOT MANAGER, and have gotten used to putting an OS anywhere that you wish, M$'s insistence on being drive 0, partition 0, is a real hassle.

        I guess that it goes back to M$'s belief that they own all computers and even though we pay for them, we have no right to actually control them.

        I won't argue with you about documentation, just point out that from my standpoint, M$'s documentation is a joke.
        Update victim
    • You have nothing to fear but FEAR itself! ;)

      D T Schmitz
    • Applications....

      I have both windows and linux boxes at home. Have an old iPod, and thought "what the heck, let's try it" I connected it to a linux box, and was amazed how nice and easy it was to use. I think it's very close to being ready for non-technical people. Ubuntu 7.10
  • better than dual-boot

    Better than dual-boot .. vmware server on Ubuntu!
    I have been windoz free for a month now and luvin it!!
    I do have some windoz apps I use under wine or vmware dependin.
    The pain, sufferin, aggravation, hours of wasted admin is over.
    • Exactomundo

      I have VMware server set up with WinXP pro and can 'on demand' it from suspended in 3 seconds.

      An additional benefit once a VMware instance is created is that you can run it from virtually 'any' location and make backups of it[1].

      [1] VFAT formatted drives file size limit of 4GB applies but the VM can be defined in 2GB 'growable' chunks which works fine.
      D T Schmitz