pfix v3.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. In my last few revisions of the 2.x branch a number of potential problems were revealed to me. Of the reproducible errors – errors due to problems with kextd were the main culprit, even when forced rebuilding of kextcache was done. Though failures such as these were limited to a small number of end users any failure of pfix is unacceptable to me. After extensive testing of many different new methods to resolve all of these issues pfix 3.0 is ready for public release.

This version will take longer to execute than previous versions when correcting permissions and rebuilding caches for a root system volume but it will do so with virtually no possibility of errors. If all you are doing is swapping around a few kexts in /Extra however I have introduced a flag to skip the repair of the system permissions and caches for a very quick operation. Additionally pfix is now designed to operate from /usr/sbin/ like a standard *nix utility and includes a usage output viewable by running “pfix –help” (without the quotes) from a terminal.

Basic Usage: pfix [option]
Example Usage: pfix -s -v 1 -t /

Option       GNU long option      Meaning
-h           –help                Show this message
-s           –skipsystem          Don’t repair /system/library/extensions
-v <level>   –verbose <level>     Set kextcache output’s verbosity level
-t <path>    –target <path>       Path to target partition to run pfix on

A complete list of the changes in v3.0 are as follows:

  • -Completely re-written and restructured code with much cleaner syntax and improved functionality
  • -Improved terminal log output information and format
  • -Added run time flags
  • -Added help flag and usage output
  • -Added skip system repair flag (if you only need to quickly repair /Extra)
  • -Added kextcache/diskutil verbosity flag (no verbosity by default [quiet])
  • -Added target flag (a list of available targets will be displayed by default)
  • -Debugged several functions for improved operation and log output when run from OS X installation devices.
  • -Now removes all system caches prior to rebuilding instead of only removing kext caches.
  • -Repair permissions using diskutil prior to rebuilding caches when targeting root partition. [no longer optional]
  • -Updates prelinked kernel cache & kext info caches prior to rebuilding system kext caches when targeting root.
  • -Created installation package to properly install pfix to /usr/sbin/ so that it is available from any terminal path.

27 thoughts on “pfix v3.0 Released

  1. Hi,

    Does this rebuild the caches in /library/caches/com.apple.kext.caches/startup ?

  2. I ran Pfix 3 from the terminal with the -t command and it fixed permissions on the correct partition. Why doesn’t it do that when just clicking on Pfix? ( See my previous posting )

    • Brian Richmond: If you run pfix 3 without any flags it should prompt you to select from a numbered list, if you enter the number of the volume you wish to repair it will do so, for example if I run pfix without any flags from my USB Installer I am prompted with a list that includes / and /Volumes/OSx86 – being my internal drive that I wish to repair. / is number 1, /Volumes/0Sx86 is number 2, so I simply press the number 2 and then enter and it repairs the correct volume.

      If it does not do this for you, you may want to double check that you have the latest version of pfix and/or download the pfix installer or myhack installer and ensure that it is installed correctly to your system path.

  3. I tried to use Pfix 3 to fix permissions of an OSX86 installation on another partition ( /Volumes/Untitled 2 ) but it always reverts to the booted OSX86 partition ( / )

    I used an earlier version, Pfix 2.3 which indicates that it is repairing the /Volumes/Untitled 2 partition.

    Is there something wrong or does Pfix 3 always indicate that it is repairing the / partition regardless of what’s entered? If there is a problem, how may I fix it?

  4. I am having the exact same problem as Geoff and Rowan and tried both of the listed methods with no luck. I receive the same message, ‘ illegal operation –q’.

    Using leopard 10.5.8, but on a powerpc if this matters.

    Any help greatly appreciated, thanks.

  5. I am running on 10.5.8, similar error “kextcache: illegal option — q”

    regards,
    tan

  6. Running 10.5.7, but I found the problem (I think), I had to put the full path in front of the utility name and use the “-t” option to get it working properly.

    But I’m still getting reboots after Chameleon finishes loading all the kexts, and I think there is a “missing SMBIOS” message but the screen went by too fast.

    Is SL useable on a system with a Pentium D 820 processor and Intel D945GCZ MB?

  7. Unfortunately I’m having problems building my Extensions.mkext file using pfix.

    When pfix executes kextd, kextd just quits with an unknown parameter erros (- – q)

    How can I get past this? Without the Extensions.mkext I just get a reboot while trying to run the SL install disk from a USB drive.

  8. pfix doesn’t seem to want to build the Extension.mkext files, for the last two operations I get this message “Building new extra Extensions.mkext…” followed immediately by “kextcache: illegal option — q”.

    Any ideas on what’s wrong?

    • rowan: What version of OS X are you running pfix on? I think prior to OS X 10.5 the -q option is not available – try using the -v 1 flag (pfix -h for usage instructions).

  9. Hey Conti,

    1. on your blog, the two dashes (- – without the space in between) comes up as a single long dash. this fucks with the “GNU Long option”. Just FYI!

    2. I noticed that pfix uses 32bit versions when making the kextcache. Any chance we could get a flag for changing that to 64bit?

    3. You could consider making the next release adhere to the 80-column width standard! (:

    Thanks for writing a great tool.
    -R

    • Ryan: Pfix builds both 32 and 64 bit kext caches ;) And yes I hadn’t noticed that it was using 83 columns instead of 80, I’ll fix this in the next release thanks for the feedback.

  10. HEY.

    Tnx 4 your time making these fine programs.
    your myhack works like a charm :-)(with my own kexd offcause asus p5k pro)
    AppleHDA gave me the sound back. :-)
    Pfix did so i could remove the dvi to vga again. :-)

    Only dissapointment was from 10.6.3.before update i had a 5-6 spins and 10 second boot time.
    Now i am at 16-22 spins 30 sec boot time. ((really suc*s)big thanks to apple))
    I really think they should have waited a month or so before releasing the new update.
    But okay!!! my hack is always on,so its not a biggie thing.

    tnx bro for being the one who made my hack. :-)

    bossob

    ——————–
    ***Snow Leopard 10.6.3***
    *P5K PRO (ICH9) BIOS 1303**Asus EAH4870/DK/HTDI/1GD5, 1024MB*
    *Intel Core 2 Quad Q6600 2.40GHz 1066MHz 4MB x 2 105W*
    *4xKingston Value RAM DDRII 2GB PC800 CL5**1x WD Raptor WDC WD360ADFD 10000 rpm*
    *2xWD Caviar 500GB SATA2 16MB**My Hack Installer 1.1*
    *EXTRA`S*Evoenabler*FakesSMC.kext*LegacyAppleAHCIPort*LegacyHDAController*
    LegacyHDAPlatformDriver*LegacyYukon2*OSXRestart**DSMOS under a second waiting time*
    12-22 spins,boot time 30 seconds in all.*restart 1 second*

    everything works like a charm.

  11. Thanks for the info that clears it up for me. I now have a usb network on a t61p thinkpad. Video is pretty enough but not quick but overall things are coming together. Great site by the way.

  12. Thanks so much for myhack I have used it to install onto a Lenovo. I am a little confused however when trying to install kexts. I am using a retail snow leopard and getting I am looking to install a usb linksys nic. I found a link for the procedure and one user said they needed the kext in both “/System/Library/Extensions” and to “/Extra/Extensions” so I am assuming they are using the myhack installer but I can’t figure out how do I make a new Extensions.mkext for the “/Extra/Extensions” folder which led me here.

    The multiple locations are confusing me. Should I use the com.apple.Boot.plist in the extras folder or the default system one? should kext go in the e\e fold of s\l\e folder or both. I can’t find information on how these two work together or if they even do.

    Also on another page it says I don’t need pfix v3.0 if I use myhack installer.

    Would it be possible that in a post you can quickly explain how all these things work together? I am so close thanks to myhack but I seem to be stuck on this multiple folder file issue.

    • macconvert: You should use pfix to generate the new extensions.mkext. You should use the com.apple.Boot.plist in extras folder ONLY. The page says you don’t need pfix v3.0 if you use myhack installer because myhack installer (v1.0 final) installs it for you. That does not mean you do not need to USE pfix if you change extensions. It is installed to /usr/sbin by default so run it from a terminal by typing “pfix” without the quotes (type “pfix -h” to get a list of usage flags).

  13. This might make me a bit lazier now :) also good for directing new users to so I wont have to get into the whole , terminal chown chmod kextache stuff. A real time saver. Thx Conti.

  14. Thanks, I suppose it makes more sense this way. The actual point is to have something that never fails :)

  15. Thank you again, your tool has been a real blessing, saved a lot of time and effort. Awesome changes, will try 3.0 shortly. From what I see I’m missing the parameter for choosing whether to run or not ‘diskutil repairPermissions’. I think that’s the only one needed for completely effortless updates.

    • Silencer: There is no longer an option to skip the diskutil repairPermissions, it is required for proper functionality of kextd. If you are not changing anything in /System/Library/Extensions and you have no doubt that the system caches are intact you can use the -s flag to only fix the permissions and rebuild cache for /Extra – saves a lot of time when testing new kexts under /E/E. It does take longer to run pfix v3.0 but it never fails.

  16. Conti:
    Just wanted to say that your work has really helped me and many others. You rock!

    thanks a bunch

    koushka

  17. Are you going to update your myHack installer to include this new version as well?

    That would be very appreciated.

  18. Thanks Conti..

    PFIX has become one of my most valued utilities in my daily struggle to make my hack the best it can be..

    Thanks for all of the hard work.. It is appriciated..

    Abysmal — InsanelyWind.com