After that Copy grubx64.efi file from EFI/ubuntu folder to the EFI/Microsoft folder and rename grubx64.efi as bootmgfw.efi
After that edit /boot/grub/grub.cfg file for setting the right path for booting Windows also like
chainloader /EFI/Microsoft.orig/Boot/bootmgfw.efi
That makes both of systems capable to boot, but the better solution is to add windows entry to the /etc/grub.d/40_custom file, like
Code: Select all
sudo nano /etc/grub.d/40_custom
Menuentry for UEFI Windows where Windows boot files are on GPT partition 2 to the /EFI/Microsoft.orig/Boot folder
Code: Select all
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Windows 10' {
insmod part_gpt
insmod fat
set root='hd0,gpt2'
chainloader /EFI/Microsoft.orig/Boot/bootmgfw.efi
}
Ctrl o
Ctrl x
After editing the file run
sudo update-grub
http://puolanka.info/goto/etcgrub-d40_custom-file/
http://puolanka.info/goto/to-fix-window ... ootloader/
PS. Secure Boot is also good to disable from BIOS-settings.
Edit 15.5.2017 Microsoft's new updates breaks booloader every now and the, so it is good to make a UEFI-usb-boot-stick -> To make an UEFI-bootable USB -> http://puolanka.info/goto/to-make-an-uefi-bootable-usb/
About installing SG2uefi_en.img to an USB, you can make it many ways. The easiest way is to use cp command.
Code: Select all
sudo blkid ## tells drives and partitions
sudo umount /dev/sdXY ## where X=drive and Y=partition
sudo cp SG2uefi_en.img /dev/sdX ## where X=disk
Code: Select all
sudo dd if=SG2uefi_en.img /dev/sdX ## where X=disk
https://en.wikipedia.org/wiki/Etcher_(software)
https://etcher.io/