Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My PC is HP Pavilion P6-2390. I am a beginer in Ubuntu. So explain it simple and as detailed as possible (with pictures if you can).

So here is what I did.

  • Made a Live USB like shown on Ubuntu website.
  • Plug it in. Changed the boot order to UEFI: Sandisk ....
  • Did nothing to BIOS. So it is still in UEFI and Secure Boot.
  • So I installed it on a partition of 20GB that I made in Win 8. Used the "Something Else" option and made the "Swap Area" and root partiton.
  • Installed it and after I restarted it I got this screen:


So I did the boot-repair instructions on the other posts. - It says "EFI detected!" and gave me this link: . - After pressing Yes and Agree and all, it ask me to disable Secure Boot. - So I disable Secure Boot and enable Legacy. It didn't work. I also disable Legacy, it still didn't work. - Somehow I got into Windows recovery thing and reinstalled Win 8. But it still didn't fix the issue. Ubuntu partition is still there.

So here is how I run my computer now. (I somehow figured this myself)

  • Right after I start my computer, I press Esc to show "Startup Menu".
  • Then I go "Run UEFI Application...".
  • Then a "File Browser" pops up. Then I go HDD -> EFI -> ubuntu -> grubx64.efi to get to grub. ( (shim64.efi also seems to work the same way).
  • From Grub I choose "Windows Boot UEFI loader", to start Windows 8.
  • I also can get to Ubuntu from Grub.

  • I cannot post more than 2 links because I am new.

Please help me to either install Ubuntu correctly without affecting Win 8 or remove it safetly?

share|improve this question
Now I GRUB start when I turn on my computer. I can get to Win 8 and Ubuntu, but I can't get to windows recovery (if anything goes wrong). My Windows Boot Manager gives me an error. How do I fix it? – Francis Sep 8 '13 at 17:42

Under EFI, boot loaders are stored as ordinary files and registered with the firmware. This is more flexible than the BIOS approach, but it creates the possibility of mis-matches between what's on the hard disk and what's registered with the firmware. You can usually do the registration in Linux with the efibootmgr utility. Your Boot Repair output shows that GRUB is not properly registered (lines 934-945 and 983-994). This suggests that efibootmgr might not be working on your computer; however, it can't hurt to try using it manually:

  1. Boot to Linux using your workaround method.
  2. Open a Terminal window.
  3. Type sudo efibootmgr -c -p 2 -l "\EFI\ubuntu\grubx64.efi" -L "GRUB (Ubuntu)". Be very careful in typing that command. Note details like the use of quotes and backslashes. (If you want to eventually re-enable Secure Boot, substitute shimx64.efi for grubx64.efi in this command.)
  4. Type sudo efibootmgr -v to check your entry. Verify that the filename is entered correctly.
  5. Reboot. Ideally, GRUB should appear as the default boot program.

If GRUB does not appear, then use your workaround method to boot to Linux and type sudo efibootmgr -v again. If the entry for GRUB is present, then scrutinize it again for typos, and check the BootOrder line to see if it's listed as the first entry. You might need to re-type the command to correct a typo or use the -o option to efibootmgr to adjust the boot order.

If the GRUB entry has disappeared, you might try using bcdedit in Windows to fix the problem:

  1. Boot to Windows using your workaround method.
  2. Open an Administrator Command Prompt window.
  3. Type bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi.
  4. Reboot. With any luck, GRUB will appear.

This method sometimes works when efibootmgr fails, so it's worth trying.

If that fails, too, try running Boot Repair again, but this time, click the Advanced options button and select the option to back up/rename the Windows boot loader and put GRUB in its place. (I don't recall the exact wording of this option.) This implements an ugly hack that installs GRUB in place of the Windows boot loader and moves the Windows boot loader to a new location. This workaround can easily cause future problems, but it (or something similar done manually) is the only way to get some systems working. In fact, some HPs are known to require this solution, so you may well need to use it. Alternatively, you could return your computer to the store and buy one without a broken firmware. If you do this, be sure you tell HP why you did so; it's only returns (and the costs they impose on manufacturers) that will communicate to them that they should stop selling junk.

share|improve this answer
So I did sudo efibootmgr -c -d /dev/sda -p 2 -l \\EFI\\ubuntu\\shimx64.efi -L Ubuntu (I look at this because I want to keep secure boot) like you said on my other post .(‌​esktop/340188?noredirect=1#340188) Sorry I was freaking out before posting that. Now Grub loads up fine. I just want to be on the safe side. I tried to get to the windows/hp recovery thing using but an error pops up. I also tried thorough the BIOS File Browser. Also can you help me fix Windows Boot Manager? Thanks a lot. – Francis Sep 7 '13 at 23:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.