How to Install Ubuntu 18.04 Dual Boot with Windows 10

As usual with Ubuntu, every fourth month after two years, we have the new release which is now Ubuntu 18.04 code named Bionic Beaver. It is a new Long Term Support (LTS) release which offers 5 years of support for both desktop and server versions. You can install this new system on your computer even if you have an existing Windows system. This article will show you step by step how you can install Ubuntu 18.04 in dual boot with Windows 10, so it assumes that you have an existing Windows 10 EFI.

What's new on Ubuntu 18.04

The final release of Ubuntu 18.04 can be downloaded from official Desktop and Server Iso images. However, you will not find 32-bit ISOs available because Ubuntu dropped 32-bit desktop builds during the 17.10 development cycle. The new LTS can be used on production and contains some new features:

  • Gnome 3.28 : Ubuntu 17.10 was the first release to offer gnome instead of unity and now Ubuntu 18.04 will keep the same trend and will feature the latest GNOME.
  • Kernel 4.15 : Ubuntu 18.04 will use the version 4.15 of the kernel, the latest stable release instead of 4.14 which was originally planned by canonical.
  • Color emoji : The previous version of Ubuntu only supported monochrome emojis but the new Ubuntu will support colored emojis
  • Suru the new icon theme : Ubuntu 18.04 will use a new icon theme Suru which will be the new default icon theme.
  • Minimal installation option : The new LTS offers a new option in the installation process that allows you to perform a minimal installation of Ubuntu which removes around 80 packages from the default installation (Thunderbird, LibreOffice, etc)
  • Xorg : Xorg will be used by default as the graphic server instead of Wayland for its compatibility with services like Skype, WebRTC, RDP, and more. The new LTS release will ship with both Xorg graphics and Wayland-based stack.
  • Faster boot time : The boot time has been improved on Ubuntu 18.04. by using systemd’s features.
  • Collect data : Ubuntu 18.04 will automatically compile data about your system and send it back to help improve Ubuntu.
  • New installer for Ubuntu 18.04 Server edition : the new server edition of Ubuntu 18.04 will use the new subiquity installer.
  • Kernel Updates : More easier to install kernel updates without rebooting

1) Check EFI or Bios mode on Windows 10

It exists two firmware interfaces for computers which are BIOS and EFI that work as an interpreter between the operating system and the computer firmware. The dual boot is the coexistence of two different operating systems on the same physical machine. In our case, We will try to install Ubuntu 18.04 alongside your Windows 10 so we must check the installed mode:

  • BIOS boots by reading the first sector on a hard disk and executing it; this boot sector in turn locates and runs additional code. The BIOS system uses the Master Boot Record (MBR) partition table which is very limiting because of space (no more than 2TB in size per partition) and partitions (more than 4 primary partitions) constraints.
  • EFI boots by loading EFI program files (with .efi filename extensions) from a partition on the hard disk uses the GUID partition table (GPT) offering 64-bit entries in its table which dramatically extends the support for size possibilities.

If your Windows is installed in Bios mode, it is recommended to install your Ubuntu in Bios mode but if it's installed in EFI, so do the same with Ubuntu. To Check if your Windows is installed in EFI, use the combination windows + r then enter the command msinfo32 as below

then you have a new windows where the mention Bios Mode gives the indication

2) Configure Windows for dualboot

Now we need to do some operations in the Windows system in order to install our Ubuntu 18.04

a) Check the partitions

Now that you have checked that you have an EFI mode, we need to check the disk or the partitions to use for Ubuntu. So that we will open the disk management with the combination windows + r then enter the command diskmgmt.msc

now you can check the GUID partition table (GPT). You can see the disks and partitions. In my case, I have one disk and I will install Ubuntu in a partition. To look the partition table, do a right click on the disk and choose the properties

Then go the Volume tab. You can see that you use GPT

I will install Ubuntu in the partition of 20Go and to avoid any mistake with the partitions of windows during the process, I will delete the partition to use here.

You can see that it is now unallocated

b) Disable fast startup and secure boot

The fast startup ( known as fast boot on Win 8can prevent to boot on the Ubuntu CD so you can need to disable it. Use the combination windows + x and choose the power management

In the Power Options window, click Choose what the power buttons do.

you’ll need click Change settings that are currently unavailable to make the Fast Startup option available in order to edit it.

Now uncheck it

The secure boot can prevent the grub to boot your system properly so we will disable it. Open the setting and choose the windows update option

Now restart in the advanced startup

now choose the troubleshoot option

Now restart. Your system will restart and will give you the opportunity to disable secure boot

3) Install Ubuntu 18.04

a) Boot from Ubuntu EFI mode

Because our Windows is installed in EFI mode, we need to install Ubuntu 18.04 in EFI too. Normally, after disabling the secure boot, you can boot from you Ubuntu 18.04 installation CD. You will have the black screen which indicates that Ubuntu boot from EFI

If you are not able to boot from your installation media, don't worry. Boot from Windows and use the steps to restart in advanced startup but you will change one option. Instead of Troubleshoot, you will choose the option use a Device which will automatically detect all the EFI media. Then you will choose the appropriate EFI installation media

b) Prepare the disk

To be sure to make no mistake, we must identify the disks or partitions on which we will install our Ubuntu. So will boot Ubuntu with the option try Ubuntu without installing

The system will boot in live mode

We will use gparted tool to create the partition

We will create two partitions on Ubuntu 18.04:

  • root: it will store everything related to the system
  • home: it will store the personal data of the different accounts related to your Ubuntu system

We don't need to create the swap unless you have limited resources. Now it's possible to create swap file which means don't need a complete partition.

We will create the partitions here to avoid any mistakes during the installation process. We create the root partition

Do the same with the home

you can check if it is correct, then apply

c) Launch the installation

Now go to the desktop in order to launch the installation by clicking on the shortcut that you see. First, choose the language

Then choose your keyboard

Because we do a complete installation, we will not choose the minimal installation

Now choose the type of the installation. For a manual installtion, we will choose the last option

Now we can see all the partition but the type (filesystem) help us to know directly which partitions to use. You can see an EFI partition which is present, it is the windows boot partition. Normally, for a single installation of Ubuntu, you need to create an EFI boot partition which will be used but as it's present because of Windows already installed, no need to create a new one.

Now you can choose the mount point and the filesystem as below

now do the same with the home

Edit the partition and choose the mount point

now that you have finished, you can choose install

You will receive a warning to tell you all the data will be deleted

Now you can configure your exact location. By specifying your exact location, you will allow Ubuntu to communicate with the nearest repositories for installation and package updates.

Now you can create the user account with a solid password

Now you can proceed with the installation of your filesystem and the updates during the process

When the process will finish, you will receive a message that will ask you to restart the computer and then to remove the installation media

Now when restarting, you can see the grub which gives you the possibility to choose the system to launch

If you don't see the grub when you restart, don't worry. In some other cases, you need to press the boot options key which is generally F9. Then you will see the different systems installed and you can choose the one to use. Now your system will boot and you will need to log in with the password created during the process

You can see the new system

You can launch the Ubuntu software to install some new packages

You can navigate in your new Ubuntu 18.04 system. To see the different partitions or disks, go to Other locations

Now have your system installed and ready to be used.

d) Fix grub is windows 10 entry is not present.

For some reasons your system can directly boot on Ubuntu 18.04. You need first to make sure that the grub appears with the different OS entries. If not, check first the /etc/default/grub file to see if the grub-menu is activated at boot time. Find the line GRUB_HIDDEN_TIMEOUT=0 and edit it by changing the value 0 to another such as 20.

If the grub appears but not your Windows 10, it means that information about the Windows EFI boot partition is not found. So, you will need to complete some additional steps. After booting on your Ubuntu 18.04, you can use one of the options below:

  • update-grub command: It will rebuild your /boot/grub/grub.cfg file with the menu entries.
# update-grub

  • boot-repair: it is a simple tool to repair frequent boot issues you may encounter in Ubuntu dualboot when you can't boot Ubuntu or Windows or another Linux distribution. You will need to install it
# add-apt-repository ppa:yannubuntu/boot-repair
# apt update
# apt install -y boot-repair && boot-repair

Now you can launch boot-repair with the recommended option

  • manually add windows entry: This solution provides a proper entry in the grub2 menu to boot into Windows 10. First check on which disk and partition is the Windows EFI boot
# fdisk -l

 

Now found the UUID of the partition

# blkid /dev/sda2
/dev/sda2: UUID="1AC3-9984" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="dda518e7-aa6d-4944-9a59-e459f0f7944e"

Then you can edit the /etc/grub.d/40_custom grub file to add the lines which will help you to boot into your Windows system

# vim /etc/grub.d/40_custom
menuentry 'Windows 10 (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-1AC$
        insmod part_gpt
        insmod ntfs
        insmod search_fs_uuid
        insmod chain

        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-barem$
        else
          search --no-floppy --fs-uuid --set=root 1AC3-9984
        fi
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

note that entry is configured to boot from the 2nd partition gpt2 of the 1st hard drive hd0 or ahci0. If you are working on legacy, then replace all  gpt with msdos

Now you can update the grub file

# upgrade-grub

Restart you system to see the grub

Now you can boot normally on Windows 10

Conclusion

There are some benefits to having multiple operating systems available on your computer. We have seen how to install Ubuntu 18.04 on a computer that already has Windows 10 installed. You should notice that the steps about Ubuntu can be followed even for a single installation. Now you have all to do a good dual boot installation.

Alain Francois 2:21 am

About Alain Francois

IT Linux administrator passionate of free and open source software, I work on Linux Systems since some years on installations and deployments of certain solutions. I like to share my experiences with a wider audience by training and conferences.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.

30 Comments

  1. Wow this looking So easy to how i can install thank you for that kind of info
    i hope u share more
    keep Sharing
    Thank you

    1. Hi Kamrul,

      The installation is completed? try to disable the secure boot and the fast boot option into the bios parameters. After that, retry again. If the installation is completed, just try to fix the grub as mentioned in the article.

    1. Hi shreyansh,
      You can install your Ubuntu system. Normally it will automatically start in legacy mode

  2. Thanks for sharing. Do I have to disable UEFI secure boot every time I update grub, such as for installing new kernels?

    1. Hi,
      Modern versions of Ubuntu can be installed and can boot normally with Secure Boot enabled but you can sometimes have errors if you manually add Grub Entries or have unsigned kernel and proprietary drivers installed.

  3. Hi,

    This is the third install guide I have tried and I keep getting a GRUB error like "Executing 'grub-install /dev/SDA' failed. This is a fatal error."

    When I did it your way I still get a GRUB installation error.

    I am running Windows 10 Home on a Dell Inspiron 5xxx Laptop.

    Thanks for any assitance you can provide

    1. Hi Steven,

      1- I think that your Windows is installed in EFI mode and normally Ubuntu should detect the EFI boot partition but it seems that it doesn't. Try to change the location of the partition to use for the bootloader by choosing the EFI partition. See at the bottom of the page when you have finished creating the partitions.

      2- Try to disable the secure boot

      3- Go to your windows, then restart (and not shutdown) before retrying a new installation. I write that because when you shut down your windows 8 and ++, the disks/partitions are considered as in hibernation state by Ubuntu, so it can't access it.

  4. Thank you kindly for this article. Have been meaning to dual install for years but kept finding articles that didn't address the UEFI/BIOS issue properly.

  5. Doesnt work. Cant boot ubuntu in uefi mode. And cant boot from it even it I select boot from USB CD in advanced start up options. What the hell have windows done to make it so complicated?

        1. Hi, normally it's not necessary to create a boot/efi partition when you are installing Ubuntu in dual boot because Windows 10 has already done this for you.
          For a simple installation of Ubuntu without windows installed, it can be necessary if you do a manual partitioning during the process.

  6. What if I want to use Windows Boot Manager instead of GRUB?
    I mean, prioritise Windows Boot Manager and add Ubuntu entry to it (which takes to grub for boot).
    (for UEFI BIOS)

    1. Hi, I don't use this way but I think that you take a look on easybcd. The best way that you can do is to edit the grub and put windows on the top of the list. So that windows will boot by default if you do nothing.

  7. Hi Alain François,
    Thank you for your very interesting step by step guide.
    I disabled Windows 10 Fast Startup option, but I can't disable Secure Boot when UEFI mode is on (Win10 was installed in UEFI mode). Windows Boot Manager start always first (even if I modify the boot up sequence. If I enter the Boot Manager (F12) I only get one boot option... Windows Boot Manager :-)
    The only way to start with my Lubuntu 18.04.1 LTS DVD is to choose the Legacy Mode, but you say we need to install Ubuntu in UEFI mode if Windows has been installed in this mode. Dilemma :-)

    Any suggestion is welcome, but not if you are on vacation! :-)

    1. Hi Alberto, normally Lubuntu support secured boot. You can try to use the windows 10 advanced startup to boot on lubuntu with its help. But if you still encounter the error, just disable it and continue the installation

  8. Hi Alain,
    thanks for this detailled step by step help,
    it was very easy with your hints,
    now my dualboot system works fine.
    Thanks a lot
    Shorty

  9. Last time I installed Ubuntu on my laptop was five years ago. At that time, the EFI system did not exist. Seems that things have changed since then. I have just installed Ubuntu 18.04 on my new laptop. It seems to me, it was successful. (Touch pad does not work though. Plus, I needed to add "acpi=off" to the end of the "quiet splash" line of the grub menu. Otherwise, the installation process would be stuck in the middle of installation.)

    But my question is about the partition to install a grub. The home partition (/home) is /dev/sda5 in my case (which, coincidentally, is the same as yours. So, I specified this partition when installing. Looking at your instruction, you did not specify /dev/sda5. Is this because we use the EFI system? I just wanted to know.

    Thanks for reading this long message!

    1. Hi Nao,

      normally it's interesting to install the grub on the bootable partition to avoid some errors after. That's why I didn't specify a partition.