0

I completely wiped my hard drive on an HP initially set up with windows uefi boot. The wipe also deleted default windows bootx64.efi. Right now my fat32 partition flagged as boot is mounted on /boot/efi.

Going in /boot/efi/EFI, the only folder, naturally, is ubuntu with grubx64.efi, shimx64.efi etc.

When I boot, the BIOS OS Selector naturally doesn't recognize any OS to boot (it only recognizes bootx64.efi right?). This answer explains how to set grub as the default bootloader over default windows boot. Should I do something similar and create a Boot folder inside /boot/efi/EFI with grubx64.efi copied in it, renamed as bootx64.efi? The above mentioned answer refers to the path: /EFI/BOOT/BOOTX64.EFI, but generally the bootloader should be in the path where boot partition is mounted, so in my case path /boot/efi/EFI is correct?

EDIT: Using HP Z-book 15. I currently have to manually select efi file when booting. BIOS allows "boot from efi file". I then select /EFI/ubuntu/grubx64.efi and boot starts.

wraithie
  • 143
  • Is there a selection in the BIOS? Perhaps the make and model of your HP [edit] ed into the question would help.... – Elder Geek Jan 25 '16 at 23:02
  • 1
    You may find this of interest: http://askubuntu.com/questions/344688/how-to-point-to-grub-instead-of-windows-loader?rq=1 – Elder Geek Jan 25 '16 at 23:05
  • @ElderGeek I followed your suggestion and tried using efibootmgr. I set ubuntu as first boot but that didn't help (could be because I'm using an HP). I then read what boot repair does and it's basically doing the same thing I've seen so many times, that is copy grubx64.efi and put in EFI/Boot/ renamed as bootx64.efi . I just tried this and now at least OS selector recognizes bootx64.efi and loads grub. Problem is it acts weird: sometimes the purple screen stays on forever, other times grub load and other times it goes directly in ubuntu boot. Will explore more options later on. – wraithie Jan 25 '16 at 23:55
  • 1
    Sony, HP & others: http://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win/486789#486789 Rename bootx64.efi https://askubuntu.com/questions/597052/can-not-boot-anymore-after-a-boot-repair If then you have gui type issues that may be video driver related. – oldfred Jan 26 '16 at 00:00
  • If all else fails, You may also wish to check to see if you have the most recent BIOS for your machine (on the off chance that HP fixed it) – Elder Geek Jan 26 '16 at 00:26

2 Answers2

0

Have you tried running boot repair CD? It reinstall GRUB and configures it. You can find a live image here : http://sourceforge.net/projects/boot-repair-cd/

Franck
  • 49
0

At first I just made a dirBoot in /boot/efi/EFI where I copied grubx64.efi renamed as bootx64.efi. Sometimes the grub menu showed up, other times the boot went straight into ubuntu, without letting me choose and finally sometimes the purple screen stayed on forever.

I then tried using shim so I copied shimx64.efi into Boot, named grub back to what it was and named shimx64.efi to bootx64.efi. This time it always booted straight into ubuntu.

I then used boot repair recommended repair and it created a Windows/Boot dir in /boot/efi/EFI with files bootx64.efi, bootmgfw.efi and their efi.grb namesakes. Now grub menu shows up every time, allowing me to choose between ubuntu, advanced boot etc.

Only problem is that the black screen code shown after ubuntu boots and before ubuntu logo screen shows up is rendered as a bunch of pixels shaped like an upside down sqaure "U". In any case, grub now works.

Links: Boot repair page, Difference between shim and grub.

EDIT: If boot repair page returns internal server error, this is how boot repair can be installed:

sudo add-apt-repository -y ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Boot repair window should show up after install.

wraithie
  • 143