This version is now deprecated, consult the downloads page for a link to the latest version.
This is a complete rewrite of the pfix utility and the beginning of something more. pfix 3.1 was a solid performer, I received no bug reports, but truth is it was a little messy. I had seen many issues with the way kextd/kextcache functions in Snow Leopard and users rebooting prior to the system prelinked kernel caches being completely built. So to ensure fail proof operation I coded it to build all of the caches manually, not just the Extensions.mkext. This wasn’t the ideal way to do things, but it required minimal time on my part to simply fix bugs in 3.0/2.x rather than rewrite it in a new format.
That said, with OS X 10.7 about to be officially released to the wild it was time for a rewrite, not only to clean up the old code but to expand functionality to the new version of OS X.
One of the biggest complaints I received about pfix 3.1 was that it took so long to execute… Why wait so long when you can just chown/chmod and then touch /System/Library/Extensions? Well the reason is simple really – it is not the fault of pfix – it is the fault of Snow Leopard’s kextcache. It takes a ridiculously long time to rebuild the system prelinked kernel caches if there is a problem with them or they don’t exist after having been deleted. If you were to simply touch /System/Library/Extensions and then reboot imediately, kextcache would not be finished and it will take you up to 15 minutes to boot your system, if it boots at all. Good news is, Lion doesn’t have this problem.
So what have I changed? Well not only will myFix detect the OS version it is running on, but it also detects the OS version of the target and adjusts the functions and syntax for mkext creation accordingly. I have extended support for it to run on Leopard and Lion. I have dropped support for running it on Tiger. I have also added full support for Leopard and Lion as target’s. So now you can use myFix from Leopard, Snow Leopard, and Lion to repair any Leopard, Snow Leopard, or Lion volumes.
Additionally instead of running all the commands manually I let kextd/kextcache do it’s job – after the initial permission repair (and optional diskutil repairPermissions) it will simply touch /System/Library/Extensions – and then it will WAIT until kextcache is finished. In some cases it will still take a while for kextcache to finish, but by waiting it will let you, the user, know when it’s safe to reboot so that you do not reboot your system prematurely and have a problem. In most cases however it will actually finish quite quickly. By adding the optional flag to skip the diskutil repairPermissions step it will go even faster, however, I do suggest you let diskutil repairPermissions run as chmod 0755 is *NOT* the correct permissions for many of the files in /System/Library/Extensions.
What did I mean by “and the beginning of something more”?
myFix will be more than simply a Permissions & Caches utility. In the future I will be adding additional functions to myFix, backup/restore functions, kernelcache support via bundled SLE extension, chameleon repair/updating, and more are all on the todo list…. Stay tuned…
So without further adieu let me present you with myFix 1.0
Basic Usage: myfix [option]
Example Usage: myfix -v 1 -t /Option GNU long option Meaning
-h –help Show this message
-s –skipsystem Don’t repair /system/library/extensions
-d –skipdiskutil Don’t repair permissions with diskutil
-v <level> –verbose <level> Set kextcache output’s verbosity level
-t <path> –target <path> Path to target partition to run myfix on
A complete list of the changes to the pfix functions from pfix v3.1 are as follows:
- -Completely re-written from scratch with much cleaner syntax and improved functionality
- -Target OS version detection
- -Added skip diskutil repairPermissions flag
- -Added support for OS X 10.5 Leopard and OS X 10.7 Lion targets
- -Improved support for OS X 10.6 Snow Leopard
- -Removed support for OS x 10.4 completely