This guide shows how to use the Apple-supplied "kextcache" tool to create this file quickly, incorporating kexts from multiple directories and excluding any non-boot kexts such as those from Parallels Desktop (which may lead to kernel panics).
All the info for this can be found in the man page of kextcache, but most tutorials seem to ignore that... so here goes my recommended way of calling "kextcache":
CODE
KEXT_RETAIL="/System/Library/Extensions"
KEXT_EXTRA="/Volumes/boot/Extra/Extensions"
MKEXT="/Volumes/boot/Extra/Extensions.mkext"
kextcache -v 1 -t -l -a i386 \
-m "$MKEXT" "$KEXT_EXTRA" "$KEXT_RETAIL"
- * -v 1: be verbose (show dependency failures etc.)
- * -t: Perform all possible tests on the named kext(s) and indicate whether the kext is loadable
- * -l: only include kexts required for local boot (as specified in the package's Info.plist). This is very important to ensure that no unwanted kexts are loaded too early. For instance, Parallels Desktop kexts can seriously mess up the boot process if they are already loaded by the bootloader (Chameleon/PC-EFI) instead of later on by kextd
- * -a i386: only include kexts for architecture i386.
- * -m "$MKEXT": create kext cache file
