Ubuntu – Installing Ubuntu on a single partition

16.04dual-bootpartitioning

I’m trying to install Ubuntu 16.04 alongside with Windows 7. My HDD supports only 4 partitions. Three of the partitions are taken up by windows. The fourth one is labelled as free space.

Now, how do I make root, swap and home partitions? Should I format my free space as primary with EXT4 first (if so, what should be the mount point?) and then create logical partitions for root/Home/swap? How do I go about this?

Edit: I tried to use the automatic installation option for dual boot. However I got the error ubi partman exit code 141. Probably because it tried to create two separate partitions for root and swap.

$ sudo parted -l
Model: ATA ST1000DM003-1CH1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  106MB  105MB  primary  ntfs         boot
 2      106MB   277GB  277GB  primary  ntfs
 3      277GB   903GB  627GB  primary  ntfs

Best Answer

In a new installation of Ubuntu 18.04 there is no need for either home or swap partitions and creating them is a waste of disk space. One ext4 partition for everything is all you need. This answer would also have helped you in Nov. 5, 2017 because starting in new installations of Ubuntu 17.04, the Ubuntu installer creates a swap file instead of a swap partition by default, so a single partition is all you need. The recommended size of this single partition is 25GB or larger, and the default format of this partition is ext4.

SSDs are currently so cheap that it makes sense to buy a >=256GB SSD and install Ubuntu in a single partition on the SSD. If the Ubuntu installation requires an additional 500MB EFI System Partition, then the Ubuntu installer will create one if it doesn't already exist.

Related Question