Jump to content

rEFInd feat. Ozmosis


uglyJoe
 Share

13 posts in this topic

Recommended Posts

Hello everybody,

I’m using Ozmosis with a Gigabyte H81M-HD3 but unfortunately this board hasn’t enough space in it’s ROM to store the apfs.efi, too.
Than I have a second machine, my ZBox-Nano that not even has the space for the really necessary stuff.
Sure, Clover is able to solve all this problems but I want to go with Ozmosis :)

Here comes rEFInd into the game: http://www.rodsbooks.com/refind/
This boot loader could be installed into the ESP.
rEFInd is not only able to detect apfs formatted partitions but also to load uefi drivers!
And after some weeks of testing, I claim that rEFInd is doing his job very well.

rEFInd is open source so I take a look into it and found a good starting point to learn a little more about the UEFI. The result is a rEFInd version with some additions, that should make life easier and more colorful …. ;)

I’m using this „enhanced“ version in two different setup’s.

First the H81M, that comes with ozmosis, hfsplus, fakesmc and a patched dsdt inside the ROM.
Here rEFInd is only loading apfs.efi and scanning for macOS. The Oz directory on the ESP is not in use.

Second the ZBox. I only replaced the FileSystem driver with EnhancedFat and patched the ROM to unlock the MSR.
rEFInd is loading hfsplus, apfs and ozmosis and is scanning for macOS.
Ozmosis is loading dsdt, ssdt, kext and defaults from the Oz directory on the ESP.

If you like to test it: Installation is easy but do it at your own risk!
Unzip the download and open the directory in Finder.
It comes with rEFInd, ozmosis.efi, apfs.efi, hfsplus.efi and a Oz directory with mac mini defaults and fakesmc.kext.
Goto Efi/Oz and adapt it, to suit your needs.
Goto Efi/Boot/drivers_x64, if you have ozmosis or hfsplus installed into your ROM, delete it from the drivers directory because you don’t need to load it again.

If you are ready to go, mount your ESP and copy shellX64.efi and the Efi directory into the ESP root.
Btw.: This is a EDKII shell, that comes with some functions, which are needed by the nsh scripts I used for changing rEFInd’s configuration from the boot menu.


This is a round up of the changes I made, but after some more testing I will create a fork on GitHub.
Until then I can provide a patch against the current refind source, if someone is interested.

rEFInd 0.11.2-enhanced

Changes / Additions

A. Configuration

rEFInd is showing a message while scanning for devices.
To disable this message use:
hide_scan_msg 1


Boot Splash is an extra banner used only with timeout -1
This banner is splashing centered at the boot screen.
boot_splash banners/banner-black.png


Color Mode can be any combination from the following
0=off
1=icon_auto, 2=icon_value
4=font_auto, 8=font_value
16=menu_auto, 32=menu_value
64=back_value

color_mode 0 <- function is disabled (default)
color_mode 21 <- icons, text and selections are tinted automatic
background color from the banner
color_mode 85 <- icons, text and selections are tinted automatic
background color from value (for transparent banner)
color_mode 101 <- icons, text are tinted automatic
menu / selection color from value
background color from value (for transparent banner)

*_auto generates the color from the current background color
*_value enables the corresponding rgb(a)_color
rgba colors are in hex RED, GREEN, BLUE, ALPHA
rgb colors are in hex RED, GREEN, BLUE

rgba_color_icon f3,f3,f3,5e
rgba_color_menu d3,d3,d3,5e
rgba_color_font d3,d3,d3,5e
rgb_color_back 0c,6f,b8

 

Space between icons in pixel

# big-icons(0-256) small-icons(0-64) y-spacing(0-64)
icon_spacing 64 32 24 

B. Behaviour

The unmodified rEFInd is scanning all devices at start.
Then it loads the drivers if any detected and scans the devices again.
This is good for Mac's but we want to load the drivers for sure, so I change this a little.
Now rEFInd only scans for the ESP to know it's location.
Then it reads the config, load the drivers and start scanning devices.

Also this version is able to detect the 'macOS Install Data'.
This is necessary for installing and updating macOS on partitions formatted with apfs.

New embed banner, arrows and selections.
New embed font (Ubunutu-Mono 18pt and 28pt).
New os_icons from https://github.com/munlik/refind-theme-regular
New tool and function icons.
Visual changes for creating the boot entries.
Changed icon spacing
And some more ... :)

 

Update (14.12.07):

- adaptable icon spacing

- apfs.efi from macOS 10.13.2

 

 

Have Fun!

 

rEFInd-0.11.2-enhanced.zip

  • Like 5
Link to comment
Share on other sites

Yes I now (see ozmosis thread), but I want a GUI because LibreElec is running Kodi on the ZBox, too. 

Than changing CSR from the GUI is also sweet and the boot entries are gone with every oz reset and every os update you have to do load the installer by hand and so on ...

With timeout set to -1 rEFInd needs a second or so to load apfs and detect the macOS. In short, I like it this way.

  • Like 1
Link to comment
Share on other sites

​00:000 00:000 Ozmosis 1.03.167X-CPWN RELEASE (2015-12-24 09:12:07 VS2013x86) on 2017-12-09 06:52:59
Btw.:

Apfs.efi is from macOS 10.13.1 and I applied this patch http://www.insanelymac.com/forum/topic/327584-apfsefi-without-verbose-boot/page-4?do=findComment&comment=2530477

For testing I use VirtualBox with a 1GB Fat formatted disk image. Developing / compiling and can be done in a 10GB Lubuntu image and gnu-efi or edk2 from tianocore. I used edk2. 

 

I just recognized that one script is missing in the archive above :(

shell-mode.nsh from the tools folder.

This is called from most of the other nsh scripts for setting the shell mode if the script is executed

@echo -off
mode 128 40
so create tools/shell-mode.nsh by yourself or uncomment the line in the other scripts if you get an error message.

Maybe it is better this way because you can test which mode is supported with your setup and then adapt the script to fit best.

 

And I know it now ;)

 

Edit: Not much interest on this topic but anyway, I update the archive with the missing nsh script and a new oz defaults.plist (removed CpuType).

 

Some Tipps:

To create unique serials for your defaults.plist: https://github.com/al3xtjames/MacGen

A UUID for the HardwareSignature can be generated with 'uuidgen' from Terminal.app

Don't forget to change HardwareAddress to your MAC address!

  • Like 1
Link to comment
Share on other sites

  • 8 months later...
  • 5 months later...
Thank you [mention=121674]STLVNUB[/mention].
I'll do a test using a USB stick.
My Laptop uses the 7-series.

So how did it go


Sent from my iPhone 5S using Tapatalk

Link to comment
Share on other sites

You may want to re-think your signature

"We were in a great Forum, so, let's have some fun and learn how to do spam"

Link to comment
Share on other sites

  • 6 months later...
On 12/8/2017 at 11:13 PM, uglyJoe said:

Hello everybody,

I’m using Ozmosis with a Gigabyte H81M-HD3 but unfortunately this board hasn’t enough space in it’s ROM to store the apfs.efi, too.
Than I have a second machine, my ZBox-Nano that not even has the space for the really necessary stuff.
Sure, Clover is able to solve all this problems but I want to go with Ozmosis :)

Here comes rEFInd into the game: http://www.rodsbooks.com/refind/
This boot loader could be installed into the ESP.
rEFInd is not only able to detect apfs formatted partitions but also to load uefi drivers!
And after some weeks of testing, I claim that rEFInd is doing his job very well.

rEFInd is open source so I take a look into it and found a good starting point to learn a little more about the UEFI. The result is a rEFInd version with some additions, that should make life easier and more colorful …. ;)

I’m using this „enhanced“ version in two different setup’s.

First the H81M, that comes with ozmosis, hfsplus, fakesmc and a patched dsdt inside the ROM.
Here rEFInd is only loading apfs.efi and scanning for macOS. The Oz directory on the ESP is not in use.

Second the ZBox. I only replaced the FileSystem driver with EnhancedFat and patched the ROM to unlock the MSR.
rEFInd is loading hfsplus, apfs and ozmosis and is scanning for macOS.
Ozmosis is loading dsdt, ssdt, kext and defaults from the Oz directory on the ESP.

If you like to test it: Installation is easy but do it at your own risk!
Unzip the download and open the directory in Finder.
It comes with rEFInd, ozmosis.efi, apfs.efi, hfsplus.efi and a Oz directory with mac mini defaults and fakesmc.kext.
Goto Efi/Oz and adapt it, to suit your needs.
Goto Efi/Boot/drivers_x64, if you have ozmosis or hfsplus installed into your ROM, delete it from the drivers directory because you don’t need to load it again.

If you are ready to go, mount your ESP and copy shellX64.efi and the Efi directory into the ESP root.
Btw.: This is a EDKII shell, that comes with some functions, which are needed by the nsh scripts I used for changing rEFInd’s configuration from the boot menu.


This is a round up of the changes I made, but after some more testing I will create a fork on GitHub.
Until then I can provide a patch against the current refind source, if someone is interested.

rEFInd 0.11.2-enhanced

Changes / Additions

A. Configuration

rEFInd is showing a message while scanning for devices.
To disable this message use:
hide_scan_msg 1


Boot Splash is an extra banner used only with timeout -1
This banner is splashing centered at the boot screen.
boot_splash banners/banner-black.png


Color Mode can be any combination from the following
0=off
1=icon_auto, 2=icon_value
4=font_auto, 8=font_value
16=menu_auto, 32=menu_value
64=back_value

color_mode 0 <- function is disabled (default)
color_mode 21 <- icons, text and selections are tinted automatic
background color from the banner
color_mode 85 <- icons, text and selections are tinted automatic
background color from value (for transparent banner)
color_mode 101 <- icons, text are tinted automatic
menu / selection color from value
background color from value (for transparent banner)

*_auto generates the color from the current background color
*_value enables the corresponding rgb(a)_color
rgba colors are in hex RED, GREEN, BLUE, ALPHA
rgb colors are in hex RED, GREEN, BLUE

rgba_color_icon f3,f3,f3,5e
rgba_color_menu d3,d3,d3,5e
rgba_color_font d3,d3,d3,5e
rgb_color_back 0c,6f,b8

 

Space between icons in pixel

# big-icons(0-256) small-icons(0-64) y-spacing(0-64)
icon_spacing 64 32 24 

B. Behaviour

The unmodified rEFInd is scanning all devices at start.
Then it loads the drivers if any detected and scans the devices again.
This is good for Mac's but we want to load the drivers for sure, so I change this a little.
Now rEFInd only scans for the ESP to know it's location.
Then it reads the config, load the drivers and start scanning devices.

Also this version is able to detect the 'macOS Install Data'.
This is necessary for installing and updating macOS on partitions formatted with apfs.

New embed banner, arrows and selections.
New embed font (Ubunutu-Mono 18pt and 28pt).
New os_icons from https://github.com/munlik/refind-theme-regular
New tool and function icons.
Visual changes for creating the boot entries.
Changed icon spacing
And some more ... :)

 

Update (14.12.07):

- adaptable icon spacing

- apfs.efi from macOS 10.13.2

 

 

Have Fun!

 

rEFInd-0.11.2-enhanced.zip

I got the Forbidden sign,what shoud I do?

Link to comment
Share on other sites

 Share

×
×
  • Create New...