UEFI Dual boot in HP computer

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
User avatar
Level 15
Level 15
Posts: 5718
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland

UEFI Dual boot in HP computer

Post by administrollaattori » Sat Apr 08, 2017 2:33 am

It seems that many HPs are not so good, if using dual boot in the UEFI mode, because grub menu does not appear. One solution is to mount EFI-partition and copy and rename the copied Microsoft folder like Microsoft.orig

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

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
... save and quit
Ctrl o
Ctrl x
After editing the file run sudo update-grub

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
Of course the same can do using dd also.

Code: Select all

sudo dd if=SG2uefi_en.img /dev/sdX  ## where X=disk
Edit 30.10.2018: An easy and safe way copy to an USB, is to use Etcher

Post Reply

Return to “Tutorials”