I'm going to show how to install Ubuntu in a Windows machine without having to erase Windows. Now, I know very well that sometimes you don't have enough space in you'r C: partition. I know that you may want to install Ubuntu in a partition where you have more space. Taking that into account, I will set the following environment:
- A machine with Windows XP.
- 2 partitions, C and D.
- Ubuntu installed in a disk different than C. In this case we will use E (it could be D, it depends on you configuration). We're not going to use all the space available in E, assuming that we have data there.
- Boot configured to start with Windows.
- Ubuntu installed from a USB Flash Drive.
Mini Partition Tool installed. Download it here: This tools will let you make the required partitions on the disk.
The last Ubuntu Version: Of course, the OS to install.
UNetbootin. Download it here: This tool will allow you to install Ubuntu from a USB Flash Drive.
Make the bootable USB Flash Drive
1. Open unetbootin-windows-583.exe. Set the options as shown in the following image and press Ok:
1. Open Mini Partition Tool.
2. Select E:
3. Click on Move/Resize
4. Shrink the disk. I'll shrink the disk to half its current size. The idea is to create free space for everything you need in Ubuntu. Then press Ok.
1. Restart the machine. The USB drive should be connected by now.
2. Enter the Bios and configure it to boot from the USB drive. This depends on your machine. You usually can enter you Bios by pressing F2 or Del in the first moments when the machine is starting.
3. If it boots from the USB drive, you will see a screen with "Default" selected; that is to start Ubuntu from the USB. Just the time pass or press Enter.
4. After that, Ubuntu will be started. You will see something like this:
5. In the Welcome dialog, select your languaje and press Continue.
/ Just that symbol. It's the root path. Ubuntu will be installed here. Any programs you install in Ubuntu will be installed here as well. So, think for a moment how much of the space is needed. In this case, I'll use about 40% of the available space for Ubuntu.
/home All the documents, photos and data will be stored. It's like "My Documents" for Windows, but this is more general. The logic is a little dfferent for Ubuntu. You are not supposed to worry about C: or D: units to store data.
swap area This is like the virtual memory for Windows. The OS uses it when it's out of memory. The general rule for the size of the swap area is to double the size of the memory. If you have a RAM of 512, put 1GB. Nevertheless, with 2GB or more of memory, 2GB should be enough. In this case, I have a machine with 512 of RAM, so the swap area will have 1GB.
9. To add each partition, select the "+" sign after selecting "free space".
To create / : Configure the "Create partition" dialog like the following picture (remember, I'm using 40% for this partition):
11. Select your Keyboard layout and press Continue.
12. Enter your personal data in the "Who are you?" dialog.
After this, you already have Ubuntu Installed.
Post installation problems: Restore Grub
Every time I installed Ubuntu alongside with Windows I had this problem: Grub (the Ubuntu boot loader) doesn't work. It's like it was never installed. When I rebooted my computer, Windows initiated without giving me any chance to enter Ubuntu. In case you have the same problem, here are the steps to restore Grub, and how to configure it to have Windows as the default OS.
1. Boot from the USB drive.
2. When you see the Ubuntu desktop, open the Terminal.
3. Enter the following commands. Just press Enter when you are asked to.
sudo add-apt-repository ppa:yannubuntu/boot-repair (note that you have to enter your root password)
4. Go to Dash Home and write "Boot Repair". Open it.
5. Click on "Recommended repair" and wait.
Set Windows as Default OS in Grub
1. Open the Terminal and open Grub: gksu gedit /etc/default/grub
2. A text file will be opened. Change "GRUB_DEFAULT=0" to "GRUB_DEFAULT=4". If you saw the Grub menu when the system is starting, you will see that there are some options to select. The first is the regular Ubuntu, so it corresponds to 0. If Windows is in position 5 (which is very likely), it corresponds to number 4.