Root partition size based on disk size

The root partition is created automatically during installation when the "Erase disk and install Trisquel" option is selected.

The size of the root partition is determined during installation by the automatic partitioning scheme, but the percentage values show inconsistency, which led to performing custom disk size installations in order to evaluate and gather the following data:

Observations of VMs with disk size by GiB:
* 25 GiB disk → root size: 9,90 GiB — 39.60% of total disk
* 40 GiB disk → root size: 13.36 GiB — 33.40% of total disk
* 75 GiB disk → root size: 21.38 GiB — 28.51% of total disk
* 80 GiB disk → root size: 22.53 GiB — 28.16% of total disk
* 100 GiB disk → root size: 22.75 GiB — 22.75% of total disk

Observations of VMs with disk size with GiB based on whole GB values (as used in the [https://trisquel.info/en/wiki/system-requirements System Requirements]):
* 23.3 GiB (25 GB) disk → root size: 9,51 GiB — 40.82% of total disk
** This is the current system requirement.[1]
* 46.6 GiB (~50 GB) disk → root size: 14,89 GiB — 31.95% of total disk
* 56 GiB (~60 GB) disk → root size: 16,99 GiB — 30.34% of total disk

The values are shown with two decimals, as finer precision may vary slightly between installations. However, as shown, the root filesystem reaches its maximum practical size when the disk is around 80 GiB. Increasing the virtual disk beyond this point provides only negligible growth in the root partition. Therefore, allocating more than ~80 GiB to the disk does not significantly increase the root filesystem. 80 GiB equals 85.8993 GB, it is rounded up to 90 GB (nearest 5 GB) for easier specification of the system requirement.

/dev/mapper/vgtrisquel-root is the root filesystem device when the default 'Use LVM with the new Trisquel installation' option is selected. It cannot be resized after installation—for example, booting Trisquel in live mode from a USB cannot resize it (see https://bugs.launchpad.net/ubuntu/+bug/2023637). This limitation may lead to inconvenience if the partition is too small for long-term use.

====Virtual machine testing====
You can reproduce these results or test against future Trisquel releases by setting up virtual machines with configurable disk sizes.

* Adjust the disk size variable:

os_variant=trisquel11
disk_size_gib=80

* Install Trisquel in a VM:

qemu-img create -f qcow2 ${os_variant}.qcow2 ${disk_size_gib}G
virt-install --name Trisquel-${disk_size_gib}GiB \
  --os-variant $os_variant --vcpus 4 --memory 32000 \
  --disk path=${os_variant}.qcow2 \
  --cdrom ~/Downloads/trisquel_11.0.1_amd64.iso

* Run the script to generate the VM and start the Trisquel installer
* Complete the installation in the VM, reboot, and log in.
* In the VM, to check the exact root filesystem size (displayed in the same format as the list above, e.g. "22.53 GiB"), run:

df --block-size=1 | awk '$1=="/dev/mapper/vgtrisquel-root" {printf "%.2f GiB\n", $2/1024/1024/1024}'

==References==
1: 25 GB is the current stated system requirement that is based on an old discussion (see https://gitlab.trisquel.org/trisquel/package-helpers/-/issues/90#note_9663)

Revisions

09/13/2025 - 17:47
David_Hedlund