How does Ubuntu partition the disk when we choose "Erase disk and install Ubuntu" during installation?

How will Ubuntu automatically allocate the disk partition sizes when we select Erase disk and install Ubuntu during installation?

enter image description here

Can the settings for automatic space allocation be changed?


Solution 1:

When you choose "Erase disk and install Ubuntu" there is nothing to choose; the installer will automatically allocate all disk space on the selected disk to Ubuntu and install nothing on any other disks except for the selected disk.

When installing in legacy (aka MBR) mode:

  • Older versions, up to and including 16.04, will create a massive primary partition formatted ext4 mounted on / and a logical partition to be used as swap space sized in accordance with the amount of RAM.

  • Newer versions will dispense with the swap partition; they will create just one partition covering all the disk space and will allocate a swap file just as Windows does.

When installing in UEFI mode an EFI system partition will be created, in accordance with UEFI requirements; it will be mounted as /boot/efi.

The BIOS/UEFI settings will not normally need to be changed before installing Ubuntu for any of these options.

If you want to control the allocation of disk space, for example because you want a separate partition for /home, you should create the partitions using gparted (if installing a desktop system) or parted / fdisk (if installing a server), optionally configure LUKS and LVM, then in the installer choose Something Else and allocate partitions or logical volumes to mount points explicitly.