pfix v2.0 Released

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. I have taken the feedback I have received over the last month since the initial release and attempted to make a more solid and universal solution that eliminates as many potential problems as possible and provides intelligent feedback to the user to help ensure proper usage.

Basic usage instructions:

Run this script by double clicking it in finder or using the command “sudo /path/to/pfix” from a terminal if it says “command not found” or “Permission denied” you must fix the permissions to make the script executable using the command “sudo chmod 755 /path/to/pfix” before running.

IMPORTANT NOTE: This script is intended to be used for correcting permissions and building kext caches on Snow Leopard ONLY! It can be run from Tiger, Leopard or Snow Leopard but you MUST target a Snow Leopard Volume!

Changes since v1.2:

  • -Reverted to chmod -R 755 *[1]
  • -Added an OS X Version Check *[2]
  • -pfix now functions correctly on OS X 10.4 “Tiger”
  • -Kexts are now installed to /Extra/Extensions *[3]
  • -Added diskutil repairPermissions / command *[4]
  • -Added function to delete kext caches if pfix was run from OS X 10.4 *[5]
  • -Verbose output is now written to pfix.log for debugging purposes and simplification of terminal output.

*[1] A problem arose which is discussed in more detail in the comments HERE that caused a failure in SMB due to a binary inside of a particular kext that required executable permissions. This is a potential issue for other kexts and although rare it poses enough of a problem that it needed to be corrected.

*[2] The kextcache utility on older versions of OS X (10.4 “Tiger” and earlier) can not create snow leopard compatable mkext’s. Which of course will cause a boot failure of snow leopard. The solution was to test for OS version and remove caches when pfix is running on older versions of OS X to force snow leopard to boot from the kext files directly. This is also why I have reverted to using /Extra/Extensions instead of /Extra/CustomExtensions which would not boot without a proper mkext inside of /Extra.

*[3] As mentioned in *[2] the primary reason for doing this was to re-enable the functionality of -f (ignore kext caches) command in chameleon and allow the system to boot without kext caches. In older revisions of pfix and the myHack installer I used /Extra/CustomExtensions directory to correct an error that was happening to many people using PC EFI 10.1 when booting Snow Leopard. Since Chameleon RC3 & PC EFI 10.3 I have not heard a single report of that error so it no longer appears to be a problem and this should no longer be required.

*[4] This will only be ran if the script is being run on the root partition [/] of a running Snow Leopard installation. Due to the fact that I have now granted executable permissions to many files that do not require it so that others which do will not fail (as mentioned in *[1]) it is nessisary to revoke those permissions and set them as correctly as possible using the diskutility’s internal permissions database. This command however will not work on disks mounted under /Volumes so if you have run pfix from another partition it will be nessisary to either run pfix again on the snow leopard system after booting to it or to go into disk utility manually and run the command yourself.

*[5] As metioned in *[2] & *[3] this has been done to ensure that snow leopard partitions that have been repaired or modified from an older OS X operating system which can not correctly build kext caches for snow leopard will not fail to boot. It will be nessisary to run pfix again or manually build these caches from inside of a working snow leopard install for proper operation. (Kext caches help to speed up the boot process).

NOTE: I have been asked on IRC “it possible to use name of /extra/extensions as a parameter? (for example mine is /extra/extensions_)”. If you haven’t read my release notes on the v2.0 page as I stated there the reasons for using other Extensions directories that used to exist are no longer a problem as far as I know since pc efi 10.3. However, if for some reason you really want to use a different directory name just open up the script in a text editor, search for the EXTRA_KEXT=”$VOLUME/Extra/Extensions” line and change it. ;)

For further information about permissions and kext caches please review this post.

3 thoughts on “pfix v2.0 Released

  1. hi,
    many thanks for your sharing, you are great.
    I have 2 problems.
    1. I follow your guide and install 10.6 + myhack utilities
    but I have no sound.
    2. it will be great ti include sound support
    I have quad 9550 + EP35-DS3P
    what about updated ?

    again many thanks for your sharing your knowledge

  2. Hi Conti. Leo doesn’t recognize -mkext1/2 options! It handles this options like -m so, this line:
    sudo kextcache -v 1 -a i386 -a x86_64 -mkext2 Extensions.mkext kexts
    … outputs a file named “kext2” to Home folder and also makes kextcache try to add Extensions.mkext as a repository.
    This i already knew but, lack of time and real need to create kext cache from Leo, kept me from testing it properly. I also had some “confusing results” on previous tests so, i’ve been all over it for past 24h and managed to finally clear my doubts.. well, most of them :)

    That’s it…
    See ya

    • Azimutz: Thank you for the feedback! I haven’t personally been able to test this under leopard. I was previously using just -m syntax but it does fail when used from Tiger, perhaps it has something to do with tiger not being able to recognize x86_64 arch. I only changed to -mkext2 because some had suggested that it was somehow better syntax and verbosity… I will make some adjustments to pfix and release a new build sometime later today, I have also noticed that it doesn’t properly generate the pfix.log if double clicked from finder in the root directory so I’m going to try and fix that as well.