** Hackintosh ** Tips to make a bare metal MacOS


Leoyzen

824 posts in this topic Last Reply

Recommended Posts

Tnx buddy , will test it this weekend (as have to reboot whole server to make changes to the VM , as 5700xt passed thru, tnx amd...), but by the looks of it seems a solid solution.
I saw the missing "internal" status also in the about this mac system report on a proper mac so that was what triggered me to look in his direction.

Link to post
  • Replies 823
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

It is time to start a new thread and share my tips, and we can discuss here. For those who don't have much information, see  SpaceInvaderOne's **VIDEO GUIDE** How to Install MacOS Mojave or High

Good news, no more AMD reset bug with RX 6xxx XT series GPUs in macOS 11.4 beta 1 on UnRAID.

Latest release of OVMF_CODE.fd and OVMF_VARS.fd from edk2, v. 202102 published today. Compiled in kali linux with gcc, tested and working. Enjoy edk2-OVMF-202102-Stable-RELEASE-GCC5-Kali.

Posted Images

5 hours ago, david279 said:

You can do it in your xml by making sure the bus it's on is 00. ex..

 

domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>

Tnx but this i already have and is aparently in some cases not enough. Will try ghost82 method , which looks promising.

Link to post

@ghost82

Stole some downtime as wanted to test it fast. Worked like a charm . You rock dude !!.

Now this %^%$ piece of software finally also runs fine after my en0 is seen as internal. (actually the software is amazing, but its apples crap again)

Damn apple.  But they are not unique. In the past i have seen even on enterprice level software licenses been tied to an internal ethernet card. Then you replaced the card and license broke. 

Edited by glennv
Link to post
6 hours ago, ghost82 said:

As an alternative you can inject the builtin property in opencore:

First of all check that your ethrnet card is recognized as en0 in macOS; if this is not the case delete the network properties (you can find easily how to do it in google), attach only the ethernet card and reboot, so that macOS will pick up the card as en0.

 

Download the release version of gfxutil.

It's here:
https://github.com/acidanthera/gfxutil/releases/download/1.80b/gfxutil-1.80b-RELEASE.zip

 

Unzip it in the vm, open the terminal, cd to the extracted folder and run:


./gfxutil -f ethernet

This will output the address of your ethernet(s)

Output should be similar to this:


02:01.0 8086:100f /PCI0@0/S08@1/pci-bridge@0/ethernet@1 = PciRoot(0x1)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x1,0x0)

Mount the EFI partition, open the config file located at /EFI/OC/config.plist and set the following:

Find DeviceProperties and inject the built in property for your network, you should have something like this:


	<key>DeviceProperties</key>
	<dict>
		<key>Add</key>
		<dict/>
		<key>Delete</key>
		<dict/>
	</dict>

Replace with:


	<key>DeviceProperties</key>
	<dict>
		<key>Add</key>
		<dict>
			<key>PciRoot(0x1)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x1,0x0)</key>
			<dict>
				<key>built-in</key>
				<data>AQ==</data>
			</dict>
		</dict>
		<key>Delete</key>
		<dict/>
	</dict>

Change only the PciRoot address to that of the output of the gfxutil.

By doing this you are telling opencore to inject the property "buil-in" with a value of AQ== (it's base64, converted to decimal is 1, boolean=true) into address PciRoot()...., which is the ethernet card.

 

Now if you have IORegistry Explorer (https://mac.softpedia.com/get/System-Utilities/IORegistryExplorer.shtml) and you run it and you search for "en0" you will see on the right the built-in property set to "true".

 

en0.png.3161934bbe98877702563388eb3eac7e.png

 

s-l400.jpg.bca6b7e4c33fce77c318b03ea0929a18.jpg

Link to post

@Leoyzen hello man, first thanks for the kvm opencore, second, my Catalina VM was working great with passthrough Radeon  5700XT up until 10.15.6.. then 3 days ago 10.15.7 came out, unlucky I didnt backup and updated just to find that the 5700XT won't boot anymore, it works perfectly with VNC but no more 5700XT and I cant go back to 10.15.6.

 

Anyways I saw in tonnymac Hackitosh that people there with clover and 5700XTS are working just fine with the upgrade and nothing extra done..

 

I did a clean install and nothing, got the whatevergreen 1.4.2 tho and the latest lilu, rest are the same kexts you have in the EFI folder, would love some guide on what to do bacause anyways this patch was almost all about apple fixing everything wrong with the 5700XT so it is the version to go for 5700XT owners.

 

Thanks

 

 

 

EDIT: Ok, reading around found out that if you add the boot arg agdpmod=pikera fixes this issue

Edited by mSedek
Found Solution
Link to post
On 9/29/2020 at 7:14 PM, david279 said:

Big Sir dev beta 9 out now...

Updated now to bug sur beta 9 20A5384c, as a user it seems the same as beta 1-2-3-4-5-6-7-8 (oh no wait..beta 6 had the smb bug too)..nothing changed, or very few things..

 

Can be updated via ota or with full installer from apple; if you have a broken seal you will not be able to update via ota; sip should be enabled too.

 

- issue with textedit: some crashes when opening existing txt files (with beta 1 was several crashes) Still some issues with the search functionality; crazy scroll when opening files with many lines, cannot scroll the txt till the bottom

- preference panel icons of third party applications: not working well if a user try to install the pane in /System, icons disappear if prepane installed in /System/Library (probably it will not be fixed since you can't install in /System with a sealed system)

system preferences --> network: it takes long time to load the network panel

during Mac OS boot there are several messages like "IOKit Daemon (kernelmanagerd) stall[0], (60s): 'ISA'" and boot takes like 4-5 minutes (same messages happen during installation with 240s stall time); Solved: if you have AppleLPCInjector kext disable it, or use device/vendor id pci8086,2916 for AppleLPC 

control center: somehow slow when clicking on the control center icon

- Clicking on top clock menu bar opens the widget (not sure but shouldn't it open clock settings?)

- AM/PM clock not working (not shown in menu bar); Clock settings are now moved to languages and zones and dock & menu bar: if you want to use am/pm with 12 hours make sure to untick 24 hours in Language and regions and in dock and menu bar and check show am/pm in dock and menu bar

Languages: some strings are only in English

System preference panel not working well: some settings shows as greyed out but can be enabled, some graphical glitches

- Opencore shows in bootpicker "Preboot" instead of the Mac OS volume name (Scanpolicy=0, no Mac OS volume name is shown): can be fixed manually by creating a file named .disk_label.contentDetails with the content of your disk label (for ex: MacOSBigSur) in /System/Volumes/Preboot/UUID/System/Library/CoreServices (replace UUID with the real UUID); seems fixed in beta 9 (?); anyway latest master version of opencore will rename Preboot to Macintosh-HD

- Cannot mount / for read/write anymore with SIP disabled: sudo mount -uw / (not an issue related to Mac OS since it's supposed to work as it is, the seal must be broken to be able to write into /); with SecureBootModel=Default macos boots from / instead of a snapshot so it's possible to mount / in read/write; SecureBootModel=Disabled boots from the snapshot; not sure, but it could be an apple bug

Cannot connect to SMB (workaround load manually kext with "sudo kextload /System/Library/Extensions/smbfs.kext"); Still bugged in beta 9, can connect to smb shares but kernel panics during file transfers

- Some java applications don't work, not sure what is the culprit: found the culprit, it's NSMenuFX searching for ic08; in big sur /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns has only four icons inside, Catalina has 10; NSMenuFX resolved the issue on September 8th, but applications if not updated are still affected; as a workaround you can directly hex patch the java app, the MenuToolkit.class file (in my app is in jar-->de/codecentric/centerdevice/MenuToolkit.class); search for ic08 and patch with ic09. Several java apps could be affected.

- Some old applications packed with upx will not run, giving error about permissions (?): you may have some luck by installing homebrew+upx and decompress them with upx -d

 

Just a note: opencore config.plist has the SecureBootModel set to Default as default; this prevents the system to update with the error "Download failed, check your internet connection".

I noticed that with "Default" value, SIP enabled, authenticated-root enabled, sealed system, mounting / in read and write failed with error 77 instead of error 66 (as it should be by booting from a snapshot); so I tried to update to beta 9 from the terminal and I found that my system was not booting from a snapshot!

Setting SecureBootModel to Disabled fixes the issue (now system boots from a snapshot and mounting / in read and write returns error 66), so again don't use secure boot.

 

This is strange if I think at it; I found several discussions about supported macs and big sur updates, stating that setting security to highest level solved update issues..in this case it seems the opposite..

 

And this is very good news for my usb wifi that needs files in /System directory.

Opencore is now able to boot from the snapshot or to boot from /, without deleting snapshots, tagging new ones, etc.

SecureBootModel=Disabled will run the sealed snapshot (for os updates (and) for everyday use), SecureBootModel=Default will run the os from / without interfering each other

 

I hope that apple will not be so crazy to release a gm version next week....

Edited by ghost82
Link to post
8 hours ago, J05u said:

How i can convert baremetal opencore machine config plist for VM?

Look here:

 

Attached there's a config.plist

Look for additional entries or delete entries according to your version of opencore.

You may want to change SecureBootModel to Disabled instead of Default.

Edited by ghost82
Link to post
11 hours ago, Xdevillived666 said:

but am getting stuck at 
no port micro restart  we dont support smc on this platform

Are you using virtualsmc?

If not use it, and update it to the latest version, older versions need the boot arg vsmcgen=1

It's also a good idea to use the latest master version of opencore and of all the kexts you are using.

Kexts.zip

Edited by ghost82
Link to post
On 9/30/2020 at 12:40 PM, ghost82 said:

opencore config.plist has the SecureBootModel set to Default as default; this prevents the system to update with the error "Download failed, check your internet connection".

I noticed that with "Default" value, SIP enabled, authenticated-root enabled, sealed system, mounting / in read and write failed with error 77 instead of error 66 (as it should be by booting from a snapshot); so I tried to update to beta 9 from the terminal and I found that my system was not booting from a snapshot!

Setting SecureBootModel to Disabled fixes the issue (now system boots from a snapshot and mounting / in read and write returns error 66), so again don't use secure boot.

As reported by a developer of opencore, this could be an apple bug (another?), let's update when the gold master will be released.

Peace Steve, you wouldn't want to see all this crap.

Edited by ghost82
Link to post

Can anyone share any written guide if exist? 

I am confused, don't know from where to start my journey.

So far what i understand:

1) i need to create Mac OS img file

2) I need covert opencore EFI to qcow2 in Unraid terminal?

Here starts my confusions:

Do i need to use Leoyzen EFI updated with new serial numbers and kexts? Or i can use my EFI file from fully working hackintosh without any changes?

3) When i will create VM like in spaceinvader guide i need to add CPU flags for Catalina, i am i right? And after this just try to install?

My knowledge level with KVM is poor, i don't have VM's running so far, so for most of you my question will look stupid and i am sorry about this

 

Edited by J05u
Link to post
8 hours ago, J05u said:

So far what i understand:

1) i need to create Mac OS img file

2) I need covert opencore EFI to qcow2 in Unraid terminal?

Here starts my confusions:

Do i need to use Leoyzen EFI updated with new serial numbers and kexts? Or i can use my EFI file from fully working hackintosh without any changes?

3) When i will create VM like in spaceinvader guide i need to add CPU flags for Catalina, i am i right? And after this just try to install?

My knowledge level with KVM is poor, i don't have VM's running so far, so for most of you my question will look stupid and i am sorry about this

1) yes, SpaceInvaderOne explains how to do this in some of his videos (from the download from apple to the img creation of the media installer)

2) it's one possibility, you can create an empty qcow2 image in unraid, mount it, and copy the efi files in unraid; an easier solution is to download already a qcow2 image with files, able to boot the vm, and then tweak it from the inside of the vm (in fact you can mount the EFI partition with clover configurator/opencore configurator/EFI partition mounter/terminal/or any other application able to mount the EFI partition)

Here there is a premade qcow2 image reported working by several users you can start with:

Just download the opencorebasic.qcow2 file and point the xml of the vm to that file.

Hackintoshes are different from vms: to boot an hackintosh you may need different quirks in the configuration which may not boot the vm.

Vms are easier to configure, think as they are more "universal".

3) Yes, you need to add custom args at the bottom of the xml.

There are no stupid questions, just questions :D

 

Edited by ghost82
Link to post
On 10/3/2020 at 9:46 AM, ghost82 said:

Are you using virtualsmc?

If not use it, and update it to the latest version, older versions need the boot arg vsmcgen=1

It's also a good idea to use the latest master version of opencore and of all the kexts you are using.

Kexts.zip 1.63 MB · 1 download

Checked my oc version, 

I have 0.6.1 from sept 7 release

Updated kexts accordingly
1952847334_Screenshot2020-10-04at10_53_30.thumb.png.048c9ae346befd1c1df9880e73b9ebad.png
Got rid of virtualsmc bootleg and WE bootlegs. Booted my other ssd fine with beta 4.

When trying to update again, I am getting stuck here right before a forced reboot(see screen shot, albeit it is a bit hard to make it out-starts at "IOconsoleusers" on bottom but can't quite make it out) 
 

Edited by Xdevillived666
Link to post
  • 2 weeks later...
On 9/25/2020 at 3:00 AM, david279 said:

You can do it in your xml by making sure the bus it's on is 00. ex..

 

domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>

@glennv sorry to bother you, but just to understand more, do you have more than one network in your vm (virtual or passed through)?

Because if I remember well bus 0 worked well for me (it was built in, without any injection) for only one network, but stopped to be built in after adding more.

Edited by ghost82
Link to post
14 hours ago, Simon Forest said:

Hi guys,

I've been on this problem for days and I've tried and retried 4 times.

Same configuration as T-Birth, but I can't get past [EB|#LOG:EXITBS:START]

Did all the troubleshooting steps and read lots and lots of forums

 

Please help ^^'

opencore-2020-10-12-042211.txt 256 kB · 2 downloads libvirt.txt 8.09 kB · 0 downloads

Sorry, not much help from me, no amd to test, but you should look here for this to troubleshoot:

https://dortania.github.io/OpenCore-Install-Guide/troubleshooting/extended/kernel-issues.html

Click on "Stuck on [EB|#LOG:EXITBS:START]"

 

In particular look carefully at the kernel patches, some were updated recently!

I think if you don't host-passthrough the cpu it works?Just with Penryn emulated..?

Link to post
44 minutes ago, david279 said:

The emulate using Penryn or something else, I use Skylake-Client just because i like to try things. Makes no performance difference even using the AMD patches in your config for the VM.

+1 for this, we use virtual machines also for this reason!

Link to post

Hi, I found an issue that took about a day to find the culprit in ovmf stock 202005 and 202008.

My setup has 2 monitors attached to my gpu, one with hdmi <---> hdmi and the other with dvi <---> dvi to vga adapter <---> vga.

Yesterday I needed the hdmi for another project I'm doing, so I detached the hdmi cable from the gpu, I tried to startup the vm and...it didn't boot :(

Black monitor with blinking power led.

So I noticed that with that setup I must have hdmi plugged to a monitor to successfully start the vm (vga monitor works too, it doesn't work if only the vga monitor is attached).

That was strange to me, because before december 2019, before having the second hdmi monitor, I always used only the vga monitor without any problem!

I thought at qemu and libvirt bug and finally I tried to copy back the stock OVMF files coming from unraid 6.8.3.

That was successfully! I'm able to start again the vm with only the vga monitor.

 

So, ovmf stock v. 202005 and v. 202008 have this issue for me, maybe for other people and othe gpus too.

Actually I'm not able to work on the 6.9 beta 30 of unraid, can anybody share OVMF_CODE.fd and OVMF_VARS.fd coming with stock unraid 6.9 beta 30 so I can test if these are affected too? It seems unraid 6.9 beta 30 is using older OVMF files (probably the same as 6.8.3), so it's NOT affected.

 

@limetech please can I know the version of OVMF files included in unraid 6.8.3 or 6.9 beta 30, so that I can properly report the bug in the edk2 bugtracker?

 

Thanks

 

UPDATE 15/10/2020

It seems the issue is not with OVMF but with Mac OS! Xcode seems to not be able to properly compile the files; in other words, you have no errors during compilation, compiled files are created but...they don't work properly!And the funny thing is that they work in some way (I'm able to boot!) but in some cases they have unexpected behaviors!

I noticed this because my OVMF_CODE.fd never displayed the tianocore logo at boot, and this behavior was confirmed unexpected by a member of the tianocore bugtracker.

Compiling the source in another environment (kali linux) successfully compiled the files.

Edited by ghost82
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.