Skip to content

Instantly share code, notes, and snippets.

@fullkomnun
Created October 8, 2019 04:11
Show Gist options
  • Save fullkomnun/12d70639fe879327b574243c34efcd1f to your computer and use it in GitHub Desktop.
Save fullkomnun/12d70639fe879327b574243c34efcd1f to your computer and use it in GitHub Desktop.
# mount the drive as read/write
mount -rw /
 
# create a directory for "disabled" extensions
mkdir /Volumes/Macintosh\ HD/Library/ExtensionsDisabled
 
# view files that exist in your Extensions folder but not the recovery partition
kexts=`comm -23 <(ls /Volumes/Macintosh\ HD/Library/Extensions|sort) <(ls /Library/Extensions|sort)`
echo $kexts
 
# move "extra" kext files to the "disabled" directory
for kext in $kexts; do
    mv /Volumes/Macintosh\ HD/Library/Extensions/$kext /Volumes/Macintosh\ HD/Library/ExtensionsDisabled/$kext;
done
 
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment