Permissions & KEXT Caches
I have written the following utility which simplifies and automates the process of repairing permissions and rebuilding kext caches. It will test for and prevent a number of common errors that may arise if the manual method (Which I have discussed further below) is used incorrectly. I personally suggest that you use this utility (instead of doing this manually) to reduce or eliminate the potential for user error & to save time.
Please consult the downloads page for a link to the latest version of pfix.
Further documentation and how to do this manually:
One of the most common problems with Snow Leopard on PC’s is incorrect permissions and improperly built kext caches. While it may not always be necessary it is a good idea to correct permissions and rebuild kext caches anytime you modify your extensions or install software which adds new kexts to your system.
To do this manually open a terminal and enter the following commands to repair the permissions on your “/Extra” directory:
$ sudo chown -R 0:0 /Extra
$ sudo chmod -R 755 /Extra
You may also need to repair the permissions on your “/System/Library/Extensions” directory:
$ sudo chown -R 0:0 /System/Library/Extensions
$ sudo chmod -R 755 /System/Library/Extensions
Now build the Extensions.mkext for /Extra/Extensions in /Extra with the following command.
$ sudo kextcache -v 1 -a i386 -a x86_64 -m /Extra/Extensions.mkext /Extra/Extensions
You may also need to rebuild the Extensions.mkext for the “/System/Library/Extensions” directory:
$ sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions
Then you may reboot your system. Please note that the above examples are assuming you want to repair permissions on your root volume ( / ) if you are repairing the permissions on another volume in your system make sure to adjust the path accordingly.
IMPORTANT NOTE: If running these commands from Tiger it is necessary to delete all kext caches instead of rebuilding them. The kextcache utility on Tiger is unable to build Snow Leopard compatible kext caches and as a result any Snow Leopard system which has these incompatible kext caches will fail to boot. The pfix utility (v2.0) detects the OS X version and will apply these changes automatically.
NOTE: I was originally using the find command to set directories to 755 and files to 644 instead of just chmod -R 755. While that method actually sets the correct permissions for your extensions according to the “OS X Standards” there were some failures reported due to a few kexts containing non-standard binaries that required executable privileges. You will find that the majority of vanilla kexts inside /S/L/E have their directories set to 755 and the files inside of them are 644. Thus this is the ‘proper’ method to use when correcting permissions for most of them. The few that have executable binaries inside of them however, make it impractical to achieve perfection. While this is not absolutely required for them to ‘work’ it is a good practice to learn how to handle unix permissions properly and to not have files set to executable (755) unless absolutely required for their operation.
With that said I am now advising everyone to use the chmod -R 755 method I have posted above and to use diskutil to repair the permissions on your snow leopard installation once you get it up and running. More information can be found on the pfix2.0 release page linked above and in the comments on this page.
Tags: Hackint0sh, OS X, Snow Leopard, Troubleshooting
This entry was posted on Saturday, September 19th, 2009 at 15:37 by Conti and is filed under Working with OS X, myHack Utilities. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

abdo 5: what method did you use to enable audio support before? dsdt patch? voodooHDA? did you ensure to put the AppleHDA 10.6.2 in /S/L/E ? what audio device do you have? I just need a more clear description to really know what to suggest to you.
Hi
i installed my hack on mac 10.6.3 on my toshiba laptop core2duo
1- my sound was work good it stoped after install my hack i did as written top and install the AppleHDA 10.6.2 put no thing happened
2- my laptop screen was not working i used an external screen put after installing my hack it became ok.
so i need to install my hack to enable laptop screen put the sound stopped.
what is the problem
thanks
pesto: Simple solution would be to add an empty /System/Library/Extensions folder to the device in question.
Alternatively you could remove the following check, but I would not recommend this to anyone other than experienced users:
Is there a way to tell PFIX to repair/touch my “extra” folder which is not on the system partition (error “/Volumes/… does not appear to contain a valid OSx86 installation”)? Doing it manually each time I change kext is a pain in the butt.
THX for any help :)
Grand merci pour ce merveilleux myHack qui simplifie au maximum l’installation de Snow sur PC. A son auteur, je dis “bravo” et bonne continuation.
Je vous prie de m’excuser pour la langue: je ne parle pas anglais.