Contribute
Register

[Guide] Asrock UEFI Boot Fix

Status
Not open for further replies.
Joined
Aug 31, 2010
Messages
3,888
Motherboard
Asrock Z87E-ITX
CPU
i7-4770S
Graphics
GTX 760
Mac
  1. iMac
  2. Mac mini
Mobile Phone
  1. iOS
This small guide has been written to walk you through a possible fix to enable your Asrock motherboard to boot correctly using UEFI, primarily for the Clover bootloader. It should only be used if you have followed the recommended method for installing and booting using Clover, but your system refuses to boot without the Unibeast USB installer.

This issue was originally identified on certain Asrock motherboards, and has been tested on the Z87E-ITX. Since we are dealing with UEFI, there is no reason why it shouldn't work on other boards but has not been tested further.

An alternate method to this guide using Clover can be found here, courtesy of ctyler at post #38 of this thread.

The pre-requisites where this may work for you are :
:ch: You use an Asrock motherboard.

:ch: You have installed OSX using the recommended method.

:ch: You have installed the Clover bootloader.

:ch: Your computer won't boot from the system drive where you installed OSX and Clover.

If you can tick all four boxes above then read on. If not then you need to get your system installation to the point where you can tick all the boxes.

We are not aware of this happening on any other model of motherboard at this time. In the case of an Asrock motherboard, it appears to happen because of a poor/incomplete UEFI implementation. What this means is that the board does not boot properly, even though the Clover bootloader is correctly installed.

Important : The method we use here has proven to be non-destructive so far. No data has been lost, no fully installed system has disappeared. It doesn't mean that will always be the case. You are responsible for your data and keeping proper backups of your important stuff. Be smart and do that before you begin.

There are a number of considerations for this method - pay attention and read them carefully so you fully understand the implications:

1. Existing Methods. You should follow the existing guidance and make every effort to install your system the recommended way. We are primarily looking at Mac OS X El Capitan using the Clover bootloader. The recommended method can be found here.

2. Search The Forums. See if anyone else has built their system using the same motherboard as you. They may have already discovered the correct settings to enable booting from UEFI.

3. Reverting Changes. The changes described here can be reversed by doing a full UEFI bios reset. This is good in case you make a mistake; the downside of this is that you will then need to go back and change all your bios settings again. Most modern motherboards have the option to save your current settings to a profile, which can then be recalled. Make use of this.

4. UEFI Boot Setting. If you haven't already done so, make sure your system is set to boot using UEFI instead of legacy. This is usually found in the boot settings of your bios. Be aware that most modern motherboards which use UEFI will show both UEFI and legacy boot options at the same time.

5. Linux & The Command Line. The way we do this is by using linux, working from the command line, using elevated privileges. If you are not comfortable with this then do not proceed. Elevated privileges mean you could easily cause damage to your otherwise shiny new OSX installation.

Finally, if your Clover install is hosed or incorrectly configured, this method will not fix it for you. This is about helping the motherboard UEFI to 'see' the Clover bootloader correctly; it does not fix a broken or incomplete Clover install.

So now you have read all that, what to do next ?

Follow these steps in order; do not deviate. Take your time and read the instructions very carefully.

Part 1 : What You Need

Our weapon of choice here is a good linux distribution. You are free to choose whichever you like, but you must make sure that it contains the package 'efibootmgr', and also that it contains an EFI kernel module. This module if often called 'efivars'.

The tested distribution at this time is Mint Linux. This is a modern, up-to-date distribution, and contains the package and module described above. It does not require a network connection, which some other distros may need. Follow this link to download the version I used successfully. The instructions in this guide assume you are using this distribution, other distributions may be slightly different.

You will need to create a bootable drive with the linux you downloaded. Since the download is a standard .iso image, you can simply burn it to a DVD drive, or create a USB drive from it. There are many tools available to create a USB installer; one example is 'UNetBootin' which has versions available for Windows, OSX or Linux.

Important : Make sure you do not overwrite your OSX Unibeast installer.

Part 2 : Boot The New Linux DVD/USB

Insert your new linux DVD or USB and boot your system from it. Press F11 or whichever key your system uses to get to the boot selection list. In the list you will see several entries, and the one you are looking for is UEFI and represents the drive containing your linux. Here is what mine looked like :

SelectLinuxBootDrive.JPG

In this case, I wrote the linux iso image to DVD and booted from that.

Important : Only boot from the UEFI entry. Using non-UEFI means it will not work as expected.

It may seem odd that you have a UEFI entry for your removable drive with linux on it, but not for your system drive with the OSX installation. This is the quirk we are attempting to fix with this method.

Wait for the linux desktop to load. This may take a few minutes depending which medium you are booting from. As the desktop loads, you will see a login box on the screen. Don't enter anything here, the system will automatically log you in after a few seconds.

Part 3 : Change The Settings

Here is where we really get stuck in; once again, pay close attention.

At the bottom left of the linux desktop screen, next to the menu button you will see several small icons. Click on the icon for 'Terminal'. This will open a window similar to the 'Terminal' application in OSX.

LinuxTerminalIcon.JPG

Now type in the following commands and press Return :

Code:
sudo -s

The system has already given us elevated privileges, but doing this will save extra typing.

Code:
modprobe efivars

This tells linux to load the kernel module 'efivars'. This is needed so that linux can communicate with the UEFI system on your motherboard.

Code:
apt-get install efibootmgr

This tells the linux system to install the 'efibootmgr' package we need. It is already on the linux system but not installed by default.

You will see some text on screen as the package is installed. This is what your Terminal window should look like so far :

AfterInstallationOfPackage.JPG

Code:
efibootmgr

This runs the efibootmgr program. You will see a list of drives in your system ; the exact output will vary. Here is what mine looked like :

FirstEFIList.JPG

In the list you can see I have a total of 3 drives listed. The first (Boot0001) is my SSD system drive, the second (Boot0002) is my DVD drive, the third (Boot0003) is also my DVD drive but as a UEFI device.

Each one has an ID of the format 'Boot00xx', and the boot order is shown relative to these. The currently booted drive is also shown as 'BootCurrent'; this confirms I have booted UEFI from the Optiarc DVD drive.

Code:
efibootmgr -c -L "Clover UEFI" -l "\EFI\CLOVER\CLOVERX64.EFI"

This instructs the system to create a new UEFI entry.

The first part in quotes, "Clover UEFI", is the label you are giving to the new UEFI entry. This can be any description you like, but must be enclosed in quotes.

The second part in quotes, "\EFI\CLOVER\CLOVERX64.EFI" tells the UEFI system where to find the file it needs to start the UEFI boot process.

The flag in the middle of these 2 parts is a lower case L and not the number 1.

Important : Notice that we use back slashes in the second part, and not forward slashes. Make sure to get this right otherwise it won't work.

Here is the ouput :

AddedNewEntry.JPG

You can see my new entry has been given an ID of 'Boot0000', and is currently at the bottom of the list. The system has correctly set its boot order, but we also want to move it to the top of the list.

Code:
efibootmgr -o 0000

This reaffirms the boot order for our new entry and puts it at the top of the boot list, which we will see when we reboot the computer.

The four digits we use in the command above represent the last four digits of the ID assigned to the drive.

The correctly configured list and boot order now looks like this :

NewBootOrder.JPG

That is the required changes now made.

A quick check in the bios boot order shows the changes have been successful :

NewBiosList.JPG

You should now restart the computer and remove the linux boot DVD/USB. Once again press F11 or whatever key your system uses to display the list of devices.

Go ahead and select the new UEFI entry to boot from Clover.

You could also use something more descriptive. Here is another way I labelled it :

ElCapOption.JPG

Whichever label we use when adding the new entry is whats shown in the bios boot list.

Nice touch huh ?

:thumbup:

Oops, I Might Have Messed Up With The Guide, What Do I Do Now ?

If your system does not boot as expected or you have got lost somewhere in the middle of the guide and not sure what to do next then simply reboot your system, go back into your bios and do a full bios reset, back to default settings. Any changes will then be wiped out and you can try again. Remember though to optimize your settings for OSX as usual.

The changes we have made with the guide will survive reboots, but will not survive a bios reset or bios upgrade.

Note this method will not fix every single Clover boot issue; if you find you can boot UEFI from the Unibeast installer but not your OSX system drive, this may work for you.

Let us know if this method helps you out !


:)
 
Last edited:
YES! I am in business now. Even have sound and bluetooth working. Thank you so much!
 
Thanks so much for the post. This works with my Asrock Z97 Extreme6.

For some reasons my EFI wasn't mounted correctly. After mounting it, copying files over and apply your method, it works like a charm!
 
Thanks so much for the post. This works with my Asrock Z97 Extreme6.

For some reasons my EFI wasn't mounted correctly. After mounting it, copying files over and apply your method, it works like a charm!

Great to see it worked for you. Thanks for confirming.

:)
 
Posting to confirm the linux commands worked like a charm. I used Ubuntu as my distro. My motherboard is an ASRock H97M Pro 4 which now boots into Clover without the need of unibeast installer. Will definitely be throwing a donation for this site. Looking forward to further development with El Capitan.

Thanks again
 
HI there. I would like to ask your advice before I try this method please. I`ve installed my first build El Capitan and I`m having trouble booting into my ssd drive. Some important specs:

Asrock Z77 Extreme 4 (mboard)
Kingston SV300S37A 120gb ssd (drive)
I7 3770K (cpu)
2 x 4GB Kingston Hyper x Beast (memory)
GTX 650 Ti Boost (graphics)

I believe I installed everything correctly. When I open Clover in OS X it informs me that it couldn't find the config.plist. In other words the EFI doesn't mount. When I try to boot into my ssd after restart I get this message:

IMG_20151009_111559360.jpg


After pressing F11 this is my boot order:

IMG_20151009_111638991.jpg

I would like to know if this is a possible cause explained in this thread please. Any help would be appreciated, thanks.
 
HI there. I would like to ask your advice before I try this method please. I`ve installed my first build El Capitan and I`m having trouble booting into my ssd drive. Some important specs:

Asrock Z77 Extreme 4 (mboard)
Kingston SV300S37A 120gb ssd (drive)
I7 3770K (cpu)
2 x 4GB Kingston Hyper x Beast (memory)
GTX 650 Ti Boost (graphics)

I believe I installed everything correctly. When I open Clover in OS X it informs me that it couldn't find the config.plist. In other words the EFI doesn't mount. When I try to boot into my ssd after restart I get this message:

View attachment 155271


After pressing F11 this is my boot order:

View attachment 155272

I would like to know if this is a possible cause explained in this thread please. Any help would be appreciated, thanks.



You have 2 separate issues here.

First of all, when you configure Clover, if you use the Clover Configurator it includes an option on the main screen to mount the EFI partition which is where your config file is located. If you haven't done that, try it. Without mounting that EFI partition you won't be able to access your config file.

Second, your boot issue appears to be what I have described in this guide, so go ahead and try it. If that is not the case you can revert back to where you are now by doing a bios reset, so no harm done.

Also, can't see the boot order pic, its way too small...
 
Posting to confirm the linux commands worked like a charm. I used Ubuntu as my distro. My motherboard is an ASRock H97M Pro 4 which now boots into Clover without the need of unibeast installer. Will definitely be throwing a donation for this site. Looking forward to further development with El Capitan.

Thanks again

Good to see it is working for you :thumbup:
 
You have 2 separate issues here.

First of all, when you configure Clover, if you use the Clover Configurator it includes an option on the main screen to mount the EFI partition which is where your config file is located. If you haven't done that, try it. Without mounting that EFI partition you won't be able to access your config file.

Second, your boot issue appears to be what I have described in this guide, so go ahead and try it. If that is not the case you can revert back to where you are now by doing a bios reset, so no harm done.

Also, can't see the boot order pic, its way too small...


Thanks for your reply. I know about the mount option in clover and I've managed to mount the EFI and saved the config.plist file. It just seemed the issue was related. Anyways, the boot issue is what I'll try to resolve with your method now. Thanks, I'll report back afterwards.
 
Status
Not open for further replies.
Back
Top