Scenario: You want to install Linux on your system which is already running Windows XP.
Tutorial Summary: We’re assuming that Windows XP is already up and running on your system. We’ll install Ubuntu 7.04 over the top to dualboot both operating system.
This tutorial has been tested on a VMWare Workstation 6 machine and an ASUS P5AD2-based Intel system with 2GB RAM and an 80GB Seagate SATA drive.
The first thing is to make sure you have the Ubuntu Live CD. You can certainly use Ubuntu 7.04 for this tutorial instead and it should work pretty much the same. However, the screenshots won’t be the same and there may be some steps which don’t match.
You can grab a copy of Ubuntu 7.04 from here:
Burn the ISO to a CD and you’re ready to go.
Prepare the XP System
Fortunately there’s almost no preparation needed from the perspective of the XP partition. Of course it needs sufficient space to install Ubuntu, and you can certainly create this space manually using either the latest version of the GNOME Partition Editor (available here), or use the application from the Ubuntu Live CD.
However, Ubuntu will use the same partition managing tools during installation, so we can leave it until that stage of the install.
Boot the XP machine from the Live CD and select “Start or install Ubuntu”.
On the next screen, choose the appropriate keyboard layout and then Forward.
Now Ubuntu loads the disk partitioner. The first option, to resize the main partition and use the freed space, is pretty much the best one to go with.
The default recommendation for the new partition size is optimal, but you can move the slider up and down to change it as you see fit. If you’re feeling brave, you can also manually edit the partition table, but unless you’re really confident about what you’re doing, this isn’t recommended.
Click Forward to continue.
Ubuntu now has enough information to install, so click Install and go make a coffee.
When the install is complete the system will reboot. When the GRUB boot menu is displayed, have a look at the last entry in the list.
After the Ubuntu boot options, there will be an entry “Other operating systems” and beneath that “Microsoft Windows XP Professional” (or Home, whichever version you’re using). By default Ubuntu will load itself after 10 seconds.
If you choose to boot Windows XP at this point, it will probably launch a check on its partition. This is because the partition has been resized since last boot, and it will want to run a consistency check to make sure there are no problems.
When XP loads, it will also probably detect new hardware (again, the resized partition) and will prompt to reboot.
On reboot it will probably run through another, longer consistency check and then reboot. This is the last time you’ll need to do this.
If you want to modify how GRUB handles the new dualbooting environment, you need to edit the boot menu. Boot into Ubuntu and open up a Terminal window (Applications, Accessories, Terminal), and type in:
sudo gedit /boot/grub/menu.lst
This opens up the boot menu as a text file in gedit.
There are loads of options you can change, but only a couple that you’re likely to be interested in. The default boot entry is defined by the “default” value.
The default value is 0, which means that the first entry in the list (which is Ubuntu) always gets loaded.
If you want to make it so that Windows XP loads by default, change the value to 4, as XP is the fifth item in the list (the numbering system starts at 0).
The other way to load Windows XP by default is to change the value for “default” from a numerical value to “saved”. Then, GRUB will load whichever boot entry has been marked with “savedefault”.
If you scroll down the list and have a look at the entries, you’ll notice that both the main Ubuntu entry and Windows XP have been marked with “savedefault”. Remove the value for Ubuntu and Windows XP will launch by default.
You can also increase the boot menu timeout – just change the value for “timeout”. You can also hide the GRUB boot menu by removing the hash in front of “hiddenmenu”. Save and exit gedit to keep any changes.
And that’s about it. Dualbooting Windows XP and Linux when Windows is installed first is by far the easiest method of dualbooting, because most up-to-date Linux distros are very aware and accommodating of other operating systems, and GRUB is an excellent and highly flexible bootloader.fonte: apcmag.com