Tags: { , , , , } Category: Software

Booting Linux on some HP laptops can be problematic. The problem is caused by vendor’s UEFI software which is looking for “Microsoft” directory on EFI volume and by default running windows loader placed here.

It’s not necessary to use live-session. You can boot into Linux using UEFI boot menu.

Now we should investigate the boot order:

sudo efibootmgr -v

We are looking for the following line or line like that:

BootOrder: 0001,0000,3000,2001,2002,2003

Below this line are the boot entries. As we see position 0001 is corresponding to Windows Boot Loader. Let’s delete this entry:

sudo efibootmgr -b -B 0001

Then we should go into /boot/efi/EFI and rename the directory containing Windows loader:

cd /boot/efi/EFI && sudo mv Microsoft Microsoft2

In case if you are working from live-session remember: first you need to mount this partition and paths will be different.

Create the file /etc/grub.d/40_custom and add the following contents:

    menuentry "Windows Boot Manager (UEFI)" --class windows --class os {
    insmod part_gpt
    insmod fat
    set root='hd0,gpt1'
    chainloader /EFI/Microsoft2/Boot/bootmgfw.efi
}

Warning: gpt1 — is our EFI-volume. Don’t forget to set the delay for Grub if needed. Next we gonna update the Grub:

sudo update-grub

and we are done. Now you can boot into any OS you want without a single issue.