MacOS – How to replace the original AppleIntelCPUPowermanagementClient.kext in OS X Lion

kernel-extensionsmacos

I was playing around with Coolbook and stupidly enough deleted the two kernel extensions (kexts) without saving them to a backup location.

How can I recover just AppleIntelCPUPowermanagementClient.kext and AppleIntelCPUPowermanagement.kext without reinstalling my OS?

These files exist in /System/Library/Extensions/ and I am running OS X Lion 10.7.3 preferably. I have searched for these on internet downloads, but can't find any and wouldn't want to blindly trust them if I can't tell they are unaltered.

Best Answer

The first thing you should try is installing the OS X Lion Update 10.7.3 (Client Combo). If that doesn't replace those files then you'd have to reinstall OS X over your existing install.

However, since you're already messing around inside the System folder, you may be interested in trying to copy those files from your Recovery HD partition. To do this, you need to mount the Recovery HD, then mount the Base System image on it.

  1. Mount the Recovery HD in Terminal with this command:

    diskutil mount "Recovery HD"
    
  2. Mount the BaseSystem.dmg with this command:

    hdiutil mount /Volumes/Recovery\ HD/com.apple.recovery.boot/BaseSystem.dmg
    
  3. You can then try copying the files from the "Mac OS X Base System" disk image to your system folder. After copying, make sure the owner/permissions are correct (running Disk Utility's repair permissions would be a good idea).

I haven't tested this, but the file sizes of each is the same in both the Base System image and the full install of OS X, so it seems likely they're the same.