Partitioning Overview and Existing Partition Tables
Views
Actions
Namespaces
Variants
Tools
Overview
Manjaro uses a text-based disk partitioning tool called cfdisk. How you choose to partition your hard disk manually is largely down to personal preference. However, some guidance has been provided, particularly for any new users wishing to manually partition their hard disks. Partitioning (that is, dividing) your hard disk when installing an operating system may be undertaken for a number of different reasons. The most common examples include:
- Meeting the requirements of certain operating systems (e.g. Windows requires at least two partitions; one for the boot, and one for Windows itself)
- The ability to install multiple operating systems on a single hard disk
- Separating parts of the hard disk to serve specific purposes (e.g. for booting, or to serve as virtual memory / Swap), and
- Separating parts of the hard disk to store specific types of files (e.g. for system files, or for personal files, etc).
Primary and Logical Partitions
There are two types of partition that may be used to divide a hard disk. These are Primary Partitions and Logical Partitions. Primary partitions are a throwback to the early days of computing, and only allow for a hard disk to be divided into a maximum of four parts (i.e. you can have a maximum of four primary partitions). Logical partitions were developed to overcome this limitation. They are - in essence - a way of further sub-dividing a primary partition. A primary partition that has been sub-divided into logical partitions is known as an Extended Partition.
While the maximum number of Primary Partitions allowed on any drive is 4, through using Logical partitions, an IDE drive can be subdivided into just over 60 partitions, while a SCSI drive can be subdivided into over a dozen. Below is a simple illustration of how logical partitions can be used to partition a hard disk into eight parts:
Conventions and Guidelines
- The convention for listing drives and partitions is: sd [hard disk letter] [partition number]. For example, the first (or only) hard disk connected to your system will be listed as sda, the second sdb, and so on. In respect to partitions, sda1 would be the first partition found in the first hard disk, sda2 would be the second partition, and so on. Logical Partitions will always begin from '5'.
- Unlike Windows (which requires that there is a primary partition specifically to boot), Linux systems such as Manjaro have no specific requirements for the use of Primary or Logical Partitions. For example, Manjaro may be installed using all Primary Partitions, all Logical Partitions, or a mixture of the two.
- Although the assisted preparation method creates separate partitions for the GRUB (Boot), virtual memory (Swap), Manjaro operating system (Root), and personal files (Home), this is an entirely optional set up. For example, the Boot, Root, and Home partitions can be easily combined into a single partition. This is the case with other popular distributions such as Mint.
- Separating or combining partitions is where personal preference comes in. Each set-up will have its own advantages and disadvantages. For example, separating Boot, Root and Home has the advantage of easily backing up and/or repairing problems without affecting anything else. A disadvantage is the potential to run out of pre-allocated space for a partition (e.g. the Root), even if ample space is available on the hard disk itself.
- Although allocating a swap partition is itself entirely optional, it is still strongly recommended that you do so, particularly if you wish to use hibernate or suspend functions, as these will require use of a swap partition. Manjaro should therefore be installed using a minimum of two partitions.
- Unless you know exactly what you are doing, the size of the swap partition should be the same as the amount of RAM your system is using (e.g. 2 gigabytes of space would be allocated to a swap partition if using 2 gigabytes of memory).
- However you decide to partition your hard disk, almost any of them can be designated as a bootable partition and contain the GRUB. The exception is the swap partition.
- Two Linux operating systems installed on the same system can share the same GRUB and Swap Partition; they don't need one each.
Where Using an Existing Linux Partition Table
It is worthwhile noting that the Manjaro installer will not overwrite a Home folder if it contains an existing username. As a consequence, the pre-installed desktop environment will lose its Manjro configurations, and revert back to its basic ('vanilla') settings. In order to restore the Manjaro configuration settings, having booted into the freshly installed system, it will be necessary to enter the following command in your terminal:
cp -a /etc/skel/. /home/[username]
For example, for an account called carl, the following command would be entered:
cp -a /etc/skel/. /home/carl
Once complete, it will then be necessary to ensure that you have full ownership of the Home folder by entering the following command:
chown -R [username] /home/[username]
For example, for the same account called carl, the following command would be entered:
chown -R carl /home/carl