Advanced or manual disk partitioning is available for those that want to create a custom set of partitions for installing Ubuntu 11.04. For whatever reason or reasons you choose to use the advanced disk partitioning tool, this article gives a step by step guide, with detailed explanations, on how to do it.
This tutorial assumes that you are going to create partitions for a standalone installation of Ubuntu 11.04. If you are going to create partitions for dual-booting with Windows or another Linux distribution, a future article, to be published soon, will provide instructions on how to create partitions manually, when dual-booting.
On a default installation of Ubuntu 11.04, the installer creates just two partitions; the first for /, the root directory, and the second for Swap. When creating partitions for installing any desktop Linux distribution, my recommendation is to create the following four partitions:
- /boot, the boot partition. This is where programs critical for booting the system will reside.
- /, the root directory. The bulk of the programs used for running the system will be installed here.
- Swap, unformatted disk space for use as virtual memory.
- /home, the partition where your home directory will be located. In the course of using the system, files and folders you create will reside in various folders here.
Note that this guide is for creating partitions when using the graphical installer available with the CD and DVD ISO images. The Alternate Installer CD ISO image uses an ncurses-based installer. To reduce the number of images used, this tutorial begins at the step where disk detection starts.
Depending on the state of the disk you are installing on, the disk partitioning methods step will look like the one below. To get to the advanced partitioning tool, select the Something Else option and click Forward.
This is the main window of the advanced disk partitioning tool. This is a standalone installation, so the first task is to delete all existing partitions. If the target disk is a new one and it has not been initialized, select it and click the New Partition Table button.
When you are done deleting existing partitions, or initializing the disk, if it needed to be initialized, the main window will look just like this. Now, you can start creating partitions. Note that the first partition should be mounted at /boot.
Select the free space and click the Add button.
This is the partition creation window of the advanced disk partitioning tool. There is nothing very complicated about it, but if you are new to disk partitioning on Linux, the following explanation is for you: There are three types of partitions that we can create with this tool, and they are, primary, extended, and logical. The disk partitioning scheme used by this tool allows for a maximum of four primary partitions. I am not going to go into the reasons, but just understand that you can only create four primary partitions. There is no way around that unless you want to use a different partitioning scheme, which this tool does not support
But what if you want to create more than four partitions in this scheme? That is where an extended partition comes in. When you create one partition as an extended partition, the system makes it possible to create an unlimited number of partitions under it. Those partitions are called logical partitions.
Except for the partition that will be used as swap, any other partition has to be formatted, a file system stamped on it and then it is mounted at a particular directory – the Mount point.
That is a summary explanation of disk partitioning. Now, let us actually create those partitions.
If you are attempting to install Ubuntu alone on the disk, the installer will create the first partition as a primary partition. And that first partition, following the recommendation made earlier, should be mounted at /boot. The default file system for /boot on Ubuntu is ext2. You can use that, or ext4, the default journaling file system on Ubuntu 11.04. The partition number of this boot partition, if it is the first partition on the disk, will be /dev/sda1. While many Linux distributions assign about 500 MB of disk space to /boot, only about 30 MB is used on a new installation of Ubuntu 11.04. If you are tight on disk space, you can go as low as 50 BM, but keep in mind that disk usage on /boot will grow with each upgrade. Click OK to create it.
Now that /boot has been created, select the free space and click on Add to create other partitions. Note that this step will have to be repeated for all other partitions.
The second partition will be for Swap. The installer will attempt to create it as a logical partition, but you do not have to. Like /boot, it could also be a primary partition. The first logical partition of an extended partition is /dev/sda5. If you create this partition as a primary partition, it will be /dev/sda2.
Select “Swap area” from the “Use as” dropdown menu. The “Mount point” menu will be disabled because Swap does not need a mount point. A disk size of 2000 MB or 2 GB is usually good enough for Swap. Add.
The third partition will be for /. The installer recommends a minimum of 4.4 GB of disk space for installing Ubuntu 11.04, but on a new installation, just 2.3 GB of disk space is used. As more applications are installed on a running system, disk usage will grow, so you want to be very generous here – if you have disk space to spare. The default file system on a non-boot partition is ext4. Other options available are ext3, xfs, jfs and reiserfs. Btrfs is also a file system option, but the disk partitioning scheme for installing Linux on a btrfs file system is slightly different from this one. That will be covered in another article.
OK to create this partition.
The final partition will be for /home. The file system is ext4, and you may use the available disk space here. OK
Back to the main manual partitioning window, you can see all the partitions just created. Before you click Install Now, you have to determine where GRUB, the boot loader, will be installed. On a standalone installation, the best location is the default – in the Master Boot Record of the disk. It is also possible to install it in the /boot partition, but that is not recommended for this installation.
That is how to partition a disk using Ubuntu’s advanced disk partitioning tool. You can have quality articles like this delivered automatically to your feed reader or inbox by subscribing via RSS or email.
This website now has a Question and Answer section. Use the commenting system for simple comments, but for more involved assistance, please use the Q & A section.
Thanks for this article. Novice user like me will get benefited by this step by guidance. I have installed ubantu 18.04 successfully on my laptop.
Thanks for walking us through it. I’m installing on a hard drive where I’ve got a partition I want to keep plus some free space.
Thank you for the awesome article. I am installing Ubuntu 13.04 on my Mac mini, and this tutorial helped me a lot.
The only one thing that differs from your tutorial is that the system asked me to create an EFI boot partition (not the same as /boot), when I clicked on the Install Now Button.
I made it a logical partition. Should I have made it primary, or there is no much difference?
Anyway, my first Linux is going to be installed in a few minutes. Thanks again!
I think you are likely going to be using GPT. In that case, the concept of “primary” or “logical” does not apply.
Thank you for a quick answer!
I guess it is better to have just an EFI boot partition on a Mac. I made a second installation without a /boot partition and it works fine. In fact, when I had 2 boot partitions (/boot set as a primary and EFI boot as logical) I wasn’t able to install Ubuntu from USB drive (my Mac just didn’t show it as a bootable device), so I had to insert Mac OS X DVD, get to the Disk Utility, format/erase my HD, and force restart my Mac. This way Mac just loads the Ubuntu installation from USB drive. But, as I said, on a second installation I went just with EFI boot partition set to Primary (Macs don’t have BIOS), and if you hold Option/Alt on power up, it gives you an EFI boot option. This way you don’t need to insert Mac OSX DVD in order to install/reinstall Ubuntu, and it’s a good way to have just one OS installed.
I hope this will help some new Mac/Ubuntu users, since I’ve seen a lot of problems booting from USB drive on a Mac on forums that people encounter.
Can I install /boot as a logical sda5? Do I need a logical /usr and /usr/local also? I have a 500 GB hdd. Computer is for home and office use and some games via MAME Arcade emulator.
Yes, /boot can be a logical partition.
Unless you have a special need for them, you don’t need /usr or /usr/local. Those are typically for server usage. If you want, you can create a separate partition mounted at /opt for your 3rd party games. It’s not necessary, but the option is there and it won’t break anything.
I wanted Ubuntu to see my second hard drive so I used this paritioning method (auto-partitioning doesn’t allow me to use both HDD’s).
After installing I got an error while booting (no such device: . grub rescue
Can you boot into the OS on the other HDD?
Thank you so much. My first Ubuntu installation is one the way. Still cant understand why Linux needs so many file systems but i guess its OK…