Skip to content

Instantly share code, notes, and snippets.

@transforminteractive
Last active December 4, 2021 23:49
Show Gist options
  • Select an option

  • Save transforminteractive/da630aa0a24de062233f4fd9f2c09c66 to your computer and use it in GitHub Desktop.

Select an option

Save transforminteractive/da630aa0a24de062233f4fd9f2c09c66 to your computer and use it in GitHub Desktop.
fixkexts.sh
# 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