Jump to content

[script] Small and fast script to fix perms/kext rebuild


3 posts in this topic

Recommended Posts

This is a small script to repair permissions and rebuild kext caches.

 

Usage:

 

boot with boot arg:  kext-dev-mode=1

 

copy script to your home directory, open terminal and run:

 

sudo ./repairrebuild

 

at the end, the script will reboot your system.

 

now you don´t have to use kext-dev-mode again, use it only to rebuild caches.

 

 

script content:


echo "********************************************************"
echo "Before run this script, boot your system with boot arg:"
echo "kext-dev-mode=1"
echo "use it just to rebuild cache."
echo "script by: rodrigocunha@inanelymac"
echo "********************************************************"
echo "."
echo "Fixing ownership and permissions..."
chmod -R 755 /System/Library/Extensions/*
chown -R root:wheel /System/Library/Extensions/*
chown root:admin /
echo "Rebuilding kext cache..."
kextcache -system-prelinked-kernel
kextcache -system-caches
echo "."
echo "process complete."
read -p "press a key to reboot"
echo "rebooting..."
shutdown -r now

  • Like 6
Link to comment
Share on other sites

  • 9 months later...
 Share

×
×
  • Create New...