One of the big problems with Linux is that it has to have its own hard disk, or a section of a hard disk that is dedicated.
The simple reason for this is that Windows runs on a file system called NTFS and Linux doesn’t!
So you want to install Linux onto a machine that already runs Windows, but you are not quite sure how to do it? It is really quite simple.
For the purpose of this demonstration, I am going to install Linux Mint onto a Windows machine, though this should apply equally well to any Ubuntu based Linux.
Before we go any further, BACKUP any essential files to a CD or to another external disk. We are going to be playing around with disk formatting, and in the eventuality of anything going wrong, everything will be lost off the disk. However, I have played around with disk formatting and a failure is rare. It’s best to be on the safe side though.
Insert your Linux DVD and boot up. Strange things seem to happen and in a short while you will see this appear on your screen –
This is a running version of the system, but at the moment it is running purely in memory. It has not been installed yet. Double click on the ‘Install Linux Mint’ icon. After a short while it will ask for your language of choice. Next it checks that there is sufficient space on the disk, whether the computer is plugged in and if it’s connected to the Internet. The first two are essential. If you haven’t enough space then forget it (unless you can archive a few Gigabytes of unused files off the computer). The power connection is very important as if the battery runs down during the installation process you could potentially lose everything.
Now we come to the interesting part. It asks where we want to install Linux. The option to select is the third one – ‘Something else’
A new screen pops up and shows the current state of your disk.
In my example, I have a 51.7 Gb disk, and Windows is installed in the main area – dev/sda2. It is flagged as NTFS and takes up 51.6 Gb but we are only using 6.4 Gb. There is nowhere to install Linux so we will have to make space. Select the large partition and click on the ‘Change’ button. A new window pops up –
Now I want to allocate about half my disk to Linux, so I want to create about 25Gb of free space. Where the box says 51640, I change it to 26640, thereby freeing up 25Gb of space. Do not change anything else on that screen. It will immediately warn you that it is about to do something drastic! It will do a bit of disk checking and then come back with a new screen –
Note how there is now 25Gb of free space, and the NTFS partition has shrunk to the 26640 that we specified. In actual fact, nothing has actually happened yet, so we are still free to abandon the whole process.
Next we want to create the area for Linux to reside.
Basically Linux requires two partitions – one for the actual installation and one called a ‘Swap area’. However we are going to install Linux in three partitions – the Swap area, and area for Linux itself, and an area for all our own files and settings. This makes life a LOT easier when reinstalling Linux at a later stage. It separates Linux from our own files and if Linux goes belly-up, our files are untouched.
Select the line marked ‘free space’ and then click ‘Add…’
The first partition we will create is the Swap area. Enter 2000 (2Gb) in the size box. Change ‘Ext4 journaling file system’ to ‘swap area’. Leave the other two options alone. Your screen should be showing as follows –
Click on OK.
Next we will create the area for Linux. Select the free space again. Select ‘Add…’ and then set the size to around 6000 (6Gb should be enough) . Leave ‘Ext4 journaling file system’ as it is. Change Mount point to ‘/’, and click OK.
Last but not least, we want to set up what is called the Home area for our own files and settings.
Select the free space again. Leave the size as it stands, which means we will grab all the available space. Leave ‘Ext4 journaling file system’ as it is. Change Mount point to ‘/home’, and click OK.
You should now see this –
Note how we now have a swap area and two ext4 areas, and the larger one (marked ‘/home’) is 17Gb. That should be plenty!
Now we reach the stage where we have to commit ourselves. There is no going back once you hit the ‘Install Now’ button, but don’t worry unduly!
Click ‘Install Now’.
That’s it. Linux will resize the old partition and create the new ones. It will ask all the usual questions about Timezones, Usernames, Passwords and the like, but the hard bit is complete.
SOME ADDITIONAL NOTES.
The sizes I have used above are not hard and fast. Some recommend that the Swap size should be around the same as the memory size, while others will say that you need twice that. This machine runs very happily on a 3Gb Swap, while the memory is 4Gb! The root ‘/’ partition can be as low as 3Gb, but some programmes do install in there so it needs a bit of breathing space. Also, some programmes require a lot of temporary files, and they will be written in there, so I tend to give it at least 10Gb to play with. The home ‘/home’ partition can be as big as you like. Mine is currently around 150Gb, but then I use programmes like VirtualBox which can take up a LOT of space.
If you are reinstalling Linux then the above procedures are the same. However there is one vital thing to note –
When you are allocating the partitions, select the root ‘/’ partition and leave it as Ext4, but mark it for formatting. However when it comes to the Home ‘/home’ partition, allocate it as Ext4, using ‘/home’ but DO NOT FORMAT IT. If you format it, it will wipe your files irretrievably. On the other hand if you don’t format it, all your settings and files will remain for future use.