Ubuntu – How to install & Boot ubuntu with windows boot mgr and not grub2

bootloaderdual-bootgrub2windows

I bought a new laptop for college work with Windows 10. I also want to install Ubuntu on it but don’t want it to be booted via grub2 because I will use it rarely and also don’t want Ubuntu to be set as the default option.

Also I don't like the default 10 seconds boot wait.

To avoid making changes to grub, I would like to boot the PC through the Windows boot Manager.

How should I proceed?

Best Answer

Besides that this is a more Windows related question, you can add Linux to the Windows boot loader by opening a command prompt as administrator and executing :

bcdedit /create /d name /application bootsector  
bcdedit /set {****} device partition=c:  
bcdedit /set {****} path \linux.bin  

Before that, copy and export the Linux boot sector by opening a terminal in Ubuntu and executing :

sudo mount /dev/sdYY /mnt
dd if=/dev/sdXX of=/mnt/linux.bin bs=512 count=1  

Note 1: name = the name of the system to boot (e.g. Ubuntu)
Note 2: **** = the identifier of the new entry in the BCD store
Note 3: sdXX = the Ubuntu partition
Note 4: sdYY = the Windows partition

This is the most proper method to add the Linux boot entry to the Windows boot loader, because using 3rd party tools like EasyBCD tend to generate problems when changing or deleting entries.

Task order and summary :

  1. Install Windows (on the first partition of the disk).
  2. Install Ubuntu (install GRUB to root ( / ) partition - NOT to mbr !).
  3. Copy and export Linux boot sector (do this from the Ubuntu install media).
  4. Boot into Windows and proceed as mentioned in the beginning (edit BCD).
  5. Reboot the computer and now you will see the Ubuntu entry in the Windows boot menu.

These instructions are valid for installations in Legacy BIOS (MBR) mode.
If your computer is UEFI based, you simply can adjust this in the UEFI menu.