Re: Tiger kextcache command
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Hi Gilles, - Kevin On May 12, 2005, at 9:08 AM, Garth Cummings wrote: On May 12, 2005, at 1:23 AM, Gilles VayssiƩ (TRI-EDRE) wrote: Hi, i encounter a problem with the kextcache command under Tiger (8A428). The supported way to do this is: sudo touch /Volumes/ExternalDisk/System/Library/Extensions _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... I too ran into this issue while making the Darwin 8.0.1 CDs, where it won't work to simply touch the Extensions directory, since while booting from a CD, the mkext cannot be written back out =). The issue is that kextcache puts a temporary file in /tmp and then attempts to rename it (using rename(2)) to the destination. I assume this is done so that the mkext will be replaced atomically. As you found, this doesn't work so well when the destination is not the root device. The workaround is to set the TMPDIR environment variable prior to running kextcache. Make sure TMPDIR points to a path that is on the same volume as the destination. Also, be sure to specify the correct kernel to use (-K) when you're targetting another volume. Using your example: $ export TMPDIR=/Volumes/ExternalDisk/private/var/tmp $ sudo kextcache -l -K /Volumes/ExternalDisk/mach_kernel -m /Volumes/ ExternalDisk/System/Library/Extensions.mkext /Volumes/ExternalDisk/ System/Library/Extensions I would like to update cache on an external volume. Why? Because on startup, the volume is read online, so the caches can't be updated. So i need to update the cache before booting on this volume, from an "alive" system. Here is how i did under Panther, and it worked well: sudo kextcache -l -m /Volumes/ExternalDisk/System/Library/ Extensions.mkext /Volumes/ExternalDisk/System/Library/Extensions When the volume is next booted, the boot loader will notice that the KEXT caches are out of date and rebuild them. The problem with manually tweaking the caches is that each version of Mac OS X implements a different set of caches, and how they work is considered an implementation detail that developers shouldn't care about. Touching the Extensions directory will assure that the proper caches are rebuilt on all versions of Mac OS X. This email sent to site_archiver@lists.apple.com
participants (1)
-
Kevin Van Vechten