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
administrollaattori
Level 15
Level 15
Posts: 5881
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

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
path.jpg
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
}
... save and quit
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
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
https://en.wikipedia.org/wiki/Etcher_(software)
https://etcher.io/

RobHK
Level 3
Level 3
Posts: 121
Joined: Thu Apr 24, 2008 6:19 am

Re: UEFI Dual boot in HP computer

Post by RobHK » Sat Apr 13, 2019 4:55 pm

Deleted
Last edited by RobHK on Sat Apr 13, 2019 7:00 pm, edited 1 time in total.

JeremyB
Level 20
Level 20
Posts: 10857
Joined: Fri Feb 21, 2014 8:17 am

Re: UEFI Dual boot in HP computer

Post by JeremyB » Sat Apr 13, 2019 4:57 pm

On my HP I had to go into BIOS settings/system config then find the os boot manager and move ubuntu to the top of the list for it to use grub

RobHK
Level 3
Level 3
Posts: 121
Joined: Thu Apr 24, 2008 6:19 am

Re: UEFI Dual boot in HP computer

Post by RobHK » Sat Apr 13, 2019 6:30 pm

JeremyB wrote:
Sat Apr 13, 2019 4:57 pm
On my HP I had to go into BIOS settings/system config then find the os boot manager and move ubuntu to the top of the list for it to use grub
I couldn't find Ubuntu in the BIOS.

My solution has problems so I've deleted it.

cjcoombs
Level 1
Level 1
Posts: 1
Joined: Sun Jul 14, 2019 2:28 am

Re: UEFI Dual boot in HP computer

Post by cjcoombs » Sun Jul 14, 2019 2:33 am

OS Boot Manager inside the bios settings was the answer to my problem on my HP laptop also. By simply changing the order putting Ubuntu over Windows by clicking F6 then F10 to save and exit, I was then given the option to choose which OS I wanted to load. Thanks for that info.

Post Reply

Return to “Tutorials”