Tutorial: How-to dual-boot Linux with XP


Distinguished Member
So you have a computer running Linux, then you add XP, and you're no longer able to boot Linux?
Or perhaps, you installed XP first, then Linux, but for some reason or another, Grub is no longer in the MBR, and it boots straight into XP.

Well, there is a solution other than putting Grub (back?) in the MBR, for those who prefer to have Windows control the boot process.

The solution:

Boot into XP.
Download and install EasyBCD 2.0. Technically, earlier versions will work with this, but its always best to have the latest version of Easy.
Run EasyBCD.
Click on the Useful Utilities button on the left panel of the EasyBCD window, or whatever CG is calling it these days. :smile:
Now click on Power Console.
A Command Prompt window should open with the C:/Program Files/NeoSmart Software/EasyBCD/bin directory already entered for you. This saves you from having to cd to that location.
Now, type this in the command-line, and press Enter:
The program "Bootpart" in the /bin directory should now run, and should display a list of the detected HDDs (hard disk drives) and partitions it found on your system.
So, now find the partition which Linux is installed to. You should notice that every partition has a value assigned to it. Note the value of the Linux partition.
Next, type this in the command-line and press Enter:
bootpart.exe LINUXPARTITIONVALUE [B]X[/B]:\linux.lnx "Linux"
where "LINUXPARTITIONVALUE" is of course replaced with the numerical value given by Bootpart for the Linux partition, and "X" is replaced with the correct drive letter of the "active" partition on the HDD you're booting from, as seen from the XP system's Disk Management (which would probably be C in most cases).


What this command does is adds to your boot.ini file (which contains all the entries in your XP boot menu) an entry pointing at a "linux.lnx" file which Bootpart creates in the root of the X: partition. The entry itself is named "Linux" in my example. Free free to name it anything else you want to name it. This file which Bootpart creates is actually a 512 byte assembly program, which basically chainloads the bootsector of the Linux partition which should then take care of loading Linux. (If it doesn't, you'll want to make sure Grub is installed to the partition you're trying to chainload to.)

That's it! :smile: You should now have a dual-boot system with XP and Linux working smoothly with XP's boot manager in control of the boot process.

If after applying this method, you're not seeing a boot menu, and/or the boot menu does not stay up long enough for you to select the Linux entry to boot into, then you will need to open up the "boot.ini" file (EasyBCD provides this function also, which I think is called something like "Edit Legacy Boot Entries" in the Tools menu, but you can also open it manually in Notepad), and change the "timeout" value to something long enough for the menu to display and which gives you enough time to select the Linux entry before it boots into the default XP entry.

Side note: Also note that this method of multibooting XP with Linux should always work regardless of whether XP and Linux are the only systems there. Even if you're multibooting W7 or Vista along with XP and Linux, and W7 or Vista is in control of the boot, this method of booting Linux should always work as long as XP is booting fine from Vista/7's boot menu. And if you're using multiple XPs, this method should still work fine.
Last edited:
First you should create 25% of the HDD for the Linux and make it as the unknown partition. First install Linux in that unknown partition and then install the xp otherwise it may corrupt the xp.
First you should create 25% of the HDD for the Linux and make it as the unknown partition. First install Linux in that unknown partition and then install the xp otherwise it may corrupt the xp.
You don't need 25% of the HDD for Linux, to follow this tutorial. :lol:
Nor will Linux corrupt XP if you install it right (and don't, for example, try to install it in XP's partition).
And the Linux partition must be formatted with a Linux filesystem (for example, ext3 or ext4). Only exception to this is if you use something like Wubi, and install Ubuntu to a Windows partition inside a virtual partition (called a "root.disk").