Contribute
Register

Giacomoleopardo's Audio Macmini8,1

Status
Not open for further replies.
Joined
Apr 28, 2011
Messages
909
Motherboard
Asus Prime Z690M-Plus D4
CPU
i7-12700KF
Graphics
RX 6600
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
Giacomoleopardo's Audio Macmini8,1
Intel® Core™ i7-9700K Processor - Asus PRIME Z390-P - Intel® UHD Graphics 630
macOS Mojave 10.14.6 & macOS Catalina 10.15.4 UEFI Clover step by step install method
Corsair-Carbide-275R-nero-case-pc-hunter-01.png
COMPONENTS

Intel® Core™ i7-9700K CPU
https://www.amazon.com/Intel-i7-9700K-Desktop-Processor-Unlocked/dp/B07HHN6KBZ/ref=sr_1_1?dchild=1&keywords=9700K&qid=1589719049&sr=8-1
https://www.newegg.com/core-i7-9th-gen-intel-core-i7-9700k/p/N82E16819117958?Description=i7-9700K&cm_re=i7-9700K-_-19-117-958-_-Product&quicklink=true

ASUS PRIME Z390-P motherboard
https://www.amazon.com/Prime-Z390-P-LGA1151-Intel-Motherboard/dp/B07HCT5GBD/ref=sr_1_1?dchild=1&keywords=Z390-P&qid=1589719100&sr=8-1
https://www.newegg.com/p/N82E16813119154?Description=Z390-P&cm_re=Z390-P-_-13-119-154-_-Product&quicklink=true

SAMSUNG 860 QVO SATA 2.5" SSD 1 TB - MZ-76Q1T0BW
https://www.amazon.com/Samsung-Inch-Internal-MZ-76Q1T0B-AM/dp/B07L3D19MY/ref=sr_1_3?dchild=1&keywords=860+qvo+sata+2.5%22+ssd+1tb&qid=1589719128&sr=8-3
https://www.newegg.com/samsung-860-qvo-series-1tb/p/N82E16820147738?Description=860%20QVO%20SATA%202.5%22%20&cm_re=860_QVO_SATA_2.5%22-_-20-147-738-_-Product&quicklink=true

Seagate Barracuda ST2000DM008 - hard drive - 2 TB - SATA 6Gb/s | ST2000DM008
https://www.amazon.com/Seagate-BarraCuda-Internal-Drive-3-5-Inch/dp/B07H2RR55Q/ref=sr_1_2?dchild=1&keywords=sT2000DM008&qid=1590306899&sr=8-2
https://www.newegg.com/seagate-barracuda-st2000dm008-2tb/p/N82E16822184773?Description=ST2000DM008&cm_re=ST2000DM008-_-22-184-773-_-Product&quicklink=true

Corsair VENGEANCE® LPX 16GB (2 x 8GB) DDR4 DRAM 3200MHz C16 Memory Kit - Black - CMK16GX4M2B3200C16
https://www.amazon.com/Corsair-Vengeance-3200MHz-Desktop-Memory/dp/B0143UM4TC/ref=sr_1_1?dchild=1&keywords=CMK16GX4M2B3200C16&qid=1589719265&sr=8-1
https://www.newegg.com/corsair-16gb-288-pin-ddr4-sdram/p/N82E16820233859?Description=CMK16GX4M2B3200C16&cm_re=CMK16GX4M2B3200C16-_-20-233-859-_-Product&quicklink=true

Corsair RM650x 80 PLUS Gold Fully Modular ATX Power Supply
https://www.amazon.com/CORSAIR-Certified-Modular-Microsoft-Standby/dp/B07RFZPN8G/ref=sr_1_2?crid=5D2MJRVZ91DF&dchild=1&keywords=corsair+rm650x+power+supply&qid=1589719526&sprefix=corsair+RM650x%2Caps%2C463&sr=8-2
https://www.newegg.com/corsair-rmx-series-rm650x-2018-cp-9020178-na-650w/p/N82E16817139232?Description=RM650x&cm_re=RM650x-_-17-139-232-_-Product&quicklink=true

Corsair Carbide Series 275R Tempered Glass Mid-Tower Gaming Case — Black
https://www.amazon.com/CORSAIR-Carbide-Mid-Tower-Gaming-Window/dp/B079JVTPJK/ref=sr_1_4?dchild=1&keywords=Carbide+Series+275R+black&qid=1589719573&sr=8-4
https://www.newegg.com/black-corsair-carbide-series-atx-mid-tower/p/N82E16811139117?Description=Carbide%20Series%20275R&cm_re=Carbide_Series_275R-_-11-139-117-_-Product&quicklink=true

Noctua NH-U14S cpu cooler
https://www.amazon.com/Noctua-NH-U14S-Premium-Cooler-NF-A15/dp/B00C9FLSLY/ref=sr_1_3?dchild=1&keywords=NH-U14S&qid=1589719727&sr=8-3
https://www.newegg.com/noctua-nh-u14s/p/N82E16835608041?Description=NH-U14S&cm_re=NH-U14S-_-35-608-041-_-Product&quicklink=true

BCM94360CS Wi-Fi + Bluetooth PCIE card
https://www.amazon.com/HEASEN-Dual-Band-BCM94360CS-Wireless-Adapter/dp/B07K2Y3BY7/ref=sr_1_9?dchild=1&keywords=BCM94360CS&qid=1589719750&sr=8-9
https://www.newegg.com/fenvi-fv-t919-pci-express/p/0XM-00JK-00033?cm_sp=SearchSuccess-_-INFOCARD-_-BCM94360CS-_-9SIADXZ7GS4848-_-1&Description=BCM94360CS

Already owned

My two monitors:
- 27" Apple Cinema Display (MiniDisplay Port) - 2560 x 1440 - Audio via DisplayPort + USB
- 23,5 Asus VN247 (HDMI) - 1920 x 1080 - Audio via HDMI
- Generic mouse and keyboard

COMMENTS

Here's a brand new one with macOS Mojave 10.14.6.
Why Mojave?
Well, the reason is because it must deal with an external USB 2.0 audio interface not yet ready for macOS Catalina.
Nevertheless, this guide will provide for both installation, Mojave 10.14.6 and Catalina 10.15.4 (the latest at this time).
Anyway, I'm definitely ready to update the system whenever ready (a small video will follow, showing direct update).
Plus, this is the opportunity to gather infos about patching and flashing bios, thanks to a bunch of really cool guys.
Furthermore, I was asked to add a 2TB HDD for a daily automatic TimeMachine backup. Take a look at Step 8 down here. Quite interesting, trust me!
Due to a low budget, my choice has been forced to the best I could find, as you can see up here.
Time to start.


What works
Everything


Index
Tools
Step 1 - Install Windows 10
Step 2 - Patch and update Bios
Step 3 - Bios configuration
Step 4 - Pre Installation
Step 5 - macOS installation
Step 6 - Post installation
Step 7 - Add UEFI Clover boot option in UEFI bios (hopefully not necessary)
Step 8 - Schedule a daily automatic Time Machine Backup

Tools:
- Latest Asus PRIME Z390-P (Version 2606 at the moment)
- CodeRush's UEFIPatch for Windows 10 (vit9696 UEFIPatch_0.28.0_win32.zip at the moment)
- Uefi Bios Updater (UBU) by SoniX, CodeRush and Plutomaniac from attached files here
- CodeRush's UEFITool for Windows 10 (vit9696 UEFITool_0.28.0_win32.zip at the moment)
- AFUDOS.EXE (with /GAN command still working) from attached files here
- Clover Bootloader Installer (Release v5.0 r5117 at the moment)
- Clover Configurator
- MaciASL Open Beta
- IORegistryExplorer 3.0.X (google for it) or IOJones
- macOS Mojave or Catalina install App
- A Windows 10 installer image (yep, that's for free)
- Rufus (to create a bootable USB Windows 10 installer)
- 8 GB (at least) USB pen drive
- A working Mac or Hackintosh
- A pc running Windows 10 or 7

Step 1 - Install Windows 10
That's correct: we need to install Windows 10 on our machine BEFORE anything else.
To do this we need to set a USB install pen drive up. Using another pc with windows 10 or whatever, do the following:
  • Insert USB pen drive.
  • Run Rufus and set it as in the picture down in the spoiler here (you need to SELECT the Windows iso image just downloaded from Microsoft web site), then click START. In a few minutes your USB pen drive will be ready to install Windows 10.
    Rufus Win.PNG
  • Reboot pc, press Del to gain bios setup, go to Exit section and Load Optimized Default, then go to Boot section/CSM(Compatibility Support Mode) and set Launch CSM as Disabled if it's not already. Press F10 and confirm, then reboot.
  • While rebooting, press F8, choose UEFI[Whatever brand is your usb drive] and proceed to install Windows 10. No need to buy a Microsoft license, the trial version will do the job.

Step 2 - Patch and update Bios
Now, let's take a moment to focus on what we are doing here.
This is not mandatory to have a working hackintosh, and more important:

THIS PROCEDURE COULD BRICK YOUR MOTHERBOARD! Do it at your own risk!
I can't take resposibility for what you do on your own hardware. If you're not good at it, then just jump to Step 3 of this guide.
Why would I do it, then?
Well, we are literally improving the bios of our machine, modding it to unlock it and to update cpu's microcodes. If you want to know better, take a look @kgp's job here over the B.1.1) CPU Microcode Update section.
Also, here you can find the original post with a lot of infos and procedures about UEFI bios modding and here about UEFI bios flashing.
@Azimuth1 reports that on ASRock Z390 Phantom Gaming-ITX/ac this procedure DOESN'T WORK, as a confirmation of what SoniX wrote in this post: "I have a suspicion that the guys from ASRock have made changes to the built-in Intstant Flash. And now it is necessary to check the availability of the Capsule, which was not before."
Nevertheless, for this motherboard (and ASUS Prime Z390-A as well) you can follow these steps and use the attached tools. My advice would be to go for the original post and understand the sense of it.
Here we are, then: let's start from our Windows 10 desktop.
  • Put the UEFIPatch folder (see Tools section) in Local disk [C:]
  • Put the latest bios release file of your motherboard into C:\UEFIPatch folder (to me it's PRIME-Z390-P-ASUS-2606.CAP)
  • Type "cmd" (no quotes) in the search bar then run Command Prompt as administrator
    1.png
  • Type "cd C:\UEFIPatch" (no quotes) to change directory​
  • Type "UEFIPatch PRIME-Z390-P-ASUS-2606.CAP" (no quotes) [or whatever the name of your original bios is] and press Enter. Note that there is a space between "UEFIPatch" and the name of your bios file. UEFIPatch will generate a new file called PRIME-Z390-P-ASUS-2606.CAP.patched in its folder
    2.PNG
  • Put UBU folder (see Tools section) in C:​
  • From UBU folder, run UBU.bat as admin (right click > Run as Administrator) and select the patched bios file PRIME-Z390-P-ASUS-2606.CAP.patched as soon as requested (from C:\UEFIPatch folder).
    5.PNG
  • After that, UBU will copy the bios file into the UBU folder, renaming it to "bios.bin", opening it and analyzing the EFI/Option ROM modules, which are currently within it. Press then any key to continue, the UBU menu will show up.
    6.PNG
  • Choice: type "5" and press Enter to gain CPU MicroCodes section. As you can see, all the CPUID are marked as "NO": that means those microcodes can be replaced and updated.
    7.PNG
  • Choice: type "c" to check for MCE (MicroCodes Extractor) and DB (Database) updates. If so, to download the update, press Enter to exit and then go to the next step.
    full
  • Choice: type "d" to download the latest version of MCE and DB: UBU will open a web page of MCExtractor releases. Download the .rar one, extract and drag and drop the content into UBU folder (replace files if asked).
  • Choice: type "c" once again to check for MCE (MicroCodes Extractor) and DB (Database) updates. Now they will be up to date. Press Enter to exit.
    full
  • Choice: type "x" and press Enter to extract all CPU MicroCodes.
  • Choice: type "s" and press Enter to search all available MicroCodes in DB.
    8a.PNG
  • Enter CPUID, example 000306C3 :> [check in the table above and put the first CPUID after three zeros like in the example] 000906EA then press Enter and Enter again.
    8b.PNG
  • Do the previous two steps for all CPUID in the table marked as NO.​
  • Type "f" and press Enter to find and replace from MCUpdate.txt.
    After having entered "f", you will get a new table showing a preview of the new CPU MicroCode details (not yet updated) marked as Yes
    9.PNG
  • Type "r" or "a" ("a" was good to me) and press Enter to start the MicroCodes replacement.
    10.PNG
  • Press any key to end the process, then "0" to Exit.
    11.PNG
  • Type again "0" to exit, then type "1" and press Enter to rename the new bios file from bios.bin to PZ390P.CAP (in my case, of course).
    12.PNG
  • Press any key to close the prompt command window and go to C\UBU. You'll find your bios file PZ390P.CAP not-yet ready to be flashed with AFUDOS.EXE. We're going to need UEFITool and AFUDOS.EXE.
    13.PNG
  • Run UEFITool, click on File>Open Image File and then choose your modded bios file (to me PZ390P.CAP) from C:\UBU folder
    14.png
  • Extract as is like shown in the picture down here and name it "bios" (no quotes). The new file called bios.rom will be placed in UBU folder. Ready for bios flashing.
    15.png
  • Now it's time to create a DOS bootable pen drive. The one used to install Windows is going to be fine. Insert the usb pen drive, run Rufus and create the bootable USB like shown in the picture here (no need to SELECT anything, this time)
    16.PNG
  • Download GAN.bat file from here and unzip it.
    PAY ATTENTION! Please note that this file will work JUST WITH bios.rom FILE! If you gave a different name to your modded bios, you'll need to edit the GAN.bat file as follows:
    @echo off AFUDOS.EXE YourBiosName /GAN pause
    replace "YourBiosName" whit the name of your modded bios file and note the spaces after "AFUDOS.EXE" and after "Name" as well.
  • Copy bios.rom, GAN.bat and AFUDOS.EXE into the root of the USB drive, which should be like this:
    17.PNG
  • With the USB drive plugged in, reboot pc, press Del key to enter bios setup and go to Boot\CSM (Compatibility Support Mode)\Launch CSM and set it to Enable as in the following picture.
    full
  • press F10 to save changes and boot from USB
    200515173231 copia.png
  • You'll be prompted to DOS command. Choose your keyboard, if request.
    IMG_0683.png
  • Type "GAN" (no quotes) and make sure you have power stability over your power source, because when you press Enter, AFUDOS will erase your bios and rewrite with the modded file we created before. It's going to take a couple of minutes but this MUST not be interrupted, otherwise you'll brick the bios chip, and you cannot use the motherboard anymore, unless you can use a flash programmer!
    IMG_0684.png
    IMG_0685.png
    IMG_0686.png
    IMG_0687.png
    IMG_0688.png
  • At the end of the process, press any key to exit AFUDOS and then turn the PC off. Power on and press F1 when asked. It's time to set our hackintosh brand new bios!
    IMG_0689.png

Step 3 - Bios configuration
To configure the UEFI bios, press Del key on boot and then F7 to load Advanced Mode. Go to Exit section and Load Optimized Default.
There's a lot of stuff to be changed to, so, here you can download the bios profile folder (version 2606 at this time) with:
  • Hackintosh 2606.CMO that you can load from bios itself (if you put it into a FAT32 USB key).
  • All the screenshot you need to have to change values.
  • Hackintosh Profile_setting.txt, whit every sigle voice of the UEFI bios (anyway, down here there's the spoiler with it)
    [2020/05/12 05:08:08] Ai Overclock Tuner [XMP I] XMP [XMP DDR4-3200 16-18-18-36-1.35V] BCLK Frequency [100.0000] BCLK Spread Spectrum [Auto] ASUS MultiCore Enhancement [Auto – Lets BIOS Optimize] SVID Behavior [Auto] AVX Instruction Core Ratio Negative Offset [Auto] CPU Core Ratio [Auto] BCLK Frequency : DRAM Frequency Ratio [Auto] DRAM Odd Ratio Mode [Enabled] DRAM Frequency [DDR4-3200MHz] OC Tuner [Keep Current Settings] Power-saving & Performance Mode [Performance mode] DRAM CAS# Latency [16] DRAM RAS# to CAS# Delay [18] DRAM RAS# ACT Time [36] DRAM Command Rate [Auto] DRAM RAS# to RAS# Delay L [Auto] DRAM RAS# to RAS# Delay S [Auto] DRAM REF Cycle Time [Auto] DRAM REF Cycle Time 2 [Auto] DRAM REF Cycle Time 4 [Auto] DRAM Refresh Interval [Auto] DRAM WRITE Recovery Time [Auto] DRAM READ to PRE Time [Auto] DRAM FOUR ACT WIN Time [Auto] DRAM WRITE to READ Delay [Auto] DRAM WRITE to READ Delay L [Auto] DRAM WRITE to READ Delay S [Auto] DRAM CKE Minimum Pulse Width [Auto] DRAM Write Latency [Auto] ODT RTT WR (CHA) [Auto] ODT RTT PARK (CHA) [Auto] ODT RTT NOM (CHA) [Auto] ODT RTT WR (CHB) [Auto] ODT RTT PARK (CHB) [Auto] ODT RTT NOM (CHB) [Auto] ODT_READ_DURATION [Auto] ODT_READ_DELAY [Auto] ODT_WRITE_DURATION [Auto] ODT_WRITE_DELAY [Auto] Data Rising Slope [Auto] Data Rising Slope Offset [Auto] Cmd Rising Slope [Auto] Cmd Rising Slope Offset [Auto] Ctl Rising Slope [Auto] Ctl Rising Slope Offset [Auto] Clk Rising Slope [Auto] Clk Rising Slope Offset [Auto] Data Falling Slope [Auto] Data Falling Slope Offset [Auto] Cmd Falling Slope [Auto] Cmd Falling Slope Offset [Auto] Ctl Falling Slope [Auto] Ctl Falling Slope Offset [Auto] Clk Falling Slope [Auto] Clk Falling Slope Offset [Auto] DRAM RTL INIT value [Auto] DRAM RTL (CHA DIMM0 Rank0) [Auto] DRAM RTL (CHA DIMM0 Rank1) [Auto] DRAM RTL (CHA DIMM1 Rank0) [Auto] DRAM RTL (CHA DIMM1 Rank1) [Auto] DRAM RTL (CHB DIMM0 Rank0) [Auto] DRAM RTL (CHB DIMM0 Rank1) [Auto] DRAM RTL (CHB DIMM1 Rank0) [Auto] DRAM RTL (CHB DIMM1 Rank1) [Auto] DRAM IOL (CHA DIMM0 Rank0) [Auto] DRAM IOL (CHA DIMM0 Rank1) [Auto] DRAM IOL (CHA DIMM1 Rank0) [Auto] DRAM IOL (CHA DIMM1 Rank1) [Auto] DRAM IOL (CHB DIMM0 Rank0) [Auto] DRAM IOL (CHB DIMM0 Rank1) [Auto] DRAM IOL (CHB DIMM1 Rank0) [Auto] DRAM IOL (CHB DIMM1 Rank1) [Auto] CHA IO_Latency_offset [Auto] CHB IO_Latency_offset [Auto] CHA RFR delay [Auto] CHB RFR delay [Auto] Early Command Training [Enabled] SenseAmp Offset Training [Enabled] Early ReadMPR Timing Centering 2D [Enabled] Read MPR Training [Enabled] Receive Enable Training [Enabled] Jedec Write Leveling [Enabled] Early Write Time Centering 2D [Enabled] Early Read Time Centering 2D [Auto] Write Timing Centering 1D [Enabled] Write Voltage Centering 1D [Enabled] Read Timing Centering 1D [Enabled] Dimm ODT Training* [Auto] Max RTT_WR [ODT Off] DIMM RON Training* [Auto] Write Drive Strength/Equalization 2D* [Disabled] Write Slew Rate Training* [Enabled] Read ODT Training* [Enabled] Read Equalization Training* [Enabled] Read Amplifier Training* [Enabled] Write Timing Centering 2D [Enabled] Read Timing Centering 2D [Enabled] Command Voltage Centering [Enabled] Write Voltage Centering 2D [Enabled] Read Voltage Centering 2D [Auto] Late Command Training [Auto] Round Trip Latency [Auto] Turn Around Timing Training [Disabled] Rank Margin Tool [Disabled] Memory Test [Disabled] DIMM SPD Alias Test [Enabled] Receive Enable Centering 1D [Enabled] Retrain Margin Check [Disabled] Write Drive Strength Up/Dn independently [Disabled] tRDRD_sg [Auto] tRDRD_dg [Auto] tRDWR_sg [Auto] tRDWR_dg [Auto] tWRWR_sg [Auto] tWRWR_dg [Auto] tWRRD_sg [Auto] tWRRD_dg [Auto] tRDRD_dr [Auto] tRDRD_dd [Auto] tRDWR_dr [Auto] tRDWR_dd [Auto] tWRWR_dr [Auto] tWRWR_dd [Auto] tWRRD_dr [Auto] tWRRD_dd [Auto] TWRPRE [Auto] TRDPRE [Auto] tREFIX9 [Auto] OREF_RI [Auto] MRC Fast Boot [Auto] DRAM CLK Period [Auto] Memory Scrambler [Enabled] Channel A DIMM Control [Enable both DIMMs] Channel B DIMM Control [Enable both DIMMs] MCH Full Check [Auto] Training Profile [Auto] DLLBwEn [Auto] SPD Write Disable [TRUE] CPU Load-line Calibration [Auto] Synch ACDC Loadline with VRM Loadline [Disabled] CPU Current Capability [Auto] CPU VRM Switching Frequency [Auto] CPU Power Duty Control [T.Probe] CPU Power Phase Control [Auto] CPU VRM Thermal Control [Auto] CPU Graphics Load-line Calibration [Auto] CPU Graphics Current Capability [Auto] CPU Graphics VRM Switching Frequency [Auto] Intel(R) SpeedStep(tm) [Enabled] Turbo Mode [Enabled] Long Duration Package Power Limit [4095] Package Power Time Window [127] Short Duration Package Power Limit [4095] IA AC Load Line [Auto] IA DC Load Line [Auto] TVB Voltage Optimizations [Auto] Realtime Memory Timing [Disabled] FCLK Frequency for Early Power On [Auto] VPPDDR Voltage [Auto] Internal PLL Voltage [Auto] GT PLL Voltage [Auto] Ring PLL Voltage [Auto] System Agent PLL Voltage [Auto] Memory Controller PLL Voltage [Auto] CPU Core/Cache Current Limit Max. [255.50] CPU Graphics Current Limit [255.50] Ring Down Bin [Auto] Min. CPU Cache Ratio [Auto] Max CPU Cache Ratio [Auto] Max. CPU Graphics Ratio [Auto] BCLK Aware Adaptive Voltage [Enabled] CPU Core/Cache Voltage [Auto] DRAM Voltage [1.35000] CPU VCCIO Voltage [Auto] CPU System Agent Voltage [Auto] CPU Graphics Voltage Mode [Auto] PCH Core Voltage [Auto] CPU Standby Voltage [Auto] DRAM CTRL REF Voltage [Auto] DRAM DATA REF Voltage on CHB [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank0 BL0 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank0 BL1 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank0 BL2 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank0 BL3 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank0 BL4 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank0 BL5 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank0 BL6 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank0 BL7 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank1 BL0 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank1 BL1 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank1 BL2 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank1 BL3 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank1 BL4 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank1 BL5 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank1 BL6 [Auto] DRAM DATA REF Voltage on CHA DIMM0 Rank1 BL7 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank0 BL0 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank0 BL1 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank0 BL2 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank0 BL3 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank0 BL4 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank0 BL5 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank0 BL6 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank0 BL7 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank1 BL0 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank1 BL1 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank1 BL2 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank1 BL3 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank1 BL4 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank1 BL5 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank1 BL6 [Auto] DRAM DATA REF Voltage on CHA DIMM1 Rank1 BL7 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank0 BL0 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank0 BL1 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank0 BL2 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank0 BL3 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank0 BL4 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank0 BL5 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank0 BL6 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank0 BL7 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank1 BL0 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank1 BL1 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank1 BL2 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank1 BL3 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank1 BL4 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank1 BL5 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank1 BL6 [Auto] DRAM DATA REF Voltage on CHB DIMM0 Rank1 BL7 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank0 BL0 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank0 BL1 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank0 BL2 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank0 BL3 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank0 BL4 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank0 BL5 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank0 BL6 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank0 BL7 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank1 BL0 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank1 BL1 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank1 BL2 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank1 BL3 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank1 BL4 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank1 BL5 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank1 BL6 [Auto] DRAM DATA REF Voltage on CHB DIMM1 Rank1 BL7 [Auto] PCI Express Native Power Management [Disabled] PCH DMI ASPM [Disabled] ASPM [Disabled] L1 Substates [Disabled] PCI Express Clock Gating [Enabled] DMI Link ASPM Control [Disabled] PEG - ASPM [Disabled] Software Guard Extensions (SGX) [Software Controlled] Tcc Offset Time Window [Auto] Hardware Prefetcher [Enabled] Adjacent Cache Line Prefetch [Enabled] Intel (VMX) Virtualization Technology [Enabled] Maximum CPU Core Temperature [Auto] Active Processor Cores [All] Thermal Monitor [Enabled] Intel(R) SpeedStep(tm) [Enabled] Intel(R) Speed Shift Technology [Enabled] Turbo Mode [Enabled] CPU C-states [Enabled] Enhanced C-states [Enabled] CPU C3 Report [Enabled] CPU C6 Report [Enabled] CPU C7 Report [CPU C7s] CPU C8 Report [Enabled] CPU C9 Report [Enabled] CPU C10 Report [Enabled] Package C State Limit [C0/C1] CFG Lock [Disabled] VT-d [Enabled] Above 4G Decoding [Enabled] Memory Remap [Enabled] Primary Display [CPU Graphics] iGPU Multi-Monitor [Enabled] DVMT Pre-Allocated [128M] RC6(Render Standby) [Disabled] PCIEX16_1 Link Speed [Auto] PCIe Speed [Auto] IOAPIC 24-119 Entries [Enabled] SATA Controller(s) [Enabled] SATA Mode Selection [AHCI] Aggressive LPM Support [Disabled] SMART Self Test [Enabled] SATA6G_1(Gray) [Enabled] SATA6G_1 Hot Plug [Disabled] SATA6G_2(Gray) [Enabled] SATA6G_2 Hot Plug [Disabled] SATA6G_3(Gray) [Enabled] SATA6G_3 Hot Plug [Disabled] SATA6G_4(Gray) [Enabled] SATA6G_4 Hot Plug [Disabled] Intel Platform Trust Technology [Disabled] Hyper M.2X16 [Disabled] HD Audio [Enabled] LED Lighting [Breathing Mode] RGB-Strip Lighting Control [On] Realtek LAN Controller [Enabled] Realtek PXE OPROM [Disabled] USB power delivery in Soft Off state (S5) [Enabled] Connectivity mode (Wi-Fi & Bluetooth) [Enable] Serial Port [Disabled] ErP Ready [Disabled] CEC Ready [Disabled] Restore AC Power Loss [Power Off] Power On By PCI-E [Disabled] Power On By RTC [Disabled] SR-IOV Support [Disabled] Legacy USB Support [Enabled] XHCI Hand-off [Enabled] SanDisk [Auto] U31G2_1 [Enabled] U31G2_2 [Enabled] U31G1_3 [Enabled] U31G1_4 [Enabled] U31G1_5 [Enabled] U31G1_6 [Enabled] U31G1_7 [Enabled] U31G1_8 [Enabled] U31G1_9 [Enabled] U31G1_10 [Enabled] USB_11 [Enabled] USB_12 [Enabled] USB_13 [Enabled] Network Stack [Disabled] Device [Samsung SSD 860 QVO 1TB] CPU Temperature [Monitor] MotherBoard Temperature [Monitor] PCH Temperature [Monitor] CPU Fan Speed [Monitor] Chassis Fan 1 Speed [Monitor] Chassis Fan 2 Speed [Monitor] AIO PUMP Speed [Monitor] CPU Core Voltage [Monitor] 3.3V Voltage [Monitor] 5V Voltage [Monitor] 12V Voltage [Monitor] CPU Q-Fan Control [Auto] CPU Fan Step Up [0 sec] CPU Fan Step Down [0 sec] CPU Fan Speed Lower Limit [Ignore] CPU Fan Profile [Silent] Chassis Fan 1 Q-Fan Control [Auto] Chassis Fan 1 Q-Fan Source [CPU] Chassis Fan 1 Step Up [0 sec] Chassis Fan 1 Step Down [0 sec] Chassis Fan 1 Speed Low Limit [Ignore] Chassis Fan 1 Profile [Silent] Chassis Fan 2 Q-Fan Control [Auto] Chassis Fan 2 Q-Fan Source [CPU] Chassis Fan 2 Step Up [0 sec] Chassis Fan 2 Step Down [0 sec] Chassis Fan 2 Speed Low Limit [Ignore] Chassis Fan 2 Profile [Silent] AIO PUMP Control [Disabled] Fast Boot [Disabled] Boot Logo Display [Auto] POST Delay Time [1 sec] Bootup NumLock State [On] Wait For 'F1' If Error [Enabled] Option ROM Messages [Force BIOS] Interrupt 19 Capture [Disabled] AMI Native NVMe Driver Support [Enabled] Setup Mode [Advanced Mode] Launch CSM [Disabled] OS Type [Other OS] Load from Profile [1] Profile Name [Hackintosh] Save to Profile [1] DIMM Slot Number [DIMM_A2] ASUS Q-Installer [Disabled]
  • Once you're done with all the settings, press F10, and turn the pc off.

Step 4 - Pre Installation
What is necessary now is a working Mac or Hackintosh. If it's running macOS Catalina that has System Integrity Protection (SIP) enabled, you must disable it using Tony's guide (STEP 2: Create a Bootable USB Drive with UniBeast).
We need to take care about a few things before the install process, to set up the USB install pendrive, such as:
Preparing bootable USB pen drive with UEFI Clover
  1. Make sure your Install macOS Mojave.app or Install macOS Catalina.app would be in Applications folder
  2. Plug your 8 GB USB in
  3. Open /Applications/Utilities/Disk Utility
  4. Highlight the USB drive in left column
  5. Click on the Erase upper button
  6. Scheme: GUID Partition Table
  7. Name: usb
  8. Format: Mac OS Extended (Journaled)
    usb1.png
  9. Click Erase (lower right button)
  10. Open /Applications/Utilities/Terminal
  11. Type the following, enter password (even if you don't see anything typed) and hit enter. This command completely erases the USB, then creates native macOS installer media from the Install macOS Mojave (or Catalina) Application.
    sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --nointeraction
    sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/usb
  12. Upon completion, the USB will be renamed Install macOS Mojave (or Catalina)
    usb2.png
  13. Download the latest Clover installer from here
  14. Open Clover package installer
  15. Hit Continue, Continue, Change Install Location...
  16. Choose the USB, now called Install macOS Mojave (or Catalina)
  17. Hit Customize and install Clover to the same USB with the following Custom Install settings:
    clover1.png
    clover2.png
    clover3.png
    clover4.png
  18. The USB EFI partition will be mounted
  19. In the next steps we'll set up the EFI partition

Clover's config.plist file set up
Here's the explanation of every choice in config.plist.​
  1. With the help of Clover configurator we can easily set up the config.plist file. Here's the explanation of every choice in config.plist.
    • Acpi/DSDT Patches
      - Rename GFX0 to IGPU (Graphics): Integrated graphics must be renamed from GFX0 to IGPU
      - change SAT0 to SATA: not mandatory, just to keep it like on real Macs
      - Fix Asus Z390 BIOS RTC bug fix: without it, no joy on boot
      - change HDAS to HDEF: audio controller must be renamed from HDAS to HDEF
      - change HECI to IMEI: because macOS Intel framebuffer looks for Device (IMEI), not Device (HECI) --> Thanks, Pike
    • Acpi/SSDT
      - PluginType checked: for power management
    • Boot section/Argument
      - -v: verbose boot, just for install process, we'll get rid of it before we're done
    • Boot section
      - NeverHibernate checked: otherwise, no wake after sleep
    • Devices/Properties
      inject AAPL,ig-platform-id (for Macmini8,1 07009B3E) and layout-id 01 for Audio
      Code:
      <key>Devices</key>
          <dict>
              <key>Properties</key>
              <dict>
                  <key>PciRoot(0x0)/Pci(0x1f,0x3)</key>
                  <dict>
                      <key>AAPL,slot-name</key>
                      <string>Internal</string>
                      <key>device_type</key>
                      <string>Audio device</string>
                      <key>layout-id</key>
                      <data>AQAAAA==</data>
                      <key>model</key>
                      <string>200 Series PCH HD Audio</string>
                  </dict>
                  <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
                  <dict>
                      <key>AAPL,ig-platform-id</key>
                      <data>BwCbPg==</data>
                      <key>device-id</key>
                      <data>mz4AAA==</data>
                      <key>framebuffer-con0-busid</key>
                      <data>AgAAAA==</data>
                      <key>framebuffer-con0-enable</key>
                      <data>AQAAAA==</data>
                      <key>framebuffer-con0-flags</key>
                      <data>xwMAAA==</data>
                      <key>framebuffer-con0-index</key>
                      <data>AgAAAA==</data>
                      <key>framebuffer-con0-pipe</key>
                      <data>CgAAAA==</data>
                      <key>framebuffer-con0-type</key>
                      <data>AAgAAA==</data>
                      <key>framebuffer-con1-busid</key>
                      <data>BAAAAA==</data>
                      <key>framebuffer-con1-enable</key>
                      <data>AQAAAA==</data>
                      <key>framebuffer-con1-flags</key>
                      <data>xwMAAA==</data>
                      <key>framebuffer-con1-index</key>
                      <data>AwAAAA==</data>
                      <key>framebuffer-con1-pipe</key>
                      <data>CAAAAA==</data>
                      <key>framebuffer-con1-type</key>
                      <data>AAgAAA==</data>
                      <key>framebuffer-con2-busid</key>
                      <data>AQAAAA==</data>
                      <key>framebuffer-con2-enable</key>
                      <data>AQAAAA==</data>
                      <key>framebuffer-con2-flags</key>
                      <data>xwMAAA==</data>
                      <key>framebuffer-con2-index</key>
                      <data>AQAAAA==</data>
                      <key>framebuffer-con2-pipe</key>
                      <data>CQAAAA==</data>
                      <key>framebuffer-con2-type</key>
                      <data>AAQAAA==</data>
                      <key>framebuffer-patch-enable</key>
                      <data>AQAAAA==</data>
                  </dict>
              </dict>
              <key>USB</key>
              <dict>
                  <key>Inject</key>
                  <false/>
              </dict>
          </dict>
    • Gui/Scan
      - Choose Custom with: Entries (for a working Recovery partition - thanks to @Azimuth1) and Tool (for Clover Option on boot) checked
    • Kernel and Kext Patches\KextsToPatch (for Mojave)
      - com.apple.driver.AppleRTC: to avoid F1 Bios Error on boot
      - com.apple.iokit.IOAHCIBlockStorage: to enable Trim on non-Apple sata SSDs
      - com.apple.iokit.IOUSBHostFamily: USB Port limit patch #1 10.14.x (only for install process)
      - com.apple.iokit.IOUSBHostFamily: USB Port limit patch #2 10.14.x (only for install process)
      - com.apple.driver.usb.AppleUSBXHCI: USB Port limit patch #3 10.14.x (only for install process)
      - com.apple.driver.usb.AppleUSBXHCI: USB Port limit patch #4 10.14.x (only for install process)
    • Kernel and Kext Patches\KextsToPatch (for Catalina)
      - AppleRTC checked: to avoid F1 Bios Error on boot
      - com.apple.iokit.IOAHCIBlockStorage: to enable Trim on non-Apple sata SSDs
      - com.apple.iokit.IOUSBHostFamily: USB Port limit patch #1 10.15.x (only for install process)
      - com.apple.driver.usb.AppleUSBXHCI: USB Port limit patch #2 10.15.x (only for install process)
    • Rt Variables
      - CsrActiveConfig: 0x67 SIP Disabled (keep it until you're done with post install process)
      - CsrActiveConfig: 0x00 SIP Enabled (change it after you're done with post install process)
    • SMBIOS/Product Model
      - Macmini8,1: I chose this sysdef because I don't have discrete graphics, nor I'm planning to have it in the near future, otherwise I would have gone for iMac19,1 (please note that, in that case, you'll need AAPL,ig-platform-id 0300983E)
    • System Parameters
      - Inject Kext: Yes
      - Inject System ID checked
  2. Download here a config.plist file ready to install Mojave on this hardware, or here a config.plist to install Catalina.
  3. Rename it as config.plist and put it in EFI/EFI/CLOVER folder of the usb pen drive replacing the original one. The difference between the two of them is just the AppleRTC patch: in the first one (Mojave) it's given by the Kernel an Kexts Patches Find & Replace method, in the second one (Catalina) it's given by the AppleRTC field checked (still in Kernel and Kexts Patches section).
  4. Download from here the nvram.plist file and put it into the EFI drive (outside of the EFI folder) like in the picture here. Without this file and the internal RTC patch in config.plist, I had a lot of troubles on boot, giving F1 error every single reboot!
    Schermata 2020-05-17 alle 23.02.38.png

Kexts folder set up
Open EFI\EFI\CLOVER\kext\Other and copy the attached kexts
  1. AppleALC.kext for Audio
  2. FakeSMC.kext mandatory for any hackintosh
  3. Lilu.kext mandatory to get AppleALC.kext and WhateverGreen.kext working
  4. RealtekRTL8111.kext for ethernet
  5. USBInjectAll.kext for usb
  6. WhateverGreen.kext for graphics

Step 5 - macOS installation
  • Plug the usb pen drive (rear panel preferred)
  • Power on and press F8 key to get the Boot menu
  • Boot from UEFI USB (Uefi name of your USB)
  • Follow the install process until desktop.
  • Download the Clover installer package or get it from the previous working Mac/Hackintosh
  • Open Clover package installer
  • Install Clover on the main OS partition (from now on "Mac partition") with the same settings as above
  • In \EFI Volume place nvram.plist
  • In \EFI\EFI\CLOVER, replace the original config.plist with the Mojave or the Catalina one like we did before (remember to change the name to config.plist)
  • In EFI\EFI\CLOVER\kext\Other copy the attached kexts
  • Reboot

Step 6 - Post installation
  • Make sure you have proper UEFI boot on boot menu. If you can't find it, you need to jump here, before you go ahead. If you're boot right into Clover then you're fine.
  • Open Clover Configurator and Mount EFI partition
  • We need to replace again the config.plist with a new one, this time will be the last one. No verbose boot, no USB limit patch. Due to the fact that macOS can support up to 15 usb connections, we need to disable something. Therefore I chose to disable these ones
    USB map ASUS PRIME Z390 P.png
    using
    Code:
    uia_exclude=HS05;HS06;HS07;HS08;HS11;SS07;SS08
    Check here and here if you want to know better about usb.
  • Download from here the Mojave config.plist or from here the Catalina config.plist, rename it as config.plist and drop it into \EFI\EFI\CLOVER
  • Download from here the SSDT-USB and drop it into \EFI\EFI\CLOVER\ACPI\patched

Step 7 - Add UEFI Clover boot option in UEFI bios (hopefully not necessary)
I noticed during my testing on bios mod/flash, macOS installation/update, that at some point I couldn't boot from UEFI Clover anymore. The fact was that my UEFI Bios could no longer see Clover, not even changing boot options, nor messing with CSM.
Clover was gone from my UEFI bios.
I don't know why (maybe nvram issue?), but the good news was that my USB macOS install pen drive was still working.
I found a solution in this post by chibabah. Basically we can manually add to our UEFI boot options our EFI (Clover) partition, giving it a custom name (for me "Clover"). Here are the steps.
  • Boot into your Mac partition using the USB macOS Install pen drive
  • Eject the USB Drive
  • Open Application\Utilities\Terminal
  • Enter
    Code:
    diskutil list
    and find the EFI partition (usually disk0s1)
  • Enter
    Code:
    diskutil info disk0s1
    and take note of Disk / Partition UUID value (like 623E244FC-AE0A-42B4-93B6B4BB837B3D6A in my case)
    full
  • Boot again, now, from USB macOS Install pen drive, and start up the Clover EFI shell
  • Type
    Code:
    map
    and press Enter. You'll see a lot of partition, among them find the right one from above. For me it was FS2
    full
  • Type
    Code:
    bcfg boot dump
    to see all the UEFI boot of your bios. As you can see in the picture down here, in my case there was three boot option:
    • Option 00 (UEFI Sandisk) which was my USB pen drive
    • Option 01 (UEFI OS) useless (not working on boot macOS)
    • Option 02 (UEFI OS) useless (not working on boot macOS)
  • full
  • Since Option 02 and 01 were useless to me, I decided to remove them by typing
    Code:
    bcfg boot rm 02
    first, then pressed enter and then typed
    Code:
    bcfg boot rm 01
    and enter again.
    full
  • Now, type again
    Code:
    bcfg boot dump
    to check what boot option's left. As you can see down here, now I had just Option 00.
    full
  • Now is time to add our Clover UEFI boot option. Giving the fact that now I have only Option 00, I can go for option 01. IF YOU HAVE OTHER EXSINTING BOOT OPTION, LIKE I DON'T KNOW, OPTION 04, THEN GO FOR OPTION 05 FOR CLOVER!
  • Type
    Code:
    bcfg boot add 01 FS2:\EFI\CLOVER\CLOVERX64.EFI Clover
    full
  • One last time type
    Code:
    bcfg boot dump
    to check what boot options there are. You'll find the new Option named Clover. Now you can reboot from your main macOS drive
    full

Step 8 - Schedule a daily automatic Time Machine Backup
As I wrote before, I've been asked to schedule a backup, so I said "Of course, what do you need, precisely?"
And here's the deal:
Invisible, quiet and safe.
Let's see what we have, here. An internal dedicated 2TB data HDD, I have crone (we all have, and I love it!) to schedule commands, I also have Automator (to create apps).
Considering this machine is pretty quiet, even a single HDD could be pretty annoying in terms of noise. So the idea would be to use the disk just for the time of our backup, no more.
My thinking:
- Automatic HDD eject (it turns off) right at start up or login process
This is easy, we'll create an app through Automator and then we'll add the new app to the current User's login items
- Once a day, the HDD wakes up just a moment before the Time Machine backup
Time to learn about Cron. Then a TMscript.sh will do almost all the job
- Time Machine Running
via TMscript.sh
- Backup check
TMscript.sh will create a Time Machine log.txt reporting "Backup completed successfully" or not, hence a warning/confirm message will be triggered
- Backup completed confirm/error message
This is the only action required to the User: click OK to confirm the message (so the user will be "forced" to take note about the daily backup. Safe, right?)
- Automatic HDD eject
Via Cron​

That said, let's proceed through a three main steps procedure:

8a. Eject the HDD drive at login
8b. Create a Time Machine Backup shell script
8c. Schedule HDD mount with crontab

8a. Eject the HDD drive at login
  • Create an app with Automator to eject the HDD. Why eject rather than unmount? Well, unmount leaves the drive awake (even if the partition isn't active), and eject make the physical drive asleep.
  • Open /Applications/Automator.app
  • Select Application, click on Choose
    full
  • In the left column, choose Library\Utilities, then drag and drop Run Shell Script into the right side
    full
  • type
    Code:
    sleep 20
    diskutil eject HDD
    as in the next picture, where "HDD" will be the name of your Partition, "sleep 20" means that the script waits 20 seconds to execute the next command (this way, after the boot process, the HDD has time to mount properly, avoiding a bad execution of the app) and "diskutil eject HDD" is the main command, of course.
    full
  • Click on the upper right arrow to Run the command. Once it's done, in the log section (downside) will show the Workflow completed.
    full
  • Click on File>Save, give a name to your app (for me will be EjectHDD) and make sure the file format is Application, before you click Save. The default location is \Application folder. Now we need to add the new app to the current User's login items (in this way, at every login, the HDD will be automatically ejected in 20 second).
    full
  • Open System Preferences\Users & Groups, click the lock in the down left corner to allow changes, enter user's password, click on Login Items tab, click on "+" to add an element, choose /Applications/EjectHDD.app and click Add. Close System Preferences window.
    full
  • Mount again HDD in case it's not.
  • Log out from your account and log in: the HDD drive will be unmounted in 20 seconds!

8b. Create a Time Machine Backup shell script
  • I gathered information all around the web, because definitely I'm not a unix expert. Somehow I managed to get what I exactly want: a command that trigger a Time Machine Backup, a check at the end of the backup with a window to confirm a successful backup or a warning in case of backup failure and eventually an automatic closing of any backup windows and process (HDD eject included).
  • Create a folder in /Users/Shared called TMscript
  • Open a new text file and in Format, select Make Plain Text
  • Copy and paste this next code:
    Code:
    #!/bin/bash
    sleep 20
    tmutil startbackup -b
    printf '\e[3J' && log show --predicate 'subsystem == "com.apple.TimeMachine"' --info --last 1h | grep -F 'eMac' | grep -Fv 'etat' | awk -F']' '{print substr($0,1,19), $NF}' > /Users/Shared/TMscript/log.txt
    grep -r "Backup completed successfully" /Users/Shared/TMscript/log.txt
    if grep -q "Backup completed successfully" "/Users/Shared/TMscript/log.txt";
    then
    osascript -e 'tell app "System Events" to display dialog "Time Machine Backup completed successfully!"'
    killall Terminal
    else
    osascript -e 'tell app "System Events" to display dialog "Time Machine Backup Error!"'
    killall Terminal
    fi
  • Save in /Users/Shared/TMscript as TMscript.sh (take note of the complete path /Users/Shared/TMscript/TMscript.sh)
  • Change permission typing in Terminal
    Code:
    sudo chmod a+x /Users/Shared/TMscript/TMscript.sh
    Press Enter, you'll have to type the User's password, now, even if you don't see anything, then again Enter.
  • Here's the explanation about the script's content:
    • sleep 20
      waits 20 seconds before the next command (giving the time to the HDD to mount properly, we'll see how at Point 8c of this guide)
    • tmutil startbackup -b
      Start the Time Machine backup. Adding "-b" blocks further commands until the backup has finished
    • printf '\e[3J' && log show --predicate 'subsystem == "com.apple.TimeMachine"' --info --last 1h | grep -F 'eMac' | grep -Fv 'etat' | awk -F']' '{print substr($0,1,19), $NF}' > /Users/Shared/TMscript/log.txt
      This command will generate a log.txt file in /Users/Shared/TMscript folder reporting everything about the Time Machine backups in the last hour (considering that I need a daily backup, it will report only the one just done).
      The command will overwrite the last content, and we'll have ONLY the last report on it. Also, the log file will not grow in time.
    • grep -r "Backup completed successfully" /Users/Shared/TMscript/log.txt
      This one will look for “Backup completed successfully” in /Users/Shared/TMscript/log.txt (the proof the backup has been done properly).
    • if grep -q "Backup completed successfully" "/Users/Shared/TMscript/log.txt";
      then
      osascript -e 'tell app "System Events" to display dialog "Time Machine Backup completed successfully!"'
      killall Terminal
      else
      osascript -e 'tell app "System Events" to display dialog "Time Machine Backup Error!"'
      killall Terminal
      fi

      About this one: if “Backup completed successfully” will be found in /Users/Shared/TMscript/log.txt, then a window with "Time Machine Backup completed successfully!" will appear, then you must click OK and then Terminal will close all its windows.
      If “Backup completed successfully” will NOT be found in /Users/Shared/TMscript/log.txt, instead, then a window with "Time Machine Backup error!” will appear, and again you must click OK and then Terminal will close all its windows.

    What we do need, now, is something that could automatically trigger an HDD wakeup, from the initial sleep status we put through EjectHDD.app at login (or start up). Cron will do the job

8c. Schedule HDD mount with crontab
Cron is a wonderful tool that can be used to schedule a command whenever we want it to be triggered (the one and only mandatory condition is that the computer must be on, not in sleep status, nor in hibernate one).
Here's a brief explanation about its command string structure:

┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of the month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday; 7 is also Sunday on some systems)
│ │ │ │ │
│ │ │ │ │
│ │ │ │ │
* * * * * <command to execute>

We're also going to use Open Scripting Architecture (osascript). I must admit, don't know much about it, but here's an interesting page to start with.
Ok, let's finish up.
  • It's necessary to give full access to the disk to cron, terminal and diskutil. Here are their paths:
    Code:
    /usr/sbin/cron
    /Applications/Utilities/Terminal.app
    /usr/sbin/diskutil
  • Open System Preferences\Security & Privacy and go to the Privacy tab, click the lock in the down left corner to allow changes, enter user's password, select "Full Disk Access" in the left window, then click on the (+) icon to add an item to the list. Press command+shift+G to open the Go to Folder… dialog, type /usr/sbin/cron and press Enter, select the cron file and click Open. Cron will be added now to the list. Do the same for Terminal and diskutil, then close System Preferences.
    full
    full
  • Open Terminal and type
    Code:
    env EDITOR=nano crontab -e
    You are now in the env editor to give cron the right instruction
  • Type (or copy-paste)
    Code:
    7 19 * * * osascript -e 'tell application "Terminal" to do script "diskutil mount HDD"' > /dev/null 2>&1; /Users/Shared/TMscript/TMscript.sh > /dev/null 2>&1; osascript -e 'tell application "Terminal" to do script "diskutil eject HDD; killall Terminal"' > /dev/null 2>&1
    where:
    • 7
      this number represents the minutes within the hour (1-59)
    • 19
      this is the hour, meaning that the command will be triggered every day at 7:07 p.m.
    • * * *
      These are unnecessary parameters (day of the month, month and day of the week)
    • osascript -e 'tell application "Terminal" to do script "diskutil mount HDD"'
      first instruction: Terminal app will mount the Time Machine Hard Disk Drive
    • > /dev/null 2>&1
      this is necessary to avoid cron sending a message report to /private/var/mail, otherwise, every time it does that you'll get any Terminal window starting with an annoying "You have mail" line
    • /Users/Shared/TMscript/TMscript.sh
      that's the main thing, the script we create before will run
    • > /dev/null 2>&1
      again (no mail needed from cron)
    • osascript -e 'tell application "Terminal" to do script "diskutil eject HDD; killall Terminal"'
      this will eject the HDD and close every Terminal window
    • > /dev/null 2>&1
      last time (no mail needed from cron)
  • Press Ctrl+o (not the command key!!! That's "ctrl" key with the letter "o") and then Enter to save the string command
  • Press Ctrl+x to exit env EDITOR.
    full
That's it.
One last thing, for multi Users:
Remember! The script and the unmount application can be shared by all users, but each user MUST set his own crontab string, and add to his login elements the EjectHDD app


CREDITS
  • Tonymac - For the place
  • CodeRush - For UEFIPatch and UEFITool
  • headkaze - For Hackintool
  • kgp - For tons of infos
  • GlitchyHack - For [Guide] How to Flash a Modded BIOS on a ASUS Z97 Motherboard
  • Fernando - For [Tool Guide+News] "UEFI BIOS Updater" (UBU)
  • Sonix & plutomaniac - For UEFI BIOS Updater and the CPU Microcode Extractor Tool (MCE)
  • vit9696 - For Lilu, AppleALC, WhateverGreen
  • Slice & co. - For the amazing Clover, what else?
  • RehabMan and UtterDisbelief - For everything about USB
  • Mieze - For LAN kext and a lot of support
  • Azimuth1 - Useless as usual :)
END
See next post for screenshots and updates​
 

Attachments

  • UBU.zip
    44.2 MB · Views: 289
  • AFUDOS.EXE.zip
    170 KB · Views: 88
  • GAN.bat.zip
    236 bytes · Views: 129
  • Bios 2606.zip
    8.9 MB · Views: 54
  • Bios profile 2606.zip
    8.9 MB · Views: 88
  • config 10.14.6 USB.plist
    9 KB · Views: 104
  • config 10.15.4 USB.plist
    7.7 KB · Views: 139
  • nvram.plist
    1.9 KB · Views: 124
  • kexts.zip
    1.5 MB · Views: 82
  • config 10.14.6 SSD.plist
    7.3 KB · Views: 85
  • config 10.15.4 SSD.plist
    7 KB · Views: 116
  • SSDT-USB.aml
    1.3 KB · Views: 87
Last edited:
Status
Not open for further replies.
Back
Top