Windows 10 dual-boot issues

Usually my writings are VMware related, so the title of this post seams to be off-topic. However VMware products played an important role in solving my dual-boot issues.
I am not going into great detail about the “Why do I want to install another OS on my computer?”. Well, I am not fully satisfied with Windows 10, but I have not reached the point to completely wipe Windows 10 off my Computer (an Asus N56VM with the original HDD replaced by a SSD) and do a fresh Linux install. For that reason, I decided to share my disk with the latest Ubuntu 16.04 LTS version and have both OS available.

In a nutshell, the first steps are:

  • Free up a block of continuous disk space to make room for the Ubuntu installation.
  • Download Ubuntu and create a bootable USB drive or DVD.
  • Install Ubuntu in the available disk space.

During the installation of Ubuntu, you are presented the option to install Ubuntu alongside your existing Windows installation. The installation went smoothly, but after rebooting my computer I found out that Windows 10 was the one and only available bootable OS.

The Internet presents an overwhelming amount of advice for solving dual-boot issues. It is important to know if your computer has a BIOS or a UEFI firmware, in my case UEFI it is.
A very common advice is to switch-off Secure Boot, but the Asus UEFI firmware does not have this option. Also, major Linux distributions do support Secure Boot, so this does not make sense imho. See this link for more information about UEFI.

The most helpful information for me is this post in which Michaell Hoffman presents a working solution and lots of background information. The only drawback is this scenario assumes a (re) installation of Windows 10. So would it be possible to keep my existing Windows 10 instance?

The key in this issue is the ESP, the EFI System Partition. This boot partition is an essential part of the UEFI interface. This first partition is formatted as FAT32 with flags “boot” and “esp”. You can examine the ESP using this workaround:

  1. Have bootable Windows 10 media, you can create one with the Media Creation Tool or download directly from Microsoft.
  2. Boot computer from Windows 10 media
  3. Click Next and then Repair your Computer.
  4. Go to Advanced Options and choose Command prompt.
  5. In the window type: diskpart
  6. If you have one disk in your system type: select disk 0
    If your not sure, for an overview of the disks: list disk
  7. Now me must determine the efi partition, for an overview type: list volume
  8. If the boot partition is volume 2, the type: select volume 2
  9. To access the boot partition, we will assign it a drive letter; b: is a good choice,
    type: assign letter=b:
  10. We do not need diskpart, so type: exit
  11. Now we can change to the efi partition, type: b:

On the boot partition, we see a folder named “EFI” and one or more sub folders. Folder “Microsoft” contains the “Windows Boot Manager”. As part of the Ubuntu installation a folder ubuntu, containing the ubuntu loader, should have been created, but was not!

To resolve this issue, I followed this somewhat rigorous method:

  1. First make sure you have a recent backup of your important Windows files and folders, just in case you make a mistake during this process. In fact this step comes before shrinking your disk as mentioned in the introduction.
  2. Michaell Hoffman`s contribution advises to disable Windows Fast Startup during the installation of Ubuntu. This is done by doing:
    a) Open Control panel and go to Power Options.
    b) Click “Choose what the power button does“.
    c) Click “Change settings that are currently unavailable“.
    d) Uncheck “Turn on fast startup (Recommended)“.
  3. Reboot, load the Ubuntu media and start the Live version.
  4. As Ubuntu is loaded, the first step is to check and adjust the partitions. Open a terminal and start gparted (graphical disk partition utility), type: sudo gparted
    /dev/sda1 should be the efi partition, type is “efi”
    one or more Windows partitions, type is “ntfs”
    possibly a previous failed Ubuntus install, type is “ext4” and “swap”
  5. Now reformat the efi partition as FAT32, make sure the following flags have been selected: “boot” and “esp”.
  6. Recreate the partitions for Ubuntu, make the swap partition as large as the amount of physical memory and for Ubuntu at least 5 GB. As you wil install more applications 20 GB or more is a better option.
  7. Now start the Ubuntu installation, for a step-by-step see this link. Most important step is the window “Installation type”, now select the option “Something else”.
  8. In the next Window, make sure to create at least one mount point for the root file system “/” and Under “Device for boot loader installation”, select the efi partition.
  9. After finishing the installation, reboot the computer. Now Ubuntu should automatically start.
  10. Next step is to restore the Windows Boot manager. Reload the Windows 10 media and reboot the computer.
  11. Follow the same procedure as mentioned before to assign a drive letter ,like b: to the efi partition.
  12. Cd to the folder EFI.
  13. From here, create a new folder structure: b:\EFI\Microsoft\Boot.
  14. Cd to the folder b:\EFI\Microsoft\Boot.
  15. Type the following commands:
    bootrec /fixboot
    bcdboot c:\Windows /l en-us /s b: /f ALL
  16. Now reboot the computer and enter the boot menu of your computer, it should now show entries for Ubuntu and Windows.
  17. Because we do not want to enter the boot menu every time, we give control to the Ubuntu boot manager GRUB2.
  18. Reboot and start Ubuntu.
  19. Open a terminal and type the following command: sudo update-grub
  20. We will also check the correct boot order, type the following command to view the current boot order: sudo efibootmgr
  21. In this example, we change the boot order from Windows Boot manager into Ubuntu with the command: sudo efibootmgr -o 0004,0005
    I have added some other devices in the screenshot.
  22. After a reboot (without entering the system boot menu) we can now make our selection from the GRUB boot menu.

This concludes the installation. In the introduction, I mentioned the use of VMware products. Before the installation on my computer, I practiced the whole scenario using VMware workstation. I created an empty Windows 10 VM, changed the configuration to EFI and started with the installation of Windows 10 followed by the installation of Ubuntu using the scenario as mentioned above.

As always, I thank you for reading and welcome your comments.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: