Jump to content
  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 

[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.




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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.