During the boot, press the Enter button twice when the command prompt is waiting to select the keyboard diagram and the language settings. When the main GUI interface appears, right-click on the main partition (depending on your installation, maybe / dev / sda1 ) and select Resize / Move .
Use this slider to create enough space for installing XP later and click Resize / Move .
Once done, exit GParted and reboot the computer from the Windows XP CD.
Install Windows XP
When the CD has finished downloading, press the Enter key to install Windows XP, then press F8 to accept the license agreement.
When the partition screen appears, you can see that Windows Setup recognizes the two existing Ubuntu partitions and specifies the drive letter in letters (although it cannot read data from them).
The space created for Windows XP appears here, select it and press Enter .
Since the main active partition ( / dev / hda1 ) is marked as bootable, Windows cannot be installed until this partition is marked as inactive so that the new partition "takes over." Press Enter to change and then reformat the new partition.
Unfortunately, XP discovers two Ubuntu partitions and has specified the drive letter for them so the new partition used for installation will be designated as drive F. This is not the standard letter for the Windows drive.
However, this problem only makes it difficult for older applications that need to default to the installation location as drive C.
Reboot the computer when Windows is installed and you will see the machine boot right into XP. Since the Ubuntu GRUB boot loader component in the Master Boot Record has been overwritten, Ubuntu has not started yet.
There are quite a few ways to make the Ubuntu partition bootable, but it is quite picky and must use FAT32 partition (FAT32 can be used for both Ubuntu and Windows). However, the simpler way is to reinstall GRUB as a system load component.
Reinstall GRUB into Master Boot Record
Boot the computer using Ubuntu Live CD.
Go to the GNOME Partition Editor and you can see that Windows XP Partition is considered / dev / hda2 and marked as the boot partition.
Right-click the Windows partition and select Manage Flags .
Uncheck ' boot ' and select Close .
Right-click on Ubuntu's main partition (/ dev / hda1), select Manage Flags and check ' boot ', click Close .
Now reinstall GRUB . Open Terminal (Applications, Accessories, Terminal) and type in sudo grub line
The GRUB application will work. Type find / boot / grub / stage1
This command will find where GRUB is installed and you will get the result of hd (0,0) .
Change location by typing root (hd0,0)
Now you are about to reinstall GRUB into the Master Boot Record, not the Ubuntu partition.
Type setup (hd0)
This will save GRUB into the Master Boot Record. Type in QUIT and EXIT lines to exit GRUB and Terminal. Then restart the system. Ubuntu will appear at startup.
Edit the boot menu
The next thing to do is edit the GRUB boot menu to allow Windows XP to load at startup.
Boot into the Ubuntu system and go to the Terminal utility. Type in the sudo gedit /boot/grub/menu.lst line
This will help load the GRUB menu file (basically a text file) inside GEdit.
Go to the following section ' ## ## End Default Options ## ". There are components of the GRUB menu.
To create a new entry, scroll down to the end of the list and type the following lines:
Windows XP title
root (hd0,1)
makeactivechainloader +1
This will place an entry in the boot menu to load Windows XP from its partition (hd0,1).
If you want more options, go up to MENU.LST and find TIMEOUT lines. The numerical value is specified for TIMEOUT to determine the amount of time to access the boot menu (in seconds) before the default operating system downloads.
To configure the system to start in parallel, it is better to raise this value.
Just above TIMEOUT is DEFAULT. This feature determines which operating system is started by default.
The counting system starts from 0 and counts up. So DEFAULT = 0 means that Ubuntu always starts by default. If you want Windows XP to always start up, change its value to 0.
Save MENU.LST and exit GEdit and restart the system. Type ESC when asked to get the boot menu. Go down to the newly created Windows XP heading and press Enter. Windows XP will be downloaded.