This document belongs to Manual Full System Encryption (with Extras): Overview.

1. Determine what you need


If you do not understand partitioning, please first carefully read through the Partitioning topic.


You will be dealing with sizes measured in MB (megabytes) and GB (gigabytes). A GB is 1,000 times larger than a MB. So, 20GB = 20,000MB.1


Before having a look at the physical machine, you need to determine your minimum requirements for your Ubuntu system.

  • EFI System Partition (ESP): The recommended size is 577MB (550MiB), but Windows creates one only 99MB. That's OK, because we won't fill it up.

  • Boot: Ubuntu's default size is 500MB, so we'll stick with this.
  • Root: Ubuntu recommends at least 5GB, but in practice that is far too small. At least 20GB makes a safer size.
  • Swap: The size of your RAM. So, if you have 16GB RAM, you want a 16GB swap.

    If you intend to never use hibernation or hybrid suspend, swap can be far lower. For a machine with 8GB RAM or more, where you won't do memory-intensive work such as editing videos, you can even do away with swap altogether. For a machine with 4GB or lower, it is a good idea to have a swap partition of at least 2GB.

  • Data: How much data do you need for storage? This is entirely a personal choice. If you are going to store photos and videos, you will need sufficient space. If you will store only documents, you could probably get away with just a few gigabytes.

Add all these figures together. If you have a separate drive for data, you can add up only the first four items and place your data on the separate drive.

In the examples that follow, data will go onto a second drives, and so we add up only the first four as follows.

ESP

99MB (because Windows made it that size)

Boot

500MB

Root

20GB = 20,000MB

Swap

4GB = 4,000MB

Total

25GB approximately; it doesn't have to be exact

  • If the EFI partition already exists, leave it alone and don't include it in the final total. If it doesn't already exist, ideally set it to 577MB (550MiB).

* Data will go on the separate drive. If you don't have a separate drive, you must add its requirements to the total.

2. Find out what you already have

This chapter will guide you through discovering what space you already have. You will look at your system drive, which might be your only drive, and any other drives that you might have.

2.1. Windows

Press Start and type "computer management". Open the Computer Management application.

Select Storage > Disk Management. You'll see something like this (it may take several seconds to display):ComputerManagement.png

What you see in this example is the primary system disk "Disk 0", which contains four partitions and one unallocated area (i.e. without a partition). In the screenshot, it looks like only three partitions and an unallocated area, because Windows completely hides one of them, partition 3.

'Number

Size

Name

Purpose

1

450MB

Recovery

Windows uses this for recovery

2

99MB

EFI System (ESP)

Required to boot a computer with UEFI

3

16MB

MS reserved

This is hidden! You can't see it from Windows

4

23.86GB

Windows 10 (C:)

The C: drive. The name of the file system is "Windows 10"

35.59GB

An unallocated area (there is no partition here)

You can also see an unused disk, "Disk 1", which is 5GB, and the DVD drive, "CD-ROM 0".

The important bits here are partition 4 (the C: drive), size 23.86GB, and the unallocated area, size 35.59GB.

Of course, this is an example. Your actual figures will be different.

2.2. Linux

Open the Dash and type "gparted". Select the icon to open GPartEd (Gnome Partition Editor).

  • If you don't find gparted, you can install it. Open a terminal (Ctrl+Alt+T) and enter the following command.2

    sudo apt install gparted

You will see something like this. gparted-Windows-only.png

What you see in this example is the primary system disk /dev/sda, which contains four partitions and one unallocated area.

'Number

Size

Name

Purpose

1

450MB

Basic data

Windows uses this for recovery

2

99MB

EFI System (ESP)

Required to boot a computer with UEFI

3

16MB

MS reserved

For Windows only to use

4

23.86GB

Basic data

The C: drive. The name of the file system is "Windows 10"

35.59GB

(No name)

An unformatted partition (i.e. it has no file system)

The important bits here are partition 4, size 23.86GB, and the unallocated area, size 35.59GB.

If you select the drop-down menu at the top right, where it says /dev/sda, you can see /dev/sdb if one exists.

Of course, this is an example. Your actual figures will be different.

3. Decide how to partition the drive

In my example, I need 25GB. Fortunately for me, there is already a spare unused area of 35.59GB available on the drive, which is unused, so I'll use that.

But, your situation is almost certainly different. For example:

  • You might have a spare partition (often called the D: drive in Windows) that you haven't used. If so, you can use that partition — but check that it doesn't contain data or you will lose that data!

  • Your C: drive might fill all available space on the disk so that you have no spare space on the drive.

You will need to release space on your main drive for the system as calculated in the initial determination.

Where will the space come from:

  • Shrink your existing C: drive?
  • Shrink an existing spare partition?
  • Delete an existing spare partition?
  • A combination?

Part of your decision will be to decide if the data goes in the same partition as the system, or in a separate partition altogether. If you have sufficient space, it is entirely a personal decision.

3.1. Contiguous system space

contiguous

Space on the drive is said to be contiguous if it is unbroken. If it is split into two or more separate parts, it is not contiguous.

  • The EFI System Partition (ESP) does not have to be in any specific location.
    • If the ESP already exists, just leave it where it is.
    • If you want paranoid mode, prepare a USB stick, put the ESP on there and once installation is complete, be sure to make a clone of the USB stick (because you will be unable to boot if the original USB stick fails). This is an advanced topic, which these instructions do not support.
      Mentally-Deranged-Smiley-Face-Silhouette.png

  • The spare space for your system partition (Boot, Root and Swap) must be contiguous on your system drive.
    • If the system partition will also contain the data, it still needs to be contiguous.
  • If the data goes in a separate partition from the system, the data partition doesn't need to be contiguous.
  • If you have sufficient space for the system, but it's not contiguous, refer to Support in Troubleshooting for how to ask for help. Although it is possible to move partitions using gparted, doing so can cause problems with your system.

    3.2. The decision

    Before you proceed, decide where you want the following to go.

    • Your EFI partition (if it's not already there)
    • Your system partition (Boot, Root and swap)
    • Your data partition (if not included with the system)

    If you are unsure how to decide, refer to Support in Troubleshooting for how to ask for help.

    4. Release space

    If you are lucky enough to have a spare partition, you need to check that it is already empty, because any data on it will be lost! Then delete the partition.

    However, if you aren't that lucky, you will need to shrink the size of your existing partition in order to make space. If you have a data partition, you can consider shrinking it instead of the system partition.

    • Remember: if you are unsure, refer to Support in Troubleshooting for how to ask for help.

    What follows is a basic guide to shrinking and deleting partitions. If you need further detail, look up how to shrink, delete and move partitions on your favourite search engine, YouTube, or wherever else you might prefer. Beware: moving partitions can mess up your system.

    4.1. Partitioning in Windows

    You will need to have opened the Computer Management application.

    • To shrink a partition:
      • Calculate the space in MB. For example, if you need to shrink the volume by 25GB, you will shrink it by 25,000MB.
      • Right-click the selected partition and select Shrink Volume…

      • You will be given a maximum amount (in MB) by which you can shrink. If it's the C: drive partition, don't shrink it by that much, otherwise your Windows system won't have enough space to function! Leave at least 10,000MB spare (if you can). Shrink it only by as much as you actually need to release the required system space.
    • To delete a partition:
      • Check that the partition contains no data, otherwise you will lose all data on it!

      • Check that you are selecting the correct partition, otherwise you will delete the wrong one!

      • Once you have checked, double-checked and triple-checked, right-click the partition and select Delete Volume…

    4.2. Partitioning in Linux

    You will need to have opened gparted.

    • To shrink a partition:
      • If it is a Windows partition (e.g. the C: drive), it is generally safer to use Windows itself to shrink the volume, as described in Partitioning in Windows above.

      • Calculate the space in MB. For example, if you need to shrink the volume by 25GB, you will shrink it by 25,000MB.
      • Right-click the selected partition and select Resize/Move.

      • Adjust the sizes as required. The easiest way is to place the required size in the box Free space following (MiB) and press Tab. It will calculate the other boxes for you.

      • Check that the value is correct, and press Resize/Move.

      • Either press the green tick or choose the menu item Edit > Apply All Operations.

    • To delete a partition:
      • Check that the partition contains no data, otherwise you will lose all data on it!

      • Check that you are selecting the correct partition, otherwise you will delete the wrong one!

      • Once you have checked, double-checked and triple-checked:
        • Right-click the partition and select Delete.

        • Either press the green tick or choose the menu item Edit > Apply All Operations.

    5. Next

    Now that you have decided what space you need, and cleared it from your system drive and (if appropriate) your second drive, you are ready for installation. Return to the Overview and continue.


    1. For the pedantic, you can measure in either MB and GB, or MiB and GiB. A GiB is 1,024 times as large as a MiB. For the purposes of this document, the difference between MB and MiB (or GB and GiB) is unimportant and so it doesn't matter which measurement you use. (1)

    2. If you are familiar with Ubuntu, you might wonder why we are using gparted instead of Disks (gnome-disks). This is because Disks doesn't have the functionality that we require later. (2)

    ManualFullSystemEncryption/OverviewPartitionPreparation (last edited 2017-04-04 09:03:15 by slickymaster)