
02-03-2009, 03:00 AM
|
 |
Panther
|
|
Join Date: Dec 2008
Location: Hackensack, NJ
Posts: 240
|
|
[How To] Prelinked Kernel
This guide is verbatim copied from InsanelyMac, written by realityiswhere.
Quote:
Prelinked kernels have been around for a while, but not used a whole lot by the general public.
This python script has been made to allow anyone to generate their own prelinked kernel(s) very easily.
Currently it only works for the current system volume you're on, not other /Volumes/ , but I'll work on it 
Concept:
Prelinked kernels are generated once your system is up and running, and they are pretty much a cache of all your extensions/your current kernel rolled into one.
The upshot/benefit of this is that once it's generated, if you hose your current install/any of your extensions, you have a perfect working copy of your extensions/kernel when they *were* working (ie: when you generate it) to fall back on to boot into so you can fix any errors you may have made.
You can make as many as you want/need, the only caveat for booting them is that they must be placed in the root directory.
Script method:
1. Download the script from: http://localhostr.com/files/c19811/prelink.py.zip
2. I will assume it downloads to your "Downloads" folder (the one to the left of the trash in the dock, the absolute path being /Users/<username>/Downloads/)
3. Open a terminal, and type:
Code:
sudo python ~/Downloads/prelink.py
4. It will prompt you and go through the naming/placement of the new kernel, in order to be able to boot off of the kernel it must be at root, aka: /
Manual method:
Anyone who wishes to do it manually without the python script, the code is as follows:
Code:
kextcache -a i386 -K /mach_kernel -c /tmp/mach_kernel.prelinked /System/Library/Extensions
Then you just need to repair permissions the normal way:
Code:
sudo chown 0:0 /kernelname
sudo chmod 644 /kernelname
Utilization:
At the f8 boot prompt, just type the kernelname when it's in your root directory, so say you named it testkernel, and you wanted to boot it in verbose mode, with -v.
At the f8 boot prompt you would type: And that's it, any questions feel free to ask.
|
💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers.
Mac OS X Leopard 10.5.8 (9L30) | Chameleon 2.0 RC3 | Intel Pentium 4 3Ghz 800Mhz FSB HyperThread 1MB L2 cache SSE3 1MB L2 cache works, cosmetic display of 512KB L2 cache | Asus P4V8X-MX VIA Chipset, VIA-VT8237 Southbridge | AC97 VIA8237 | Dual 1GB 333Mhz DDR SDRAM | nVidia PNY GeForce 7600GS 512MB 8x AGP DVI/TV-Out/VGA [NVinject 0.2.1; QE/CI/QuartzGL/Rotation] | Darwin Kernel Version 9.7.0: Sun Jun 14 20:48:28 IST 2009; Voodoo 2.0 Intel alpha3 :xnu-1228.12.14/BUILD/obj/RELEASE_I386 i386
Last edited by cmdshft; 02-03-2009 at 03:04 AM.
|