You’re probably using Windows if you’re reading this. So, you decided to give Linux a try! Good for you! Linux is something that anyone ranging from an average Joe to a system admin can utilize. Whether you’re just curious or you need it for Software Development, having both operating systems on one computer is often the perfect solution.
So when I decided it was about time I made the switch, little did I know I had to spend hours recovering my USB stick’s storage capacity which shrank to 2KB from 16GB while booting. Anyways, one or two sleepless nights later, I finally had Windows 10 and Ubuntu 20.04 dual-booting successfully! I wished there was a precise integrated article that had the entire process documented. So, here it is!
STEP 1: Prepare to back-up (optional)
It’s always better to have a back-up of your data on external HDD, just in case if you mess up with the system while dealing with the disk partitions. Though this step is optional, I highly recommend to prepare for the fallback before starting with the the installation process.
STEP 2: Download Ubuntu Desktop & Rufus
Head on to Ubuntu’s website and Download Ubuntu Desktop ISO on your system. You will need a pendrive (4GB at least) to store and burn this ISO image.
Download Rufus from its website. Rufus is a free and open-source portable application that can be used to format and create bootable USB flash drives or Live USBs.
STEP 3: Create Live USB
Plug in your bootable USB. It will be formatted (erased) during the process, so make sure you copy any files that you want to keep to another location.
Run the Rufus tool you just downloaded and configure it as shown below.
It automatically identifies the plugged in USB but double check it anyway. The ISO will now be written to your USB stick, and the progress bar in Rufus will give you some indication of where you are in the process. With a reasonably modern machine, this should take around 10 minutes.
STEP 4: Make Disk Partition
You need to shrink the Windows 10 partition to make room for the Ubuntu installation. If your system has several partitions of considerable size, you can pick any one of them for installing Ubuntu. If not, you can go ahead with C drive to make some free space.
How much space do I need for Linux in dual boot?
The size you should be allocating depends on how much total disk space you have or your needs. I recommend allocating at least somewhere between 35–50GB, to avoid running out of disk space soon.
In the Windows menu search for Create and Format Hard Disk Partitions and click the result to open Disk Management. Right-click on the disk that you want to shrink to make free space available on and click on Shrink Volume in the context menu.
Next you need to Enter the amount of space to shrink in MB you want to have for your Ubuntu installation. Creating a new partition takes a while and then it should be displayed as Unallocated. Now you’ve created free space on disk.
STEP 5: Disable Fast Startup
Since you are dual booting the system, you need to turn-off Fast Startup to prevent any complications while booting. Type Control Panel in the Windows search menu and click the result. From the displayed options select Hardware and Sound > Power Options. The Power Options window should appear. Click Choose what the power buttons do from the options in the left column. Click Change settings that are currently unavailable. Scroll down to Shutdown settings and uncheck Turn on fast startup.
STEP 6: Disable UEFI Secure Boot
For security reasons, UEFI, which is enabled by default, only runs signed bootloaders. Therefore, it is not possible to start the computer from a USB drive, unless the option is disabled. However, Ubuntu and many other Linux distributions support secure boot very well these days. It would be better to have it disabled than running into problems during installation.
In the Windows search menu type Advanced Startup Options and select the result. Go to the Advanced startup section and click on Restart now button. When the next screen appears, in the menu select Troubleshoot > Advanced Options > UEFI Firmware Option Settings > Restart. This will reboot your laptop.
Next, you need to head into BIOS menu to disable the secure boot. When your laptop is restarting, press the BIOS entry key on startup (At this point the screen is still black/hardware logo appears). This changes for each system, but is typically something like F1, F2, or F12:
Once you’re in the BIOS menu, navigate to BIOS Setup tab with the help of arrow keys. (If not found look for Security tab). Highlight the Secure Boot tab with arrow keys and change the Secure Boot item to “Disabled” or uncheck the Secure Boot Enable option. Save and Exit the BIOS settings.
STEP 7: Boot from Live USB
Now that you’re all set for Ubuntu Installation, make sure you’ve plugged in the Live USB which you created in STEP-3. From Windows search menu go to Advanced Startup Options and select Restart now. When the screen is presented, from the menu select Use a device option.
On the next screen, recognize the Live USB drive with its name and select it. Now, your system will reboot into the disk you chose and present the GRUB boot menu.
STEP 8: Install Ubuntu
Start the installation procedure.
- You will be presented with a screen to pick a language. Select the language you prefer and click on Continue. After selecting the keyboard layout, you will probably be prompted to select a WiFi network.
- In the next screen, choose Normal Installation, installation options that you prefer and Continue.
- Now you will be presented with a menu for Installation Type. To allocate disk partitions on your Ubuntu manually, select Something else and Continue.
- In the next screen you will be allocating space for the root directory(/), the home directory(/home) and the swap memory. The free space we created in Step-4 will show up here. Select the free space and click on the “+” sign.
- Root (/): This is the partition which hosts all your system files necessary for Ubuntu to function. Anything above 25 GB is more than sufficient for it. >Type of new partition: Primary > Location for new partition: Beginning of this space > Use as: Ext4 journaling file system > Mount point: /
- Swap Memory: “Allocating double the size of RAM to the Swap memory” has been very a controversial item and a thumb rule. But that doesn’t always seem good for some conditions. However, you can allocate anywhere between 4 to 8 GB, which should be adequate. Select the free space partition and click on the “+” sign. Enter the size for swap space and keep rest of the parameters same as earlier except for >Use as: swap area.
- (/home): This partition will store all your personal files. If you do not create a “/home” partition, your personal files will be stored inside the “root(/)” partition. Allocate the remaining free space to this partition with >Mount point: /home and keeping rest of the parameters same as earlier
Now that you’re done with creating all the partitions, hit Install Now and confirm the installation. In the next steps, you will be selecting the timezone, username and password for the system. Once the installation is complete, you’ll be asked to unplug the USB disk while the system restarts. When the system restarts, the GRUB menu will be presented and from now onwards you will have the choice of either to boot into Ubuntu or Windows. That’s it!