Skip to content

Instantly share code, notes, and snippets.

@MediaPreneur
Forked from koush/kext-rebuild
Created December 10, 2016 07:31
Show Gist options
  • Select an option

  • Save MediaPreneur/91e1a55768e44bfa055a67489e82d2b1 to your computer and use it in GitHub Desktop.

Select an option

Save MediaPreneur/91e1a55768e44bfa055a67489e82d2b1 to your computer and use it in GitHub Desktop.
#!/bin/bash
chown -R 0:0 /System/Library/Extensions
chmod -R o-w /System/Library/Extensions
kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions
if [ ! -d /Extra ]
then
mkdir -p /Volumes/EFI
mount_hfs /dev/disk0s1 /Volumes/EFI
chown -R 0:0 /Volumes/EFI
chmod -R o-w /Volumes/EFI
kextcache -v 1 -a i386 -a x86_64 -m /tmp/Extensions.mkext /Volumes/EFI/Extra/Extensions
mv /tmp/Extensions.mkext /Volumes/EFI/Extra
else
chown -R 0:0 /Extra
chmod -R o-w /Extra
kextcache -v 1 -a i386 -a x86_64 -m /Extra/Extensions.mkext /Extra/Extensions
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment