#!/bin/bash
#
# AMD Pre Install/Update Script - 2thInstall Script
# Thanks to Shaneee - https://amd-osx.com
# Lakr - Update for Mojave 10.14 Installer
# Ask the user what drive macOS is installed on
while [ ! -d /Volumes/"$VOLUME"/System ]; do
printf "\nPlease enter the name of the disk High Sierra is installed on (blank to exit):\n"
read VOLUME
if [ -z "$VOLUME" ]; then #if no value was entered
exit 1
fi
if [ -d /Volumes/"$VOLUME"/"macOS Install Data" ]; then
break
else
printf "\nNot a valid install!\n"
fi
done
# Apply AMD files for Update Process
cp -Rf /Volumes/Image\ Volume/InstallScripts/JobRess/prelinkedkernel.bits /Volumes/"$VOLUME"/macOS\ Install\ Data/Locked\ Files/Boot\ Files/prelinkedkernel
sed -i '' 's/auth-//g' /Volumes/"$VOLUME"/macOS\ Install\ Data/Locked\ Files/Boot\ Files/com.apple.Boot.plist
nvram -c
# Finished
printf "\nPlease continue to boot your HDD/SSD.\nOnce completed boot, \nBack to here and run amd to replace the kernel again.\nFor post install support visit http://amd-osx.com/[/url]\nDonations are gratefully accepted.\n\nEnjoy your System\n-Shaneee\n\n\nT"
exit 0
由于我的机器不知道为啥执行命令总是提示找不到文件no such file之类的错误,
所以我就在win下照着命令手动操作的,具体如下:
win下安装APFS forwindows,重启,挂载APFS盘;
#!/bin/bash
#
# AMD Pre Install/Update Script - 3thInstall Script
# Thanks to Shaneee - https://amd-osx.com
# Lakr - Update for Mojave 10.14 Installer
# Ask the user what drive macOS is installed on
printf "This is 3th install script."
printf "Force exit using ctrl+z if it is not end automaticly -\n -when rebuilding kernel at the end."
while [ ! -d /Volumes/""$VOLUME""/System ]; do
printf "\nPlease enter the name of the disk High Sierra is installed on (blank to exit):\n"
read VOLUME
if [ -z "$VOLUME" ]; then #if no value was entered
exit 1
fi
if [ -d /Volumes/"$VOLUME"/System ]; then
break
else
printf "\nNot a valid install!\n"
fi
done
# Applying AGDP Fix
printf "\nApplying the AGDP Fix for MacPro6,1 and other SMBios\n"
printf "\n"
sed -i '' 's/Config1/none/g' /Volumes/"$VOLUME"/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/AppleGraphicsDevicePolicy.kext/Contents/Info.plist
sed -i '' 's/Config2/none/g' /Volumes/"$VOLUME"/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/AppleGraphicsDevicePolicy.kext/Contents/Info.plist
sed -i '' 's/Config3/none/g' /Volumes/"$VOLUME"/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/AppleGraphicsDevicePolicy.kext/Contents/Info.plist
sed -i '' 's/Config4/none/g' /Volumes/"$VOLUME"/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/AppleGraphicsDevicePolicy.kext/Contents/Info.plist
# Remove Problem Kexts
printf "\nRemoving Problem Kexts\n"
printf "\n"
rm -Rf /Volumes/"$VOLUME"/System/Library/Extensions/AppleIntelCPUPowerManagement.kext
rm -Rf /Volumes/"$VOLUME"/System/Library/Extensions/pmtelemetry.kext
rm -Rf /Volumes/"$VOLUME"/System/Library/Extensions/AppleTyMCEDriver.kext
# Repair Full Drive Permissions
printf "\nRepairing Full Drive Permissions"
printf "\n"
/Volumes/Image\ Volume/InstallScripts/JobRess/rp -r /Volumes/"$VOLUME"/
# Remove old PrelinkedKernel and rebuild.
printf "\nRemoving the old PrelinkedKernel and rebuilding for AMD\n"
printf "\n"
rm -Rf /Volumes/"$VOLUME"/System/Library/PrelinkedKernels/prelinkedkernel
kextcache -u /Volumes/"$VOLUME"/
printf "\nYour System should now be able to boot.\n\nNote: you will need to use the USB to boot for the first time.\nFor post install support visit [url]https://amd-osx.com/\nDonations are gratefully accepted.\n\nEnjoy your System\n-Shaneee\n\n\nThe System will reboot in one minute or you can do it manually.\n"
printf "Lakr was here. lol!"
printf "Attention! If system failed to boot with error like failed to read perlinkedkernel, back here and run kernelFix"
照着命令来在win下操作如下:
再次来到win下,
# Copy Kernel
用这两个prelinkedkernel和kernel 文件 替换对应位置的;
# Copy Kexts
替换SLE下的两个驱动,IONetworkingFamily.kext和System.kext;
# Applying AGDP Fix这个操作,没看懂啥意思,暂时没操作,看着是操作的驱动是关于显卡的。我显卡免驱也就没管它。
# Remove Problem Kexts
移除问题驱动
删除驱动 System/Library/Extensions/AppleIntelCPUPowerManagement.kext
System/Library/Extensions/pmtelemetry.kext
System/Library/Extensions/AppleTyMCEDriver.kext
# Repair Full Drive Permissions
修复所有驱动权限,我进入系统后用Kext Utility修复的。运行下它,即可自动重建缓存和修复权限。
# Remove old PrelinkedKernel and rebuild.
上面已经替换内核PrelinkedKernel
第六步:开机,四叶草引导苹果系统盘。接下来就是自己玩系统了。