What is a partition?
In a computer, the operating system along with the users’ files reside on a drive.
Schematically, a drive is divided in partitions, listed in a partition table on that same drive. Each partition contains files, listed in a file table on that partition.
How do i know how many partitions i use?
- If you installed Manjaro with the default settings, you should use a single partition (excluding EFI and swap partitions).
- Graphically, you can use tools such as gparted, gnome-disk-utility or partitionmanager.
- In a terminal, you can list partitions and their filesystems with
I use a single partition. What do i do?
Using one or many partitions are both perfectly fine options. Both have their advantages and drawbacks, so it is up to each user to set up their partitioning as they see fit.
Why would i partition my system?
When partitioning, you do need to weight in the benefits and drawbacks of what and how to partition:
- Dividing your installation in partitions may allow you to operate a partition without affecting the others. But since each partition has a capacity limit, over-partitioning may leave you some partitions too small for your usage.
- The operating system can be partitioned, but all such partitions shall be automatically mounted at boot.
- All or some user files can be stored on partitions separate from the operating system, and may or may not need to be automatically mounted at boot.
- This can allow sharing files between multiple operating systems, for security or when (at least) one cannot access the partition of another.
How should i partition my system?
Here are some questions to ask yourself that can help you decide on a partitioning:
- What files should a set apart?
- Why should i set those files apart?
- Where do i mount those files?
To illustrate, here are some common use cases:
- /home contains all user files, so putting it on a separate partition also let the operating system to have its own. This allows for instance to reinstall or change operating system while keeping all user files.
- /media/share shall contain files one wants to share with another installed operating system. This is quite mandatory when dual-booting with Windows, as the latter cannot read filesystems usually used on Linux.
Tip: when creating a partition, add a label to it, so you can more easily identify it.
For more details on partitioning, see: Partitioning - ArchWiki
When should i partition my system?
- Ideally, partitioning your system before or at installation is easier, as you do not have to work with existing files and partitions.
- But if you already have running system, do not fret! Even if you will need to be careful, it is still perfectly doable even at this point.
During the graphical installation, you have the option to use manual partitioning. In this mode, you can modify your partitioning and, more importantly, select which partitions to use and where to mount them.
- Selection of a partition for / is mandatory, and that partition will always be formatted.
- If your computer uses an EFI bootloader, do not forget to select the EFI partition for /boot/efi !
You will have a chance to review your partition mount scheme before validating the installation.
For more details, please refer to the User Guide, at the Manual Installation sections.
Extra partitions, not mounted at boot, can be mounted while Manjaro is running. This can be done graphically through most file managers, or with the mount command.
In the case you want to automate the mounting at boot, or change the mount location or options, you can set up your system to do so.
You can technically mount a partition (almost) anywhere, though some locations are more standard or common practice:
- Mount points within /media are standardly used for removable devices. As such, partitions mounting there are usually shown in the Devices part of most file managers’ side panel.
- Mount points within ~ (/home/<user>) benefit from that user’s file permissions without extra setting.
- /data is also often suggested for a mount point, in case of a partition to be accessed by multiple users, and which content is to then be linked from each user’s home.
A mount point is basically a folder, which content is “replaced” by the content of the partition mounting there. Creating a mount point thus simply requires to create a folder.
Attention! Folders outside /home are commonly owned by the root user. You thus need to:
- Use superuser privileges to create the folder:
sudo mkdir -p /path/to/folder
- Change the folder permissions so user(s) can use it. Depending on your use case, you can either:
- change the owner to the sole user
sudo chown $USER:$USER /path/to/folder
- change the permission globally
sudo chmod ugo+rwx /path/to/folder
Several methods exist for configuring those mounts. See the following guides for details:
The previous section applies all the same, because the relevant configuration handles only partitions. So what matters is not actually the drives themselves, but their partitions.