Dual boot ubuntu windows 10 will provide you the best of both worlds without having to virtualize either of them. This means you get the full potential of both operating systems without any compromise.
1. Backup Your data
It is very important that you backup your system before you do anything. Even though the process is pretty straightforward and harmless, there is a possibility for something to go wrong so having a backup of your files will ensure you do not lose anything when something does go wrong. So back up your files to an external drive.
2. Have a Windows recovery CD/DVD available
If something does go wrong, you may need to reinstall your Windows OS again. Microsoft does provide a tool to download and make a bootable drive. You may also use the recovery partition most OEMs.
Two ways to dual boot Ubuntu Windows 10
Install Ubuntu after Windows 10
From my experience, this is the best approach to dual boot ubuntu windows 10. Windows installation does not really play nice with existing Linux installations but your Ubuntu will handle your existing installation of Windows very well.
Follow the steps to dual boot Windows 10 –
- Make sure you have Windows 10 installed and running on your PC.
- [OPTIONAL] You can prepare your disk by making available a free partition for your Ubuntu. You may use the Disk management tool on Windows to do this or employ a third-party app such as Paragon Partition Manager or EaseUS Partition Manager. I recommend to make 20GB free space.
Download Ubuntu 20.04
3. Now download the Ubuntu latest version which at this point is Ubuntu 20.04. Or download any of flavors of Ubuntu such as Kubuntu, Xubuntu, Lubuntu and so on.
4. Make a bootable USB of the Ubuntu iso you have downloaded. You can use Rufus tool on windows or you can use the Startup Disk Creator if you have an existing Ubuntu or Linux installation.
5. Reboot your PC with the bootable USB or disc. If you do not know how to boot computer using a USB drive, here is how to do it. Boot into your system bios and set USB as the priority device to boot from. You can get this option in the boot option of your bios.
6. Proceed with the installation until you get to the Installation type. If you created a partition already (Step 2), then select the partition and continue the process. If you skipped Step 2, choose one of the followings –
a. Choose the option which says “Install Ubuntu alongside them” and then specify your partition size by dragging the slider at the bottom. (It is the easiest)
b. Choose “Something else”. Select the partition you want to resize and enter the Size in GB and then press Enter to shrink your existing partition.
You need at least 10GB of space for Ubuntu and then another 4-8GB for SWAP. Use your installed RAM as a guide for SWAP.
Create a partition for your Ubuntu and then set the rest of the free space as SWAP. Select “Finish partitioning and write changes to disk”.
7. Continue and then finish your Ubuntu Installation.
8. Your grub installation will automatically look for other installed operating systems hence will discover your existing Windows 10. Upon boot up, you will be presented with the option to select your OS of choice.
Install Windows After Ubuntu
So you can go the other way round and install your Ubuntu first before installing Windows. The problem with this is that the Master Boot Record will override your Grub installation from Ubuntu.
EasyBCD is a nifty tool that will help you add your Ubuntu installation to your Windows boot menu. Get it from here.
2. Recovering GRUB after reinstalling Windows
- Insert Ubuntu installation media and boot from it
- Select Ubuntu Live/Try mode (do not install)
- Search and run “Gparted” from the Ubuntu dash
- Determine the name of your Linux partition (/dev/sdXY) – you should be able to identify it by recognising its format (most likely ext4) and size (number of GB)
- Enter the following command via terminal
(i). sudo mount /dev/sdXY /mnt [where sdXY has previously been identified using gparted] for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done (ii). sudo chroot /mnt (iii). sudo grub-install /dev/sdX [note this is sdX not sdXY!] (iv). update-grub (v). Exit
- Restart PC and remove Ubuntu installation media.
There you have it. It was not tough, right? The only thing is that it requires a little more practice to do it without having to look for a guide. Dual boot Ubuntu and Windows 10 can help a lot for developers and learners. Dual booting allows to switch between Operating systems without any trouble.
If you have any problem with anything mentioned above, let me know in the comment section below.