18

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?

karel
  • 114,770
srinuab4u
  • 371
  • 2
    If you want to control the partition sizes, please select 'Something else' at the partitioning window of the installer. You can also do the partitioning in advance with gparted and let the installer use the partitions that you already prepared (when selecting 'Something else'), which means manual partitioning. – sudodus Dec 07 '17 at 09:18
  • 6
    I think this question should be answered as written. How does ubiquity decide how to partition the disk? I would love to know the answer :) – Zanna Dec 07 '17 at 12:45
  • 2
    srinuab4u, please tell us if you want to know how to get your own partition structure (how to modify the default partition sizes), or if you want to know how the automatic system is working and the partition sizes are calculated and set up. – sudodus Dec 07 '17 at 13:03

1 Answers1

17

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.

karel
  • 114,770
AlexP
  • 10,197
  • I created ubuntu distro and while i installing that ubuntu distro selected options of Erase disk and install Ubuntu with other options of Encrypt the new Ubuntu installtion for security and Use LVM with the new Ubuntu installation. In next screen entered security key and click on Install now, Now it is showing the message of Some of the partitions you created are too small. Please make the partitions atlease this large /boot 276 MB If you do not go back to the partitioner and increase the size of these partitions, the installation may fail. – srinuab4u Dec 12 '17 at 06:55
  • @srinuab4u: What Ubuntu version are you trying to install? What is the capacity of the fixed disk on which you are installing? – AlexP Dec 12 '17 at 07:37
  • Ubuntu 14.04 LTS (64 bit), Intel i5 Processor, 1TB HDD, 8GB RAM – srinuab4u Dec 12 '17 at 08:21
  • @srinuab4u: Cannot reproduce with 16.04 (the current LTS version). With a default installation using LVM and encryption I get sda1 (for /boot) 487 MiB, sda2 extended partition containing sda5 logical partition covering all remaining disk space formatted LUKS, and in the LUKS container sda5_crypt a LVM volume group with two volumes, a swap volume equal to the RAM size and the rest of the space allocated to a volume formatted ext4 and mounted on /. Please edit the question and show the result of fdisk -l /dev/sda; you can do this from a live session ("Try Ubuntu"). – AlexP Dec 12 '17 at 09:51