Dualboot With Uefi How to Install Windows10 and Linux
Currently I am playing around with UEFI because every time I have to deal with UEFI something goes wrong. Therefore I decided to test UEFI installations and configurations.
In this article we want to install Windows10 and Debian9 on one device and UEFI should be used as boot mechanism. At the beginning we want to install Windows first and Linux afterwards. In another article we will test the other way around.
The following steps have to be done to install both operating system in parallel in UEFI mode.
Create boot medium for Windows10 and Linux
For Windows10 download Media Creation Tool from Microsoft and create an USB stick.
For Debian Linux download the DVD ISO and create a bootable USB stick (e.g. using mkusb on Linux or UNetbootin on Windows (https://unetbootin.github.io/))
Activate UEFI in BIOS Setup
If you have a PC/notebook built after 2012 there should be an option in the BIOS setup to activate UEFI. Older device may do not support UEFI at all.
Install Windows10 in UEFI Mode
If you have a good UEFI firmware then in the boot menu you should see a menu for booting from USB in UEFI mode.
If you have some broken incomplete UEFI firmware, as this is the case with my old notebook, you maybe see the following boot menu:
I had to choose “Boot from EFI File”, then select the USB drive and then selected the .efi file on the Window USB stick.
Now the installation begins. After Win10 is installed check whether the installation is using UEFI. For this press the keys Windows + R and enter in the dialog diskmgmt.msc. Now the disk management tool opens. Find hard disc with installed Windows. Right click on hard disc and select ‘Properties’, then in tab ‘Volume’ check ‘Partition Style’. This should be GPT and not MBR.
Create empty Partition for Linux
By default Windows10 uses the whole hard drive as system partition. To free space for the Linux system you can simply shrink the system partition. In disk management tool (mentioned above) right click on the partition you want to shrink and then click “shrink partition” and enter the numbers you want to reduce the size. Now you should see a free partition. We will use it later on.
Install Debian Linux in UEFI Mode
Connect the Linux USB stick to the laptop. Due to my broken UEFI firmware on the laptop I again had to select the EFI file manually at boot. This is exactly the way as above with Windows. The only difference is that there is now another USB stick connected to laptop.
Note: If you want to be 110% sure that Linux starts in UEFI mode then boot your Linux USB stick in UEFI mode and start the rescue console. Then check whether /sys/firmware/efi exists. It does not exists if you booted using traditional BIOS.
Now you can install Linux into the empty partition.
Boot Menu for Dual Boot
If everything went well then you should see the Linux boot loader grub at the next reboot.
That’s it. Congratulations!