Warning: The following steps will destroy all data on your hard disk.
The fourth installer screen will display your current hard disk layout and ask you to choose how you want to partition the disk. If you’re installing onto a new hard disk the screen will look like this:
If you’re installing onto a hard disk that already contains some partitions (that you are about to delete), the screen will look something like this:
Regardless of what you see on this screen, select Specify partitions manually (advanced) and press the Forward button. This will take you to a screen that will allow you to add, modify and delete partitions. If you’re starting with a disk that contains some partitions, you will see a list of those partitions that looks something like this:
If you are starting with a new disk, you will only see the first line (which represents the disk itself), and the bar at the top will be solid grey (i.e. empty). Regardless of what you see here, press the New Partition Table… button, after which you will be asked to confirm the operation with the following popup:
It’s worth noting here that none of the changes you make to the partitions will become permanent until the last configuration screen of the install, where you will be asked to confirm your configuration and start installing the software. So feel free to experiment if you like, you can always press the Quit button if you don’t want to proceed.
Now, press the Continue button. This will create the new, empty partition table on the hard disk, essentially wiping out whatever partitions were already there. The partition table is stored in the first sector of the hard disk and is used to describe the layout of the disk (i.e. the partitions). Creating a new partition table gets us a clean slate to start from, ensuring that there is no confusion between existing and new partitions. After the partition table is created, the main partitions screen will look like this:
Now let’s create some partitions. For each partition we’re going to create, you start by selecting the free space line and pressing the Add… button. This will display a popup window where you can set the properties for a new partition. It will look like this:
For the first partition, enter the values above and press the OK button. This will create a 20 GB partition for the system files. Now let’s go over the partition properties in detail.
The first line describes what type of partition you’re creating. The partition table only has room for 4 partition entries, which are referred to as the primary partitions. Any or all of these primary partitions can be used to extend the partition table, from where you can create more partitions, referred to as logical partitions. Since we don’t need more than 4 partitions, we’re going to create all of them as primary partitions. This keeps things simple and uses less disk space.
The second line specifies the size of the partition in megabytes (MB). Since 1 GB = 1000 MB, all of our sizes will multiples of 1000.
The third line describes where the partition will start from, either the beginning of the free space on the disk or the end of the free space on the disk. All of the partitions we create will start from the beginning of the free space.
The fourth line describes how the partition will be formatted, which is another way of saying which file system will be used on the partition. The current standard for Linux systems is the Ext4 file system, while the previous standard was the Ext3 file system. In the Windows world, NTFS is the current standard, while FAT32 was the previous standard. Since we’re installing a Linux system, we’ll use Ext4 for all of the partitions (except the Swap partition, which is special).
The fifth and last line specifies where the partition will be mounted (i.e. the path to that partition). Linux systems use one big tree structure to describe the layout of all the file systems on the machine. The root of that tree is displayed as / (forward slash). Unlike Windows systems, where each partition on each hard disk is given a drive letter (ex. C: or D:), Linux file systems use normal names starting from the root. So one partition, usually containing the system files is mounted as /, and all the others are mounted as subdirectories of /. For example, we’ll be creating a partition that will hold all of the user files (i.e. the home directories) and it will be mounted as /home. On the server machine we’ll be creating another partition for the shared data files and it will be mounted as /data.
Now that you have a basic understanding of the partition properties, let’s create the other partitions. So select the free space line and press the Add… button again. This time we’ll create the Swap partition by entering the following properties:
There are two things that are special about the Swap partition. First, it is very small, and second it doesn’t have a mount point. The swap partition is used by the operating system when it runs low on RAM (i.e. when there are lots of programs running). In this case, the OS will suspend the operation of one or more programs and save the contents of their RAM to the swap area, thus freeing up that RAM for use by another program. When one of the suspended programs needs to run again, the contents of the RAM is copied back in from the swap area and some other program’s RAM is stored there. This operation is invisible to the user and is (hopefully) seldom used, because it slows down the operation of everything running on the computer. However, it’s always good to have this space set aside just in case. So press the OK button and let’s move on to the data partitions.
The next partition we’ll create is for the user’s personal data files. If this is a desktop machine, we’ll use all of the rest of the hard disk. If this a server machine, we’ll use a small amount of disk space and save the rest for the shared files. In both cases we’ll mount the partition as /home. So once again, select the free space line and press the Add… button. For a desktop machine, leave the partition size the way it is, which will use all of the free space, and enter the other values as follows:
For a server machine, specify a size of 10 GB and the other values as follows:
That’s it for a desktop machine, but for a server we need to create one last partition. As mentioned above, this last partition will be used for the shared files and will be mounted as /data. So one last time, select the free space line and press the Add… button. Leave the partition size the way it is, which will use all of the free space, and enter the other values as follows:
Once you have done all this, and depending on whether your installing a desktop or server machine, the main partitions screen will look something like one of the following:
Yours will probably be slightly different than mine. I was using hard disks with existing partitions that used the same sizes and file systems as some of the new partitions, so my Used column has some numeric values in it instead of unknown. And for the same reason, I had to manually check the items in some of the Format? columns, so those checkboxes are enabled and dark instead of disabled and greyed out. Furthermore, the size of the last partition will depend on the size of your hard disk. Regardless of the differences, just make sure that all the Format? checkboxes are checked (except for the Swap partition, which can’t be formatted), then press the Forward button. Remember, none of these changes will become permanent until we get to the last install screen, so you won’t do any harm by continuing on to the next part of this tutorial.