Before you downsize the Windows partition or decide in the installation program on the optimal size of the new partitions for Linux, you should know what a partition is and how it is used.
Partitions are sections on the SSD or hard disk. Partitions with Windows file systems get their own letters (C:, D:, etc.) and seem to behave like independent hard disks.
Usually, there are already a few partitions on the data medium of a Windows notebook: the already mentioned ESP, plus possibly other small partitions with the boot system, drivers, and a recovery system, as well as a large partition that fills almost the entire SSD. This partition contains a file system with Windows and your personal data.
You will need additional partitions as soon as you want to install several operating systems on your computer at the same time. There are two reasons for this: On the one hand, different operating systems often use different file systems—that is, different methods of storing files within the partition. On the other hand, separate partitions avoid duplications and conflicts in directory and file names.
Linux usually provides for several partitions itself—for example, one partition for the operating system, another for your own data, and a third as a so-called swap partition. This is the counterpart to the Windows swap file.
For a Linux installation, it doesn’t matter how much space is left on your SSD or hard disk on Windows. You cannot use this space—inside a Windows partition—for Linux. You need space outside the existing Windows partition(s) for the Linux installation to create new Linux partitions there.
To change the partitioning of the hard disk, each operating system provides its own tools:
Increased Flexibility with LVM: Changing the partitioning at a later date requires a great deal of effort. In many cases, the contents of a partition are lost when its size is changed. Moving partitions is also not provided for. For this reason, it is recommended to plan the partitioning well from the beginning. Linux professionals can work around many limitations by using the LVM system. This is an intermediate layer between partitions
and file systems.
There are two methods for managing partitioning information on an SSD or hard disk:
MBR is intended for disks up to a maximum of 2 TiB. There are three types of partitions: primary, extended, and logical. A maximum of four primary partitions can exist on the hard disk. It is also possible to define an extended partition instead of one of these four primary partitions. Inside the extended partition, you can then create multiple logical partitions.
The point of extended and logical partitions is to get around the historically imposed limit of only four primary partitions. Note that some partitioning tools do not differentiate between different partition types in the user interface and take care of how the partitions are created internally.
An extended partition serves only as a container for logical partitions. Only primary and logical partitions are suitable for the actual storage of data.
With GPT, each partition is identified by a globally unique identifier (GUID). All partitions are equal; that is, there is no distinction between primary, extended, and logical partitions. Each partition can be up to 8 zettabytes (ZiB) in size: that's 2 bytes, or about a billion TiB!
Note that the partition numbers do not have to match the actual order of the partitions. Suppose you create three partitions of 200 GiB each, then shrink the second partition to 50 GiB. This creates a gap between partitions 2 and 3 in which you can set up the fourth partition.
Comprehensive information about the structure of the GPT partition table and compatibility with various operating system versions can be found on the following Wikipedia page: https://en.wikipedia.org/wiki/GUID_Partition_Table.
On Windows, partitions that the operating system can use are designated with drive letters. A: and B: are reserved for floppy disks for historical reasons. The other letters denote the partitions with Windows file systems.
On Linux, internal access to hard disks or their partitions takes place via socalled device files (see table below). Hard disks and SATA SSDs are given the designation /dev/sda, /dev/sdb, /dev/sdc, and so on, in sequence. For SSDs for the NVMe interface, however, the device names start with /dev/nvme.
To address a single partition and not the entire hard disk, the partition number is added to the device name. With GPT partitioning, all partitions are simply numbered in sequence. In MBR partitioning, on the other hand, the numbers from 1 to 4 are reserved for primary and extended partitions. Logical partitions always start with the number 5.
Partitioning only reserves space on the SSD or hard disk. Before you can store files in a partition, you must create a so-called file system. It contains administrative information in addition to the actual data. Creating a file system in a partition is also called formatting. Windows and Linux use different file system types:
Editor’s note: This post has been adapted from a section of the book Linux: The Comprehensive Guide by Michael Kofler.