Steam for Linux

Steam for Linux

Not enough ratings
Not a Complete Guide on GNU/Linux Desktop Partitioning
By Pepe
This is not a complete guide on how to partition your GNU/Linux distribution, but more of a starting point or a personal cheat sheet on partition layouts and sizes for a GNU/Linux Desktop, depending on space and basic security requirements.
   
Award
Favorite
Favorited
Unfavorite
Intro
Unless constrained by internal organizational guides and rules, many users have their own way of doing things, so this is just one way of partitioning the disks. Please read more on partitioning from your distro documentation. Every distro has its own quirks in regards to partitioning. Additionally, read Debian, Arch Linux and Fedora Partitioning documentations. For a new user, it's just best to keep the default configuration from the installer.

Note: Advanced and expert users will know what partitions they want and how big they want them to be for their particular needs. If you're one of them, this page could be just a light reading for you.

To keep it simple, there are only two partitioning layouts described, Basic and Advanced. A new GNU/Linux user should consider the Basic layout as a starting point in their partitioning scheme (if not going with the installer's default), while someone with experience might consider using the additional partitions in the Advanced layout.

For each category, there are multiple size configurations:
  • the Default size configuration should be more than enough for most uses for at least five to ten years. By that time you'll know how things work and how to move things around rather than filling up space in root (/) or /var. It's a good size to mess things up and still be OK;
  • the Minimal size option is great for users with limited space. It should be enough for many years to anyone knowing how to clean their temporary and cached files, while not bloating the system with multiple apps doing the same thing or installing multiple Desktop Environments (DEs). It's also a good sizing option for a basic development workstation. Minimal should be more than enough for a GNU/Linux Desktop used for gaming, too;
  • the XS configs should be considered by users with some GNU/Linux experience, that have tight constraints on disk space. It also could be a great option for someone using a PC as a light office computer or as a thin client, doing everything on the web or on a remote cloud station. Even someone using just Steam for gaming should be fine, as all the games are installed in user's home.
Tip: If you want more legroom with the disk space, use the Basic layout. It just offers more flexibility with the existing space without the need to complicate things with Logical Volumes; not that working with Logical Volumes is too complicated, but if you can keep it simple, why not.

The home directory has no specific size defined in this guide, it should be 100% of the remaining free space on the disk or the full size of a new disk all together.
Assumptions
  • no need for hibernation that would require a swap file/swap partition;
  • use of zram, no swap file/swap partition;
  • system has 12GiB RAM or more.

But, but...
OK, OK, here are some hibernation tips:
  • for hibernation use a swap file; swap partitions are not recommended for SSDs as they wear a specific area of the SSD at a different rate than the rest of the disk;
  • you can use zram as the very fast system swap and a swap file just for hibernation;
  • the size of the swap file should be
    RAM_size - zram_size + zram_size * zram_max_compression + fragmentation < RAM_size + zram_size * zram_max_compression < RAM_size + zram_size * 4
  • create the swap file in root (/) or in /var/swap;
  • use any layout from below, additionally adding to root (/) or /var (for Advanced setup) the amount of swap file needed;
  • additional reading: https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation.
Optional Hints on Partitioning
Optional hints for extra redundancy, security or flexibility:
  • (o) Redundancy - software RAID 1 with mdadm
  • (o) Security - LUKS Encryption with cryptsetup
  • (o) Flexibility - Logical volumes (pv - vg - lv)

These topics are not the main subject of this small guide. Feel free to do your own research about them on the web.
Basic Layout
/boot/efi /boot / /tmp /var/log /home

Boot
Boot - same for all configurations
/boot/efi 1GiB /boot 1GiB
But... but...
"Boot only needs 100 MiB."
"Boot only needs 200 MiB."
... some time later...
"Boot only needs 300 MiB."
... and later...
"Boot only needs 500 MiB."
See a pattern?
"But, but, now it's all in /boot/efi ."
No, it's not.

* Note that some distros might use /efi instead of /boot/efi as the EFI system partition (ESP) mount point (E.g. Arch[wiki.archlinux.org]). DON'T use /boot for ESP! It's just not right.

Size Configurations
Default
## Default 75GiB (system total) + 2GiB boot = 77GiB / 65GiB (o) lv0_root /tmp 5GiB (o) lv1_tmp /var/log 5GiB (o) lv2_log /home 100%FREE (o) lv3_home
What are those (o) lv names?
Those are name suggestions in case you chose to use the optional Logical Volumes.

Minimal
## Minimal 58GiB (system total) + 2GiB boot = 60GiB / 50GiB (o) lv0_root /tmp 5GiB (o) lv1_tmp /var/log 3GiB (o) lv2_log /home 100%FREE (o) lv3_home

XS 50
## XS 50 48GiB (system total) + 2GiB boot = 50GiB / 40GiB lv0_root /tmp 5GiB lv1_tmp /var/log 3GiB lv2_log /home 100%FREE lv3_home

XS 40
## XS 40 38GiB (system total) + 2GiB boot = 40GiB / 34GiB (o) lv0_root /tmp 3GiB (o) lv1_tmp /var/log 1GiB (o) lv2_log /home 100%FREE (o) lv3_home

XS 30
## XS 30 28GiB (system total) + 2GiB boot = 30GiB / 24GiB (o) lv0_root /tmp 3GiB (o) lv1_tmp /var/log 1GiB (o) lv2_log /home 100%FREE (o) lv3_home
Advanced Layout
/boot/efi /boot / /tmp /usr /var /var/tmp /var/log /home

Tip: Consider using Logical Volumes for the Advanced layout, for flexibility.

Boot
Boot - same for all configurations
/boot/efi 1GiB /boot 1GiB

Size Configurations
Default
## Default 75GiB (system total) + 2GiB boot = 77GiB / 10GiB (o) lv0_root /tmp 5GiB (o) lv1_tmp /usr 30GiB (o) lv2_usr /var 20GiB (o) lv3_var /var/tmp 5GiB (o) lv4_var_tmp /var/log 5GiB (o) lv5_var_log /home 100%FREE (o) lv6_home

Minimal
## Minimal 58GiB (system total) + 2GiB boot = 60GiB / 8GiB (o) lv0_root /tmp 5GiB (o) lv1_tmp /usr 25GiB (o) lv2_usr /var 12GiB (o) lv3_var /var/tmp 5GiB (o) lv4_var_tmp /var/log 3GiB (o) lv5_var_log /home 100%FREE (o) lv6_home

XS 50
## XS 50 48GiB (system total) + 2GiB boot = 50GiB / 5GiB lv0_root /tmp 5GiB lv1_tmp /usr 20GiB lv2_usr /var 10GiB lv3_var /var/tmp 5GiB lv4_var_tmp /var/log 3GiB lv5_var_log /home 100%FREE lv6_home

XS 40
## XS 40 38GiB (system total) + 2GiB boot = 40GiB / 5GiB (o) lv0_root /tmp 3GiB (o) lv1_tmp /usr 18GiB (o) lv2_usr /var 9GiB (o) lv3_var /var/tmp 2GiB (o) lv4_var_tmp /var/log 1GiB (o) lv5_var_log /home 100%FREE (o) lv6_home

XS 30
## XS 30 28GiB (system total) + 2GiB boot = 30GiB / 3GiB (o) lv0_root /tmp 3GiB (o) lv1_tmp /usr 14GiB (o) lv2_usr /var 5GiB (o) lv3_var /var/tmp 2GiB (o) lv4_var_tmp /var/log 1GiB (o) lv5_var_log /home 100%FREE (o) lv6_home


Why this layout?
While a Desktop doesn't have the same purpose as a Server, having some separation between the main system directories can reduce the risk of a buggy or a rogue app filling up all the system space. While there are other subdirectories that might be filled up by certain apps (a mail server might fill /var/mail, or the package manager might fill /var/cache), for a Desktop, we need to strike a balance between security and making the space available for multiple uses. We have to take a calculated risk for things that don't pose any real threat:
- how many people are installing a mail server on their desktop computer?
- how many times are the package updates filling up all the space in /var? can we cleanup the package manager cache? Yes, we can;
- do we need to further fragment the disk space for things that are very unlikely to happen and that can easily be fixed? Probably not.

Some sources:

Why those sizes?
Root (/)
  • /bin: symbolic link to usr/bin
  • /lib: symbolic link to usr/lib
  • /lib64: symbolic link to usr/lib64
  • /sbin: symbolic link to usr/sbin
  • /opt might contain some significant sized 3rd party applications

/usr
  • /bin: symbolic link to usr/bin
  • /lib: symbolic link to usr/lib
  • /lib64: symbolic link to usr/lib64
  • /sbin: symbolic link to usr/sbin
  • /usr useful if sharing it between machines on NFS or to keep it read-only and change it to write when needing an update
    "/usr is the second major section of the filesystem. /usr is shareable, read-only data.
    That means that /usr should be shareable between various FHS-compliant hosts and must not
    be written to. Any information that is host-specific or varies with time is stored elsewhere.

    Large software packages must not use a direct subdirectory under the /usr hierarchy."

/var
  • /var/cache keeps package caches that could be significant in size (RedHat/Fedora: /var/cache/dnf, Debian/Ubuntu: /var/cache/apt/archives)
Cleanup Hints
Cleaning up the following locations helps when system disk space is needed:
- /tmp - /var/log * - /var/cache ** - /var/tmp * Additionally limit journalctl logging ** Use package manager tools to do a basic safe cleanup
Extra Security Tip
For security reasons, some system directories can be limited not to allow executing files, running with other user's privileges due to setuid and setgid bits or having access to special devices.

nodev Do not interpret character or block special devices on the filesystem. noexec Do not permit direct execution of any binaries on the mounted filesystem. nosuid Do not honor set-user-ID and set-group-ID bits or file capabilities when executing programs from this filesystem. In addition, SELinux domain transitions require permission nosuid_transition, which in turn needs also policy capability nnp_nosuid_transition.

The temp and logs directories are the most obvious locations where these limitations can be applied. Add noexec,nosuid,nodev in /etc/fstab to log and tmp partitions. /var * is another partition that can be hardened for the Advanced layout.

* If you encounter any issue with a poorly designed app that requires to execute its binaries from /var, just remove the added mount options, or... find an alternative app that is better built for GNU/Linux.

noexec,nosuid,nodev on Basic Layout Partitions
- /tmp - /var/log

noexec,nosuid,nodev on Advanced Layout Partitions
- /tmp - /var - /var/tmp - /var/log

Some sources:
Guide History
Major Updates
2025-08-22
- updated XS 40 and XS 30 advanced layout configurations: increased the root (/) size in the detriment of /usr and /var, to have more space for 3rd party applications (/opt).
2025-04-13
- added XS 50 configuration.
2024-10-20
- initial guide release.