I have tried this many times over but I can't seem to get this to work for my situation. Basically, I used to work with Linux but now I just use it to edit videos and photos in Ubuntu Studio. Therefore, as it is no longer my primary OS, I no longer want to have to use GRUB to choose which OS to boot into.

In other words, because I don't use Ubuntu very often it is aggravating to have to choose the OS every time I start my system. I have been able to modify GRUB to where it will boot into Windows 8.1 by default and lowered the timer, but the fact that GRUB starts in the first place is annoying and I know there must be a workaround. Right now my workaround is to run it as a virtual machine, but when rendering my YouTube videos I'm just not getting as much processing power and it doesn't seem to recognize and therefore properly utilize my graphics card. I would much rather use it as a true OS and not a VM.

So, on a UEFI system, how do I make it to where if I want to load Ubuntu Studio I just have to choose the HDD it is installed to as the boot device from BIOS/UEFI?

Let me know if you need any info I may have accidentally left out

  • Does UEFI provide the option of choosing the HDD? If so, just use it. ...not sure the question has anything to do with Ubuntu. – mikewhatever Jul 19 '14 at 5:20
  • It does but it won't boot to that HDD, even with linux installed on it. I have to choose the HDD with windows installed and then it will take me to GRUB. I don't want to use Grub, because that prompts at every single startup, and I barely use Linux. When I do use it, I want to simply choose to boot from the HDD it is installed on. – Ty Deuty Jul 23 '14 at 22:19

First, throw away your BIOS assumptions! Under EFI, the unit of bootability is a boot loader file, not a hard disk. That is, you don't "choose the HDD it is installed to as the boot device"; you choose the boot loader file for an OS. This may seem like a subtle nit-picky issue, but it's fundamental to understanding -- and therefore properly manipulating -- the EFI boot process.

The first thing you should do is to read your computer's manual, scrutinize its boot-time prompts, or just plain experiment to figure out how you can access the computer's built-in boot manager. Typically, this is done by hitting a particular function key at boot time, although sometimes it's Esc or some other key. (Sadly, there's absolutely no standardization on this.) A few computers don't really have useful boot-time boot menus, but most do. Your boot menu will probably include one option called ubuntu, another called Windows boot manager or something similar (I don't recall the precise name offhand), and probably some other entries. Verify that selecting the Windows item boots straight to Windows without booting Ubuntu. If selecting Windows boots GRUB, or if there is no Windows option, things get complex, so let's put that off....

If the firmware's boot manager lets you boot Windows, then you should boot to Ubuntu and type sudo efibootmgr to see a list of the boot programs that are registered with the EFI. This list should include more-or-less the entries that the boot manager shows you. The output will also include a line called BootOrder that shows the order in which various boot programs are used. Here's an example from one of my computers:

$ sudo efibootmgr 
BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0005,0004,0000,0006,0001,0002
Boot0000* rEFInd (via shim)
Boot0001* P1: WDC WD10EARS-00MVWB0      
Boot0002* P5: ASUS    DRW-2014S1T       
Boot0004* UEFI OS
Boot0005* rEFInd Boot Manager
Boot0006* UEFI: ADATA USB Flash Drive

Windows isn't installed here, and I'm using my own rEFInd boot manager rather than GRUB, so there's no ubuntu entry; but the point is that you can see that the BootOrder causes Boot0005 (rEFInd Boot Manager) to be tried first, followed by Boot0004 (UEFI OS), etc. In your case, you should identify the Windows boot manager and set it first, followed by your ubuntu entry, and optionally followed by anything else. You can set the BootOrder with the -o option to efibootmgr, as in:

sudo efibootmgr -o 7,4,5

This example would set the system to try item #7 first (which isn't present on my system; but just pretend it's a Windows entry), followed by #4, followed by #5. When you reboot, you should see Windows appear automatically. To boot Ubuntu, you can hold the key you use to get to your firmware's boot manager and use that to boot Ubuntu.

I said earlier that things get complex if you can't get to that menu or if selecting the Windows entry boots to GRUB. The latter case is caused by certain options in the Boot Repair tool, which rename GRUB so that it takes on the name normally taken by the Windows boot loader. This is necessary on some systems to work around EFI bugs, but this option is sometimes applied unnecessarily. (This was common a year or so ago, when it was the default for Boot Repair.) You can do similar renaming manually or via other tools, too. The solution is to undo those actions. In Boot Repair, select the Advanced menu and use the option to restore backed-up files to their original names. If you need more help, ask.

If you can't find your firmware's built-in boot manager, you may need to do something else entirely. I believe there's an option in GRUB to set the timeout very low and hide the menu unless a key is pressed. You could do that, in conjunction with making Windows the default boot option. I don't know offhand precisely how to achieve this effect, though. Another solution is to install my rEFInd boot manager and then edit /boot/efi/EFI/refind/refind.conf, uncommenting the timeout line and setting it to -1; and uncommenting and adjusting the default_selection option to boot Windows by default.

  • I hate to ask you this way (wish stack exchange had PM's), but I have a question concerning installing rEFInd via a live cd. Could you check out my stackoverflow question? – pipsqueaker Jul 19 '14 at 19:26
  • Thank you for the quick and thorough response. Your explanation of the difference between BIOS and EFI was excellent. I'm doing this on a custom built PC, so I suppose I'm looking to the motherboard manufacturer for boot options? So I'm assuming its more than just the prompt to choose boot device? This is awfully complicated, I used to work with CentOS but I seem to be worthless in Ubuntu. My concern is that once I attempt an Ubuntu install outside of a VM it messes up my ability to get into Windows, and it appears that I have to poke around to get this working. – Ty Deuty Jul 23 '14 at 5:17
  • Ok I was finally able to get Ubuntu Studio to install in efi and not legacy BIOS. However, I could see ubuntu listed under the boot options OR Windows boot manager. Now that I selected windows once, ubuntu won't show up again. Its acting like it can't have one without the other. Any help here? I can reinstall Ubuntu if necessary to get it back on the list, i did it earlier. – Ty Deuty Jul 24 '14 at 5:10
  • This is the output for that command, nothing about windows: deuty@deuty-linux:~$ sudo efibootmgr [sudo] password for deuty: BootCurrent: 0004 Timeout: 1 seconds BootOrder: 0004,0001,0002 Boot0001* Hard Drive Boot0002 CD/DVD Drive Boot0004* ubuntu – Ty Deuty Jul 24 '14 at 6:10
  • Finally worked using refind. Now it won't even bother me with options unless I ask it too, and I found out that months ago meddling with this problem I switched my windows install back to a bios configuration, so now I have both OS's on EFI. Thanks! – Ty Deuty Jul 24 '14 at 6:48

If your second hard disk is seen as a "removable media" like a USB, it can have its own EFI partition, and uses the default bootloader /EFI/Boot/bootx64.efi. For non-secure boot, copy the unsigned grubx64.efi as the bootx64.efi. For secure boot, copy shimx64.efi to bootx64.efi, and put a copy of the signed grubx64 into /EFI/Boot too. Have the grub.cfg file in /EFI/ubuntu, and you should have a working UEFI boot device. Put it after the Windows Boot in the boot order, and you will have to select it via the efi boot menu. The grub install to a USB disk will probably fail even if given the EFI partition as the location for the bootloader, but you can just make the directories and copy the files yourself, or rely on boot-repair to do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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