Jul 05, 2017. Apr 16, 2013.
In this blog post I’ll be covering the process of installing and troubleshooting refind bootloader from a machine running Windows 10 1903 (although I hope this will survive any updates from Microsoft).
At first, I tried following the official documentation and replacing the
{bootmgr} ’s path with refind’s, but it didn’t work. Then, I used BCDEDIT.exe to modify every single path to bootmgfw.efi I cound find but to no effect. After every reboot, Windows kept showing up no matter what.
https://lendingtree789.weebly.com/blog/download-mimio-software-for-mac. So, I’ll be describing here the steps I had to take in order to make everything work as expected, and some guide to troubleshoot any error that you stumble on. Here’s a screenshot of the final result:
What our goals are
What our goals aren’t
Refind Boot LoaderWhat you’ll need
¹NOTE: The Windows 10 bootable is not required, but is recommended in case you mess things up.
Before we get started
⚠️ UPDATE: Before you proceed, I recommend trying the steps on the official documentation and using this only as last resort. If you do have to follow this path, I recommend you backup your refind installation folder after the installation is complete. When you are installing some OSes (e.g. Linux), they will overwrite refind’s files and prevent you from booting into refind (but booting into the fresh installed OS will work). If this happens, all you have to do is login into the OS you just installed and restore your refind backup.
First of all, go ahead and disable UEFI’s Secure Boot. I won’t go into details on how to do it, since it changes from system to system. If you don’t know how to do it just search around. Pay attention not to disable UEFI, just Secure Boot.
Getting started
In ordet to get started, we’ll need access to the Windows’ FAT32 EFI partition. To do that, we’ll have to mount it. From an elevated command prompt, issue the following command (where
B: is the letter you want to assign to the partition):
After this, you should have your partition mounted at
B: (or whatever letter you specified). In order to access it, you’ll have to launch Explorer++ as Administrator (see the note below). If you open it up you should see the following structure:
NOTE: The old trick of killing
explorer.exe and launching it from an elevated command prompt doesn’t seem to be working anymore. The B: drive shows up but is not accessible. I prefer not to mess around with this drive’s permissions, so I’m using this alternative method.
Microsoft Windows’ Boot Environment
Microsoft’s folder intuitively contains files used to boot Windows. I’ll summarize what I think is important about the boot process, but if you want to know more, I suggest you start here (this link is where I’m getting all the info below).
NOTE: I’m not an expert, so I may say something that is not 100% accurate. If you find something that you think is incorrect, please drop me a line.
With just Windows installed, this is what the boot flow looks like:
Replacing Windows Boot Manager
Our goal here is to replace Windows Boot Manager with refind (but, of course, allowing refind to call the Windows Boot Manager later if that’s what the user wants).
In order to do that, we’ll use the EFI fallback file. Here’s a quick definition, but if you want to know more, take a look here and here.
The firmware will look through each EFI system partition on the disk in the order they exist on the disk. Within the ESP, it will look for a file with a specific name and location. On an x86-64 PC, it will look for the file EFIBOOTBOOTx64.EFI.
So… let’s recap: we know that the firmware looks for Windows Boot Manager on
EFIMicrosoftBootbootmgfw.efi and we know that, if it doesn’t find it, it’ll look for whatever file is at EFIBootbootx64.efi . Hmm…
You probably realized where we are going here, but in case you dind’t: our plan is to set refind as the EFI fallback file and move Windows Boot Loader to some place where the firmware can’t find it. Then, we can create an entry in refind pointing to the place where we moved Windows’ files.
This is actually quite simple, but will require a few hacks. Lets begin.
Installing refind
First of all, rename the existing
EFIBoot folder to something like EFIBoot.old , so that you have a backup in case you need it. With this out of the way, create a new EFIBoot folder and copy refind’s files there. Rename refind_x64.efi to bootx64.efi .
![]()
One more thing, add the following entry to your
refind.conf file (this is important, trust me), replacing {folder} to anything BUTMicrosoft (I’ll use _Microsoft ) and {pathtoyouricon.png} with the actual path of your icon:
After this step, refind is properly set up as the EFI fallback. All we have to do now is make Windows Boot Loader unfindable by the UEFI firmware.
Renaming the Microsoft folder
This should’n need a dedicated section, but is not as straightforward as it seems. The
EFIWindows folder cannot be renamed from Windows (since it is kept in use).
So, you’ll need to get a command prompt at boot. In order to do that I usually use the Windows bootable (just press
Shift + F10 on menu), but there are other ways to do it in case you didn’t set up your bootable media.
Refind Iso
At the boot command prompt, mount the EFI partition and navigate to the EFI folder:
At this point, if you explore this folder, you should have your
Boot folder with refind’s files and Microsoft folder with Windows’ ones. All you have to do is rename the Microsoft folder to the same name you used on your refind’s menuentry .
⚠️Remember to replace
{folder} by the exact same thing you used in your refind.conf file.
And that’s it. Close the command prompt and restart your computer. Next time you boot your firmware should not find Windows Boot Manager and fallback to refind. Since we manually added the Windows entry to refind, you should be able to boot into Windows from there.
TroubleshootingI messed things up and now I can’t boot my computer
Keep calm. This probably happened to me a few dozen times in the process of trying to install refind.
All you have to do is fix your EFI partition. I usually just format the partition and ask Windows to rebuild it, this way you should have a fresh start. Note that this will only work if Windows is the only operating system installed in this partition.
To format and rebuild the partition, boot into your Windows 10 media (I hope you have one), launch a command prompt and execute the following:
This should rebuild your EFI partition and you should be able to boot into Windows now.
Refind shows up without any option (hangs)
This happened to me. In my case it was an issue with the NTFS driver, so all I had to do was remove the
ntfs_x64.efi file from the EFIBootdrivers_x64 folder.
NOTE: You don’t need the NTFS driver to boot into Windows, since the EFI partition is using FAT. For more info, take a look here
If it isn’t a drive issue for you, see if any of the below helps. This is a quote from refind’s author Roderick W. Smith:
This sort of problem normally indicates a filesystem issue – rEFInd is getting stuck in an infinite loop attempting to read one of the filesystems on the disk. I recommend you try the following:
1. If you have any external disks attached to the computer, try unplugging them. Such disks sometimes cause problems. If this fixes the problem but you need to use the external disk on a regular basis, you may need to further debug the problem as below; but if it’s just a USB flash drive that you don’t need to leave permanently attached, then this should be the end of it. 2. Remove (or move) all the EFI filesystem drivers from the “drivers”, “drivers_x64”, and “drivers_ia32” subdirectories of the rEFInd installation directory. (Normally there’ll be only one drivers subdirectory; just remove all those driver files.) Reboot. 3. If rEFInd hangs even with no EFI filesystem drivers installed, then the problem is likely with the ESP or some other FAT filesystem. You can try doing a filesystem check on such partition(s) with dosfsck in Linux, CHKDSK in Windows, or similar utilities. In an extreme case, you could try backing up the ESP (and/or other FAT partitions), creating a fresh filesystem, and restoring the data. 4. If rEFInd comes up and shows a menu after removing the filesystem drivers, even if the menu options are incomplete, then this is good; it indicates that there’s a problem with one of the filesystems or their drivers. You can then begin restoring the driver(s) that you need. Normally this will be just one, for whatever filesystem holds your Linux kernels. (You do NOT need the NTFS driver to boot Windows.) 5. If rEFInd works at this point, then you’re done – the problem was in some superfluous driver(s) that you weren’t using. 6. If rEFInd hangs, then you can try booting in some other way and using a filesystem check utility like fsck on the filesystem(s) that can be read with the driver(s) you restored. With any luck this will fix the problem. 7. If the problem persists at this point, you have a number of options: a) Remove the offending filesystem driver, install GRUB, and use it to boot the Linux kernel. GRUB uses a different filesystem driver and so may not be affected. b) If you don’t already use one, create a small (~1GiB) partition to use as /boot, using a different filesystem than your main Linux partition. You can then install the EFI driver for the /boot partition, copy the contents of /boot to it, and adjust /etc/fstab to mount this partition at /boot. The ext4fs, Btrfs, and ReiserFS EFI drivers are the fastest ones. c) Do as in option b, but use FAT, which requires no special driver. This works better with some distributions than others, though. Debian-based distributions often use symbolic links, which aren’t supported on FAT, in /boot, for instance. Some Arch Linux users like to use FAT on /boot (or mount the ESP at /boot), by contrast. d) Completely wipe and re-install the offending partition(s). It’s possible that the EFI driver is flaking out because of leftover data that wasn’t completely erased when you created the partition. If you opt to do this, I recommend completely zeroing the partition (with “dd if=/dev/zero of=/dev/{wherever}” or something similar) before restoring it. e) Try a different EFI filesystem driver. The efifs project (http://efi.akeo.ie/) offers a large number of EFI filesystem drivers, and its variant of the rEFInd driver might work better on your system. There may be some other options and potential causes I’m forgetting.
rEFInd is a boot manager for UEFI computer that will allow you to choose between Windows, Linux and Mac OS X, and other operating systems when you boot your computer, it can auto-detect your installed operating systems and presents a pretty GUI menu these operating systems. rEFInd is one of the most popular multi-boot managers on the market.
Under Linux and Mac OS X operating systems, you can use refind-install script to install rEFInd, it automatically copies rEFInd's files to the EFI System Partition (ESP) and makes changes to the firmware's NVRAM settings so that rEFInd will start the next time you boot. If the refind-install script does not work properly or you want to install it using Windows, you may need to use EasyUEFI to complete the installation and configuration. EasyUEFI is a Windows software for users to manage EFI boot options and ESP partitions, it is the tool recommended by rEFInd official. Below we'll show you how to set up multi-boot of Windows, Linux and Mac using rEFInd and EasyUEFI.
Tutorial to set up multi-boot of Windows, Linux and Mac using rEFInd and EasyUEFI.
Step 1. Download rEFInd from rEFInd's official website, and unzip it if it is a compressed package.
Step 2. Download, install and run EasyUEFI, click the button, and then click the button.
Step 3. Select the EFI System Partition (ESP) where you want to install rEFInd in the disk/partition list, then click the 'Open' button to open the EFI System Partition Explorer.
Step 4. Right-click on the EFI directory and select 'Upload'.
Step 5. Select the refind in the directory extracted from the rEFInd compressed file, then click 'OK' button to upload it.
Step 6. After the upload is complete, right-click 'refind.conf-sample' in the refind directory and select 'Rename'.
Step 7. In the dialog box that pops up, rename 'refind.conf-sample' to 'refind.conf', and then click 'OK'.
Step 8. After all the above operations are completed, click the 'Exit' button to close the EFI System Partition Explorer.
Step 9. Return to the main page of the program, click the button, then click the button.
Step 10. In this page, select the type as 'Linux or other OS', enter 'rEFInd' as the description, select the ESP partition that rEFInd has been copied into, then click the 'Browse' button and select 'EFIrefindrefind_*.efi' as the file path (Please note that you need to select the corresponding efi file according to the architecture of your computer).
Step 11. After completing the settings, click 'OK' to create the boot option, then move rEFInd to the top of the boot order list as the priority startup item.
Step 12. Restart the computer, refind will start and display the multi-boot menu.
As described above, you can set up multi-boot of Windows, Linux and Mac using rEFInd and EasyUEFI easily, EasyUEFI is a surprise for users who use rEFInd for multi-boot management.
Refind Boot Manager WindowsRelated GuidesComments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |