Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a HP Spectre XT that I installed Ubuntu on. I have turned "Secure Boot" off and turned on "Legacy Support" in the settings. This laptop has UEFI and it always boots to Windows 8 rather than the GRUB menu. To boot Ubuntu, I have to go to "select boot device" and select the "ubuntu" option, which will take me to the GRUB menu.

How can I get it to boot into Ubuntu by default?

share|improve this question
    
How did you install Ubuntu? –  Mitch May 7 '13 at 6:16

1 Answer 1

up vote 4 down vote accepted

I strongly suspect that you have not installed Ubuntu in BIOS mode. The reason I say this is that you report that your "select boot device" boot menu has an option called "ubuntu." If you were booting Ubuntu in BIOS (aka CSM or legacy) mode, this wouldn't be the case; the option would say "boot from HD" or some such generic description, since the firmware would have no way of identifying the BIOS-mode OS as being Ubuntu. In an EFI-mode boot, though, this information is stored in NVRAM, and so is available to the EFI's boot manager.

To be sure of this, boot Ubuntu and look for a directory called /sys/firmware/efi. If it's present, you've installed and booted Ubuntu in EFI mode. If it's absent, you've probably booted in BIOS mode, although there are ways to make that directory disappear from an EFI-mode boot, so I can't be positive of that.

If I'm right, then something is preventing GRUB from turning up as the default boot loader. Chances are this is because of a bug in HP's firmware; I've heard of other HP computers that have the same problem. There are quite a few possible workarounds. I recommend you try these two, in order:

  • Boot to Windows and open an Administrator Command Prompt window. Type the following and hit enter,

    bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

If this works, GRUB will come up the next time you boot. (Note that you should type {bootmgr} in exactly that way; I'm not trying to denote a variable with the curly braces.)

  • In Linux, run the Boot Repair tool. This will do some juggling of boot files, which should make GRUB come up by default. Note that this approach is rather heavy-handed and the change may be undone by Windows -- very likely after certain system updates, and some users have reported after every boot. Still, this method often works for extended periods.

If neither of these approaches works, post back, along with the output of sudo efibootmgr -v and df -h /boot/efi. This extra information will enable me to make additional suggestions.

share|improve this answer
    
Thanks, I tried running the command in Windows. It worked, but when I booted up Windows it reverted back (and running the command again didn't change it.) The Boot Repair tool worked and with the help of Grub Customizer I have it set up how I would like. –  derpert May 7 '13 at 21:51

Your Answer

 
discard

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.