You are not logged in.

#1 2015-12-10 02:02:05

hoover456
Member
Registered: 2015-12-10
Posts: 7

[SOLVED] Make rEFInd the default EFI boot

I have a laptop with both Windows 10 and Archlinux installed and using EFI to boot. I'd like to use rEFInd to choose between OSs on startup, but no matter what I do Windows Boot Manager moves back to the top, meaning the computer boots into windows rather than the rEFInd prompt.

I have tried using bcdedit is windows to change the default boot or to change the path of the {bootmgr} object. Both return invalid parameter
I have used both EasyUEFI in windows and efibootmgr in Arch to move rEFInd to the top of the boot order.
I have tried disabling the Windows Boot Manager entirely through efibootmgr.

None of these have worked. I suppose this is really more of a Windows issue than an Arch one, but I though maybe someone else had encoutered the same problem and found a solution. Let me know if this post is missing any necessary log outputs and I will add them.

Last edited by hoover456 (2015-12-15 20:10:21)

Offline

#2 2015-12-10 04:25:36

quasifilmie
Member
Registered: 2011-10-27
Posts: 296

Re: [SOLVED] Make rEFInd the default EFI boot

What my kind of laptop are using? On my laptop (Dell Inspiron, 4th gen) I can going into UEFI setup and change the bootloader priority manually. If you had already, try that. Efibootmgr  (efibootmgr -v I believe) should give you a matching output and you can use this change the priority too as you already know but I have found it's better to go into UEFI setup.

Last edited by quasifilmie (2015-12-10 04:27:44)

Offline

#3 2015-12-10 05:17:48

hoover456
Member
Registered: 2015-12-10
Posts: 7

Re: [SOLVED] Make rEFInd the default EFI boot

I'm on an Acer Aspire V15 Nitro Black Edition. I can get to boot order, but that is a legacy order not a UEFI setting. I can't get to any UEFI setup. Even going through windows -> restart into UEFI settings just takes me to the bios. Any changes I make with efibootmgr are undone on reboot.

Offline

#4 2015-12-10 05:48:50

hoover456
Member
Registered: 2015-12-10
Posts: 7

Re: [SOLVED] Make rEFInd the default EFI boot

I attempted to implemement this solution to no avail. The boot order was still changed on restart but since I had changed the EFI directory names windows couldn't boot. It just gave an error and threw be back to BIOS config.

Last edited by hoover456 (2015-12-10 05:52:44)

Offline

#5 2015-12-12 20:53:58

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: [SOLVED] Make rEFInd the default EFI boot

I think you can use `bcdedit` (or EasyBCD) to add the Arch bootmanager (just the kernel image if you want to keep it simple) to the Windows boot menu.

See http://superuser.com/questions/499617/h … ot-manager (better examples may be available)

Offline

#6 2015-12-12 21:20:09

hoover456
Member
Registered: 2015-12-10
Posts: 7

Re: [SOLVED] Make rEFInd the default EFI boot

EasyBCD can only work with MBR, but since I'm booting with UEFI I'm using GPT. EasyBCD will lock out all features for adding new linux partitions if you're using UEFI booting. As for bcdedit, I've tried that and got as far as changing the {bootmgr} path to rEFInd's .efi file, but that only resulted in a windows boot error screen on startup, it refused to boot into rEFInd. I think changes made to the BCD aren't loaded until after the system has started to boot into windows, causing errors when the BCD has data that doesn't point to a windows boot. According to https://technet.microsoft.com/en-us/lib … s.10).aspx the default OS can be changes in the BCD entries (so I'd be using windows boot manager to boot to rEFInd to then select between windows or arch), but using bcdedit /enum doesn't show rEFInd's GUID

Offline

#7 2015-12-12 21:31:22

hoover456
Member
Registered: 2015-12-10
Posts: 7

Re: [SOLVED] Make rEFInd the default EFI boot

Realized I had only been running 'bcdedit /enum' and not 'bcdedit /enum all'. Doing that revealed that there is a bcd entry for rEFInd, but with a windows recovery ramdisk specified. setting rEFInd to the default for the next boot got me to a windows recovery error screen with the error 0xc000000f and no option but to reboot. It looks like that error has something to do with a disk being inaccessible, but I couldn't find much info about it online.

Last edited by hoover456 (2015-12-12 21:31:42)

Offline

#8 2015-12-15 13:59:40

Rupes
Member
Registered: 2010-05-02
Posts: 2

Re: [SOLVED] Make rEFInd the default EFI boot

Had this problem myself with an ASRock motherboard. No matter what I tried the default boot kept getting reset to Windows. Got it working without needing to mess with BCD. It was a few years ago but here are some brief notes I made at the time that might help.

1. EFI partition mounted as /boot
2. Install refind-efi, efivar and efibootmgr.
3. Use efibootmgr to make Refind the default boot and disable Windows:
	efibootmgr										- shows boot order
	efibootmgr -c -d /dev/sdX -p Y -l /refind/refind_x64.efi -L "rEFInd"			- creates entry for rEFInd in motherboard nvram.
												  X is disk (defaults to sda)
												  Y is partition (most likely 1)
	efibootmgr -o 0000,0002,0001								- sets boot order (in this exmaple 0000 is rEFInd, 0002 is Windows)
	efibootmgr -A -b 0002									- disables Windows boot, otherwise motherboard always seems to boot it
					  							  regardless of boot order set above
   NB: Ensure rEFInd entry has a * (active) next to it in efibootmgr.
       May need to POWEROFF the computer after making these changes as sometimes the ASRock bios does not recognise them.
4. If boot order still keeps getting reset by Windows, rename 'Microsoft' directory to 'Windows' and edit refind.conf so that rEFInd scans the renamed directory:
	also_scan_dirs Windows

I had to go all the way to step 4 to get it working. Now rEFInd always loads first and I can choose to boot either Arch or Windows.

Will need repeating whenever Windows is reinstalled/refreshed (possibly major updates) - anything that recreates the 'Microsoft' directory basically, which happens rarely. Good luck.

Offline

#9 2015-12-15 19:41:00

Archforum101
Member
Registered: 2015-12-11
Posts: 44

Re: [SOLVED] Make rEFInd the default EFI boot

Well what worked for me is this.

Some clear differences, a) My M$ OS is windows 8.1, b) Gnu/Nix OS used here is Linux Mint 17.2, c) When I installed Arch onto sda11, I didn't bother installing a bootloader for it (LM's grub2 picked it up and boots the Arch install fine). So cannot check to see what path you'd need to use when employing Rod Smith's command to set Arch as the default boot manager.

Shouldn't be much different, you'll have to check for yourself. Assuming you do have a bootloader for Arch installed on the systems ESP partition, so do some digging around to find what you need to use. He also notes, that windows is known to have a tendency to overwrite the default boot manager selected, if it's not done in a windows admin command prompt on windows itself.

Disable fast boot, if you haven't already done so and for me I disabled secure boot in UEFI settings too. Haven't used this for long but as of now, worked exactly as described. When laptop boots, the familiar grub2 menu shows up for me. Instead of having to tap the Esc key at boot, then press F9 to get to boot options menu.

As of now, it's working as expected and rebooted a few times, to see if all Os's would boot when selected, windows 8.1 is confirmed as working. Just a preference, I've gotten to the point where I install enough updates and customizations to a M$ OS, then disable automatic updates. Is a security risk sure ... running any M$ OS imo is a security risk anyway.  So just saying, once you get the boot manager you want in place and working. Seems you'll have to pay closer attention to which windows updates you apply. Strictly speaking either way though, it shouldn't be hard to put things back the way you prefer if a windows update does hijack the boot again anyway.

Last edited by Archforum101 (2015-12-15 19:48:47)

Offline

#10 2015-12-15 20:09:25

hoover456
Member
Registered: 2015-12-10
Posts: 7

Re: [SOLVED] Make rEFInd the default EFI boot

Thanks Archforum101, that fix did it! As it would turn out changing the path in bcdedit was pretty much the first fix I tried, but I never came across the info about disabling fastboot, which seems to have been the culprit. Its a shame that Microsoft's documentation is so awful on this subject, but hopefully this thread will help anyone who runs into a similar issue.

Offline

#11 2015-12-15 20:29:10

Archforum101
Member
Registered: 2015-12-11
Posts: 44

Re: [SOLVED] Make rEFInd the default EFI boot

^Definitely glad it helped fellow nixer. smile

Plus, your post inspired me to finally take action on this topic myself. Was aggravating having to go through multiple steps to get a gnu/Linux OS booted. While researching the subject of UEFI/GPT etc so forth. Kept coming across posts and works by Rod Smith and people thanking him for whichever solutions he was providing.

So have come to kinda consider the guy a nixish authority resource on all things GPT/UEFI, secureboot etc etc. His site is painfully detailed and covers just about anything I could ever want to know about the related topics and/or usage of rEFInd.

Afterthought edit:

Hoover, would you mind sharing the relevant path ( bcdedit commands) you used ? Did you choose to use rEFInd or just using Arch's grub2 as boot manager ? Thanks and glad you got things setup the way you like.

Last edited by Archforum101 (2015-12-15 21:09:44)

Offline

Board footer

Powered by FluxBB