I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures).
I'd like to cover such situations:
- If you have blank disk
- If your disk contains Windows installed
- If your disk contains other systems:
- If it is GPT, RAID or LVM
- If you have a OEM-preinstalled copy of Windows 8
If you have blank disk
You will see your disk as
/dev/sda
or/dev/mapper/pdc_*
(RAID case, * means that your letters are different from ours)Click "New Partition Table..." You will see that you have free space on your disk now:
(Recommended) Create partition for swap. Swap is the partition for keeping unneeded memory pages, like Windows swap. Also it can be used for hibernation.
Notice that you should set swap size more than you have physical memory in order to use hibernation. Also, you can place it in the end of disk, but thus it will be slow.
Create partition for
/
(root fs). This is the filesystem that contains your kernel, boot files, system files, command-line utilities, libraries, system-wide configuration files and logs.10 – 20 GiB should be enough
Create partition for
/home
. This is the filesystem for your user's files: documents, images, music and videos. It's much more like Users folder in Windows.You can do this just like in step 5 and even choose other fs type (though I recommend use ext4 instead of reiserfs. Simply, the first is much more flexible and the second is quicker)
(Optional) Create separate partitions for
/boot
,/tmp
and/var
. Set their size according to your needs:/boot
should be 100 – 500 MiB/var
and/tmp
should be > 5 GiBIf you doubt about which device for boot loader installation to choose, leave it default. It would be set by installer. But sometimes it does mistakes. Let me guide you how to deal with it:
/dev/sda
intact./dev/mapper/...
Be sure that you select entire disk, not a single partition!
After all, you should see your disk like this:
As LiveWireBT noticed in comments, it is recommended to place root partition onto primary partition on MBR scheme disks. However, it belongs to personal taste. Sometimes it's even better to put
/boot
directory on primary and leave root on logical partition.That's all! You can now click Install Now and proceed to the installation.
If you have disk that contains Windows installed
You will see partition table. It will look like this:
Free some space for Ubuntu:
And ~40 GiB should be kept for Ubuntu. Click OK and Continue to write changes on disk.
If you have a OEM-preinstalled copy of Windows 8 or later
Computers with OEM installs of Windows usually come with more than 1 or 2 partitions. Starting with Windows 8 the partition table should be GPT, allowing for more than 4 primary partitions.
1. Resizing the Windows partition
There are at least 2 ways doing this:
A. Resizing from Ubuntu live media
You can run GParted or use only the manual partitioning menu of the installer.
B. The safer option: Resizing from within Windows
Resize the Windows partition with Disk Management (run
diskmgmt.msc
).Select your Windows partition and choose "Shrink Volume…" from the context menu.
This will usually shrink to the minimum possible, you may want to adjust the value to leave more space for Windows.
Optionally disable fast startup and probably disable hibernation, if it is activated and you intend to access the Windows partition with Ubuntu. Run
powercfg.cpl
and navigate to Power Options > System Settings through "Choose what the power button does".2. Manually setting up the partition layout for Ubuntu
Attention! No, you don't want to erase the entire disk and Windows along with it. Choose the Something else option if you see this screen. (Something else may be the most difficult option to understand, but considering existing bugs you know what you will get.)
You will get to the manual partitioning menu, where you should at least create a root partition (
/
) and a swap partition.Option 1: add only a root partition
Option 2: add a root and home partition
…finally add the swap partition:
Note that there usually is an existing EFI System Partition (short ESP,
efi
in the screenshot), that the installer will automatically detect and mount to install EFI loaders and programs.Related bug reports
Related
pam_mount
during login (1, 2)If you have
md
RAIDI will not cover how to create
mdadm
arrays here. There is a lot of articles around the Internet. However, there is one major problem: Ubiquity installer doesn't account for the arrays created in the live session, so you'll probably get unbootable system after installation on such array.Create the setup like mine:
As you can guess, I created
/dev/md0
mdadm
array from/dev/sda1
and/dev/sdb1
. It's empty now. Let's install something on it.Create partitions on
/dev/md0
as you like:Important: Install
/boot
onto one of partition outside the array because GRUB doesn't supportmdadm
. In my case, it's/dev/sda3
. If you want more quick booting of your system, it should be placed at the beginning of the disk.Install Ubuntu. Click Continue testing. Or reboot and see initramfs prompt
Now, you have to
chroot
into installed system and installmdadm
:Installing
mdadm
should fix booting problem.Do any of the following help you? (sorry, I don't have enough rep to comment this).
Manual partitioning on Ubuntu installation
For installing Windows on a separate partition, this should be fairly self explanatory from the "Install Ubuntu alongside them" option, however you may come across the following bug.
Installing Ubuntu with Windows installed on a partition
Partition shows "unknown" Used in GParted
This happened to me on 17.10 because my Windows 10 Lenovo P51 used a Logical Disk Manager (LDM) Partition.
The solution was to shrink the partition from inside Windows as shown at: https://askubuntu.com/a/521195/52975
You can then install Ubuntu on the free space allocated.
Cannot shrink disk fully
Then I hit the second problem: Windows said I had 400Gb of free space in the partition, but I could only shrink 250Gb.
The solution was to go inside Windows and:
as mentioned at: https://superuser.com/questions/1017764/how-to-shrink-a-windows-10-partition/1060508#1060508
Then after the reboot, it let me shrink it all the way.