About adding M4000/M5100/W5170M/M6000 to an iMac
Problem:
After installing a M5100/W5170M (or more generic a Venus HD7xxx series GPU) to an iMac it will not boot into normal macOS unless you have prepared OpenCore in advance with some special settings. This is a catch22 - some users start with a dead GPU and cannot do this installation in advance, after installation they cannot boot normally. Although recovery and safe mode boot both works with these cards.
Note: OCLP 0.3.2 and later will be able to auto detect the new AMD GPU and create a working OpenCore configuration.
There are three ways to Rome,
1. using a recovery CD created in advance or
2. booting into safe mode or
3. using another Mac to run OCLP and generate and write a valid config to an USB installer.
In any case build now or later the recovery CD - it is a life saver when accidentally deleting your OpenCore.
Solution 1: (using OCLP 0.3.2 or later to build a OC recovery CD)
Get the TUI version of the lastet
OCLP and run it following these steps:
1. run OCLP TUI
2. select 5. Patcher Settings
3. select 9. Advanced Settings, for developers only
4. select 3. Set Generic Bootstrap
5. select 2. EFI/BOOT/BOOTx64.efi
6. select Q. Quit
7. select 1. Set Metal GPU Status
8. select 4. AMD Legacy GCN
9. select Q. Quit
10. select Q. Quit
11. select 1. Build OpenCore
12. save files from temporary storage
or select 2. Install OpenCore to USB/internal drive
The output of the screen ends with a line like this
Code:
Your OpenCore EFI for iMac12,2 has been built at:
/private/var/folders/9_/11q0cx1j2b3d7yr9ybjt9x3r0000gn/T/_MEI70EWjX/Build-Folder/OpenCore-Build
You may now write the new OpenCore to disk/usb drive or just follow the printed path containing the files on local disk and copy them over to your local folder using a terminal app:
Code:
% cd /private/var/folders/9_/11q0cx1j2b3d7yr9ybjt9x3r0000gn/T/_MEI70EWjX/Build-Folder/OpenCore-Build
% mkdir ~/Desktop/OCD
% cp -r EFI ~/Desktop/OCD
% mkdir ~/Desktop/OCD/EFI/BOOT
% cp System/Library/CoreServices/boot.efi ~/Desktop/OCD/EFI/BOOT/BOOTx64.efi
% open ~/Desktop/OCD/EFI
Now your should have a Finder window showing this and you may continue to
create your OC rescue CD using the data generated in the former step.
View attachment 1925440
Solution 2: (using safe mode)
Install the GPU and boot into recovery (pressing CMD+R on boot) and disable SIP and enable safe mode booting with the famous
Code:
nvram boot-args=“-x“
csrutil disable
commands in the terminal app and reboot directly and automatically into safe mode (the
“-x“
does the safe mode trick).
Safe mode disables the graphics acceleration and make the desktop feel sluggish, but you can do the basic administration.
Unfortunately in safe mode Apple decided to limit the access to some kernel extensions, in particular Apple blocks the msdosfs.kext from loading in safe mode which we need to mount the EFI partition to write a new updated OpenCore version through OCLP. So we have to hack around this, now.
I found here a recipe to overcome it here:
Hello guys, We have a HP Pavilion AB040ND notebook where we want to install Mac OS X El Capitan onto. Fortunately we got it to install without getting a black screen and we still can. After the installation and we try to boot into El Capitan using the Clover bootloader and using the -x (safe...
www.tonymacx86.com
Short version:
As described before you need to disable SIP and boot into safe mode (press left shift key on boot or add -x to boot-args).
Open a terminal app and enter these commands (tried this in High Sierra safe mode):
Code:
sudo mkdir /tmp/kexts
sudo cp -RX /System/Library/Extensions/msdosfs.kext /tmp/kexts
sudo /usr/libexec/PlistBuddy -c "Add :OSBundleRequired string" /tmp/kexts/msdosfs.kext/Contents/Info.plist
sudo /usr/libexec/PlistBuddy -c "Set :OSBundleRequired \"Safe Boot\"" /tmp/kexts/msdosfs.kext/Contents/Info.plist
sudo kextutil /tmp/kexts/msdosfs.kext
Now you can use download OCLP 0.3.1 or later to write a new OpenCore in safe mode following the OCLP docs. It will auto detect the new AMD HD7xxx series GPU and add the settings needed to boot it successfully into High Sierra (hint: disable SecureBootModel within the OCLP settings for use of High Sierra!) and will allow installation and use of unsupported macOS versions including Monterey!
You may use the opportunity and download the new macOS installer of choice and prepare an USB installer to be ready on the next reboot.
Solution 3: (using another Mac)
Simply download OCLP latest (runs only in macOS),
1. start OCLP
2. chose your own iMac model as target system (overruling the auto detection)
3. chose the metal (MXM) GPU of type AMD GCN
4. build OpenCore
5. write OpenCore to your USB installer
6. use this USB installer to boot the iMac and start installing the new macOS or start into the existing macOS
7. after reaching the final macOS on your iMac of choice download and run OCLP again (no manual adjustments), build and write OpenCore to your internal boot disk.
In any case consult the great
OCLP docs for help.
Hope this helps!
Edit:
Just did a dry run in an iMac11,1 with an W6170M (flashed with GOP vBIOS) and an W5170M (flashed with GOP vBIOS) using High Sierra native (no OpenCore installed at all).
It did the job.
Code:
% sudo diskutil mount disk0s1
Password:
Volume on disk0s1 failed to mount
If the volume is damaged, try the "readOnly" option
% sudo mkdir /tmp/kexts
% sudo cp -RX /System/Library/Extensions/msdosfs.kext /tmp/kexts
% sudo /usr/libexec/PlistBuddy -c "Add :OSBundleRequired string" /tmp/kexts/msdosfs.kext/Contents/Info.plist
% sudo /usr/libexec/PlistBuddy -c "Set :OSBundleRequired \"Safe Boot\"" /tmp/kexts/msdosfs.kext/Contents/Info.plist
% sudo kextutil /tmp/kexts/msdosfs.kext
Notice: system is in safe boot mode; kernel may refuse loads.
Kext with invalid signatured (-67030) allowed: <OSKext 0x7f9640d09c80 [0x7fffa42e7c30]> { URL = "file:///private/tmp/kexts/msdosfs.kext/", ID = "com.apple.filesystems.msdosfs" }
Code Signing Failure: code signature is invalid
% sudo diskutil mount disk0s1
Volume EFI on disk0s1 mounted
% open /Volumes/EFI/EFI/