Last active
December 4, 2021 23:49
-
-
Save transforminteractive/da630aa0a24de062233f4fd9f2c09c66 to your computer and use it in GitHub Desktop.
fixkexts.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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