Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1302  / 2 Years ago, sun, march 20, 2022, 10:19:11

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


More From » dual-boot

 Answers
6

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.


[#24074] Monday, March 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oreera

Total Points: 472
Total Questions: 121
Total Answers: 116

Location: Mayotte
Member since Thu, Dec 17, 2020
3 Years ago
;