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:
- Have bootable Windows 10 media, you can create one with the Media Creation Tool or download directly from Microsoft.
- Boot computer from Windows 10 media
- Click Next and then Repair your Computer.
- Go to Advanced Options and choose Command prompt.
- In the window type: diskpart
- If you have one disk in your system type: select disk 0
If your not sure, for an overview of the disks: list disk
- Now me must determine the efi partition, for an overview type: list volume
- If the boot partition is volume 2, the type: select volume 2
- To access the boot partition, we will assign it a drive letter; b: is a good choice,
type: assign letter=b:
- We do not need diskpart, so type: exit
- 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:
- 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.
- 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)“.
- Reboot, load the Ubuntu media and start the Live version.
- 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”
- Now reformat the efi partition as FAT32, make sure the following flags have been selected: “boot” and “esp”.
- 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.
- 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”.
- 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.
- After finishing the installation, reboot the computer. Now Ubuntu should automatically start.
- Next step is to restore the Windows Boot manager. Reload the Windows 10 media and reboot the computer.
- Follow the same procedure as mentioned before to assign a drive letter ,like b: to the efi partition.
- Cd to the folder EFI.
- From here, create a new folder structure: b:\EFI\Microsoft\Boot.
- Cd to the folder b:\EFI\Microsoft\Boot.
- Type the following commands:
bcdboot c:\Windows /l en-us /s b: /f ALL
- Now reboot the computer and enter the boot menu of your computer, it should now show entries for Ubuntu and Windows.
- Because we do not want to enter the boot menu every time, we give control to the Ubuntu boot manager GRUB2.
- Reboot and start Ubuntu.
- Open a terminal and type the following command: sudo update-grub
- We will also check the correct boot order, type the following command to view the current boot order: sudo efibootmgr
- 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.
- 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.