5

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?

1
  • How did you install Ubuntu?
    – Mitch
    May 7, 2013 at 6:16

2 Answers 2

9

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 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.

1
  • 1
    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.
    – sm63834
    May 7, 2013 at 21:51
1

If you prefer to fix it from your ubuntu you can use the efibootmgr utility (as root) as partially described in this reply:

efibootmgr -v

to see a list of installed bootloaders and the Bootorder

efibootmgr -o xxxx,yyyy,...

to specify the BootOrder to use as default.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .