Jump to content
Sign in to follow this  
Hervé

What's the difference between caching kexts and injecting kexts through Clover?

Recommended Posts

Questions still arise about this matter so here's a recap of what caching kexts and injecting kexts (through Clover) mean:

 

1/ Caching kexts:

Kexts placed in /L/E and/or /S/L/E are cached in the kernel cache (or prelinked kernel) which aims to accelerate boot time. Cached kexts are subject to signature by Apple and must be set with the correct permissions (Cf. our FAQ topics on permissions). Cached kexts will be shown/listed/registered in System Info (ex-SysProfiler) -> Software -> ExtensionsCaching kexts is the recommended scheme for all add-on kexts.

 

  • /S/L/E is the location for Apple's own (i.e. vanilla) kexts. Ideally, this should be left untouched by Hackintoshers unless for very specific and rare reasons (eg: patched AppleHDA).
  • /L/E is the location for 3rd party/add-on kexts. This is where all kexts we use for our Hackintoshes should go.
  • ⚠️ Add-on kexts should only be placed in either folder, never in both.

 

2/ Injecting kexts through Clover:

Injected kexts are not cached and will not be shown/listed/registered in System Info (ex-SysProfiler) -> Software -> Extensions. Injecting kexts results in a slightly slower boot than caching kexts (though many would arguably say it's hardly noticeable). Kexts injection operates according to Clover settings on the matter:

  • If kext injection is set to Yes, kexts placed in E/C/K/O (or E/C/k/10.xx) will be injected.
  • If kext injection is set to No, no injection takes place; obviously...
  • If kext injection is set to Detect, kext injection operates according to the presence of FakeSMC in the kext cache (the kext having been poperly installed in /L/E or /S/L/E). If present, no injection takes place, if absent, kext injection is performed.
  • ⚠️ If kext injection is used, make sure the kexts aren't cached at the same time.

 

Clover's E/C/k/O and E/C/k/10.xx are the locations for kexts that Clover injects at boot time:

  • E/C/k/O is used to inject kexts regardless of the OS X/macOS version.
  • E/C/k/10.xx are used to inject kexts for the given OS X/macOS version and therefore allow different kexts to be injected for different versions.

 

 

Kext injection is very useful for recovery purposes (like booting without cache which ignores /L/E) or when testing kexts for instance; if a newly injected kexts causes issues (like a KP), it's very easy to remove/bypass it. On the other hand, kext injection is known to occasionally cause problem because it's not the natural way in which kexts should be loaded. Kext injection is basically a form of forced loading and, sometimes (though rare these days), it does not work.

 

My own recommendation is to experiment with kexts through injection and, once kexts are validated, to cache them from /L/E.

 

Google for this kext injection matter or consult the Clover wiki/InsanelyMac forum. It's all quite widely documented.

 

  • Like 2

Share this post


Link to post
Share on other sites

kext injection is also needed if you are booting from an installer or .DMG image as the cache is predefined and compressed within the installer that is normally not accessible.

in the case of an installer the folder Efi/Clover/Kexts/Other should be used.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...