InfiniteMac OSx86  


Reply
 
Thread tools Display modes
  #1  
Old 08-22-2009, 04:32 PM
DocShadow's Avatar
DocShadow DocShadow is offline
Panther
 
Join Date: May 2009
Location: Ottawa, ON, Canada
Posts: 106
Why do some kexts refuse to load?

Playing around trying to optimize my system. I've noticed that sometimes a kext will not load if it's in E/E but will is it's in S/LE. Other times a kext will not load no matter which directory you place it in.

I move a kext to E/E or intall to S/LE and then run Kext Utility and Disk Utility.

Any ideas why and how to fix?

Gigabyte EX58-UD5 - i7 920 @ 3.2 GHx - eVGA 8800GT
Asus P5Q Deluxe - E8400 @ 3.6 GHz - Asus 7900GT
iMac 2.2 GHz - 4 MB
Reply With Quote
  #2  
Old 08-22-2009, 06:00 PM
lanceomni's Avatar
lanceomni lanceomni is offline
 
Join Date: Nov 2008
Location: Florida, US
Posts: 521
Kernel Extensions

Kexts - Kernel Extensions

1. Should reside in the /System/Library/Extensions folder
2. Should have permissions set to 755
3. Should have the User & Group set to Root & Wheel
4. Should be updated in the Extensions.mkext

5. KextHelper
6. Backing up

2. Permissions
Permissions can be set by running the following in Terminal:
Code:
sudo su
chmod -R 755 /System/Library/Extensions/insertkextnamehere.kext
sudo su grants you privileges to make these changes. Kext are actually folders with files inside so -R applies these permissions recursively.

3. Ownerships
Ownerships can be set by running the following in Terminal:
Code:
sudo su
chown -R root:wheel /System/Library/Extensions/insertkextnamehere.kext
sudo su grants you privileges to make these changes.

4. Extensions.mkext (/System/Library/Extensions.mkext)
OSX builds a cache of all the required kexts for your system to boot. This shortens the boot process. This cache needs to be rebuilt with the new kext.

Some kexts will start effecting the system before a reboot. This depends on the kext and also that there was not an existing one of the same name or one which causes conflict. OSX should see that the Extensions folder had been modified and should rebuild the cache.

You can rebuild the cache on restart by:
1. Running the touch command on all the extensions in the /S/L/E folder. This resets the timestamp of the files and OSX should see this and prompt a rebuilding.
Code:
sudo su
touch /system/Library/Extensions
2. Alternatively you could use the -f boot-flag on startup as this also prompt a rebuild.
3. The simplest way to have the cache rebuilt is to remove Extensions.mkext and restart. You can simply drag it into the trash or run:
Code:
rm -Rf /System/Library/Extensions.mkext
I prefer to do all three. Redundancy!

5. Kext Helper
If you hit the Advanced checkbox you will see all of the above actions take place. I prefer to do them manually as then I know for sure I have installed them properly.

6. Backing Up
The most important thing to remember is that you should always keep a backup of your working system. At a bare minimum keep a backup of your extensions folder and your kernel.
1. Make a backup copy of your kexts. First we will make a directory called "backup" in our root directory to store them. Open Terminal and type:
Code:
mkdir /backup
2. Change directories to /System/Library This will shorten some of the commands we have to type in.
Code:
cd /System/Library
3. Copy your kexts to the new "backup" folder.
Code:
cp -r Extensions/ /backup/
4. Make a backup copy of your existing kernel and name it mach_kernel.backup
Code:
cp -r /mach_kernel /mach_kernel.backup



💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers.


MOBO: Z77MX-QUO-AOS CPU: Core i7 3770K GPU: MSI N760 TF 2GD5/OC Case: Modded MacPro2,1
Memory: 32GB Corsair Vengeance (CMY32GX3M4A1600C9) Wifi: Airport Extreme bcm94321MCA BIOS: HermitCrab Labs H3A.816M
Monitor: AOC Q2963Pm 29" WFHD 2560x1080 21:9
Interests: KDE on Apple Darwin, Keeping it real with the command line, Helping those that help themselves
Reply With Quote
Reply