Motivation:
You are want to install Ubuntu 18.04 and Windows 10 as dual boot for completing some machine learning tasks.
Prerequisites:
You need to have a 8Gb USB stick.
Solution:
Step 1: Go to BIOS, select the UEFI option in Boot List Option, disable the Enable Legacy option ROMS option, disable Secure Boot.
Step 2: Install Windows 10 and create a free partition for Ubuntu.
Step 3: Download the Ubuntu desktop 18.04 image.
Note: The Ubuntu server 18.04 image may NOT contain driver for your wireless adapter network card.
Download and use Rufus to create a bootable USB with Ubuntu.
Step 4: Install Ubuntu. Select Something else in Installation type screen. Select the free partition. Click the + sign.
Create an EFI partition and set its size to be 552MB if it does not exist.
Create a Swap partition. Set its size to be twice as your RAM size.
Create a Root partition. Set its size to be all the remaining free space to optimize your space.