Contribute
Register

<< Solved >> Catalina Won't Boot After Kext Install - KP on AppleAHCIPort.kext

Status
Not open for further replies.
Joined
Jun 2, 2011
Messages
134
Motherboard
Gigabyte GA-P67A-UD4-B3
CPU
i7-2600K
Graphics
RX 560
I have been working to get AHCI working on my Catalina installation. I tried installing AppleAHCIPort.kext to \L\E\ and then tried SATA-unsupported.kext to \S\L\E\ as recommended in several posts. I used KextBeast to install them. I also added some AHCI patches along with the kexts. The kext+patches seem to have fixed my High Sierra AHCI. While neither of these seemed to cause problems at first with Catalina (I booted/ran a few times), I eventually reset my NVRAM and rebooted, and Catalina no longer boots at all. I have not been able to recover it despite several efforts.

I get this KP error: Panic diags file unavailable, panic occurred prior to initialization, with backtrace to AppleAHCIPort. (see attached)

I booted into my working High Sierra to remove the offending kexts, figuring that would resolve the boot KP. Removing AppleAHCIPort.kext didn't seem to fix the issue (even after resetting NVRAM). So, I went looking for SATA-unsupported. But I couldn't find it. I read somewhere that it may not install (easily) due to permission issues, so maybe it just never got installed? It isn't listed in the KP, so maybe it isn't the problem (even though it was the last thing I installed).

I have a clone of the Catalina installation, so I could wipe it clean and start over, but I wanted to try to fix this as a learning experience. I expect it is something rather simple once I know what to do. It seem that having the kext there, the system is not able to read the file or something - so maybe it is a permission issue where KextBeast messed up the folder in a way that is more than just the kext file? I haven't dealt with installing kexts onto my system drive, and don't fully understand how permissions/caches/nvram/etc interact.

Please advise what steps I should take to diagnose and fix this KP on startup. Thanks
 

Attachments

  • IMG_7830.PNG
    IMG_7830.PNG
    2.1 MB · Views: 51
I have been working to get AHCI working on my Catalina installation. I tried installing AppleAHCIPort.kext to \L\E\ and then tried SATA-unsupported.kext to \S\L\E\ as recommended in several posts. I used KextBeast to install them. I also added some AHCI patches along with the kexts. The kext+patches seem to have fixed my High Sierra AHCI. While neither of these seemed to cause problems at first with Catalina (I booted/ran a few times), I eventually reset my NVRAM and rebooted, and Catalina no longer boots at all. I have not been able to recover it despite several efforts.

I get this KP error: Panic diags file unavailable, panic occurred prior to initialization, with backtrace to AppleAHCIPort. (see attached)

I booted into my working High Sierra to remove the offending kexts, figuring that would resolve the boot KP. Removing AppleAHCIPort.kext didn't seem to fix the issue (even after resetting NVRAM). So, I went looking for SATA-unsupported. But I couldn't find it. I read somewhere that it may not install (easily) due to permission issues, so maybe it just never got installed? It isn't listed in the KP, so maybe it isn't the problem (even though it was the last thing I installed).

I have a clone of the Catalina installation, so I could wipe it clean and start over, but I wanted to try to fix this as a learning experience. I expect it is something rather simple once I know what to do. It seem that having the kext there, the system is not able to read the file or something - so maybe it is a permission issue where KextBeast messed up the folder in a way that is more than just the kext file? I haven't dealt with installing kexts onto my system drive, and don't fully understand how permissions/caches/nvram/etc interact.

Please advise what steps I should take to diagnose and fix this KP on startup. Thanks
best to remove the kexts you installed to /L/E and /S/L/E and keep them in your clover/kexts/other folder with the rest of your kexts
 
After removing the kext from /L/E or /S/L/E you needed to repair permissions and rebuild the kext cache on the drive you remove the kext from.

The KP is the result of the kext cache being messed up on the drive, by you removing the kext without undertaking the permission repair and kext cache rebuild.

General Observation: You rely on your 'Clones' too much.

You are probably 'Cloning' mistakes in to your 'clean' setup each time you mess up your macOS installation, whether that be your High Sierra or Catalina clones.

You need to create a new 'Clean' setup of macOS High Sierra and Catalina, if those are the two versions you are using. Your reliance on suspect cloned images is not helping you.
 
Thanks for the information, which is what I expect I was missing. I tried repairing permissions, and then booting with -f. I'll have to look into the kext cache rebuild (I thought -f did this). I presume I can perform all of this on my Catalina HD, while booted into High Sierra HD?

When I successfully install a new OS, I create a clone to disk-image, so that I can easily revert to a 'fresh install' if/when I screw something up. These are generally produced immediately after the first successful boot, so they shouldn't have any mistakes or errors baked into them (aside from incomplete configuration). This is partly as a time saver while testing, so I don't need to totally reinstall just to undo something catastrophic. I understand there is a risk I am replicating issues, especially if it is a clone of an installation that has been further modified (which I also make, but more as a backup of files).

Generally, once I figure everything out, I do a fresh install and configure the system as needed (without all the junk leftover from testing).
 
Yes, you can use Kext Wizard, which is an old app that is no longer used as the kext installation process changed. It will allow you to repair permissions etc. on your High Sierra drive, while booting Catalina.

You just need to change the 'target drive' before selecting the Repair Permissions and rebuild kernel cache options.
 

Attachments

  • Kext Wizard.zip
    1.3 MB · Views: 41
Thanks for the information, which is what I expect I was missing. I tried repairing permissions, and then booting with -f. I'll have to look into the kext cache rebuild (I thought -f did this). I presume I can perform all of this on my Catalina HD, while booted into High Sierra HD?

When I successfully install a new OS, I create a clone to disk-image, so that I can easily revert to a 'fresh install' if/when I screw something up. These are generally produced immediately after the first successful boot, so they shouldn't have any mistakes or errors baked into them (aside from incomplete configuration). This is partly as a time saver while testing, so I don't need to totally reinstall just to undo something catastrophic. I understand there is a risk I am replicating issues, especially if it is a clone of an installation that has been further modified (which I also make, but more as a backup of files).

Generally, once I figure everything out, I do a fresh install and configure the system as needed (without all the junk leftover from testing).
or in terminal:

Code:
sudo kextcache -i /
 
Won't using that Terminal command rebuild the kext cache on his Catalina drive?
 
Won't using that Terminal command rebuild the kext cache on his Catalina drive?
yes, good to do after removing the kexts from /L/E
 
I used Kext Wizard to run Repair Permissions and Rebuild Cache, but it didn't fix the KP. To be clear, I am able to boot my High Sierra, and am trying to fix my Catalina drive. I did change the target drive to the Catalina drive, but still KP.
 
Last edited:
Ah, that's a different story and requires a different solution, due to the security enabled on the Catalina drive.

You can't fix the Catalina drive when booting from the High Sierra drive, even with Kext Wizard. It works the other way around. But not as you need it to work. As the security applied to the High Sierra installation is not as tight and unforgiving as the security on the Catalina or any newer macOS drive. APFS Snapshots prevent this from working.

The Terminal script needs to be used from the Recovery boot partition, i.e. boot your Catalina system, but choose the Recovery icon in place of the normal macOS Catalina icon, you may need to press the Spacebar to have the Recovery icon made visible.

When you get to the part where the recovery wizard, Disk Utility etc. are available, open Terminal and use the command provided by @Feartech above. That should repair the kext cache on the Catalina drive.
 
Status
Not open for further replies.
Back
Top