Jump to content

Howto: configure Lion to auto generate MKext


hotKoffy
 Share

12 posts in this topic

Recommended Posts

I've find the way to configure kextd to generate mkext instead of pre link kernelcache in standard directory /System/Library/Caches/com.apple.kext.caches/Startup/.

It is useful if you are using a custom kernel like /mach_kernel_atom because kernelcache is built with /mach_kernel.

 

For this I've modified the file /usr/standalone/bootcaches.plist of lion, replacing in "PostBootPaths" dictionary the "kernelcache v1.1" dictionary with "MKext2" dictionary found in Snow Leopard bootcaches.plist.

 

This file seems to be not altered by updates. (testing with 10.7 --> 10.7.2 combo)

 

Here is my files as an exemple.

bootcaches.zip

Link to comment
Share on other sites

Hi hotKoffy,

 

I replaced the original /usr/standalone/bootcaches.plist with the one you provided. I tried to boot twice, but each time the bootloader loads every single kext in /S/L/E.

 

Do i have to perform some further operations?

 

Thanks in advance,

cili0.

Link to comment
Share on other sites

please correct me if I'm wrong. Is it true to say that your modified bootcaches.plist avoid to execute the command

 

sudo kextcache -v 2 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions

 

every time we add a new kext?

 

thanks,

ciao!

cili0

Link to comment
Share on other sites

please correct me if I'm wrong. Is it true to say that your modified bootcaches.plist avoid to execute the command

 

sudo kextcache -v 2 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions

 

every time we add a new kext?

 

thanks,

ciao!

cili0

 

Yes, kexd daemon will do it for you every time the directory /S/L/E is modified.

Link to comment
Share on other sites

Thanks for your answer. Do you think that this will avoid the error 'still waiting for root device' for those (like me) who are having trouble using Extension.mkext with 10.7.2?

 

I was forced to place all my extra kexts from /E/E to /S/L/E and use UseKernelCache=Yes to boot.

I would prefer definitly to keep the two kinds of kext separeted, but i can't do that anymore with 10.7.2.

 

Thanks in advance,

ciao!

cili0

Link to comment
Share on other sites

I've find the way to configure kextd to generate mkext instead of pre link kernelcache in standard directory /System/Library/Caches/com.apple.kext.caches/Startup/.

It is useful if you are using a custom kernel like /mach_kernel_atom because kernelcache is built with /mach_kernel.

 

For this I've modified the file /usr/standalone/bootcaches.plist of lion, replacing in "PostBootPaths" dictionary the "kernelcache v1.1" dictionary with "MKext2" dictionary found in Snow Leopard bootcaches.plist.

 

This file seems to be not altered by updates. (testing with 10.7 --> 10.7.2 combo)

 

Here is my files as an exemple.

bootcaches.zip

 

I've tried your method and after repair permission and touch extension folder but my system, at boot, load all kext. What about your bootloader? Where are you installed it (on Efi or root HD)?

Thanx in advance

Link to comment
Share on other sites

Thanks for your answer. Do you think that this will avoid the error 'still waiting for root device' for those (like me) who are having trouble using Extension.mkext with 10.7.2?

 

Indeed I was having this trouble before I do the modification. Now its OK :)

 

I've tried your method and after repair permission and touch extension folder but my system, at boot, load all kext. What about your bootloader? Where are you installed it (on Efi or root HD)?

Thanx in advance

 

Do you have verified that the mkext is generated in /System/Library/Caches/com.apple.kext.caches/Startup/ ? if not, sudo touch /S*/L*/Ex*

Do not put usekernelcache = yes in chameleon

 

I'm using root HD and no kext in /E/E

Link to comment
Share on other sites

  • 1 month later...

EDITED: It worked!!! I've figured out what the problem was... After playing yesterday with the kexts I forgot to copy the original IOATAFamiliy.kext back to /S/L/E... My mistake... :whistle:

 

Indeed I was having this trouble before I do the modification. Now its OK :D

 

Do you have verified that the mkext is generated in /System/Library/Caches/com.apple.kext.caches/Startup/ ? if not, sudo touch /S*/L*/Ex*

Do not put usekernelcache = yes in chameleon

 

I'm using root HD and no kext in /E/E

Hi hotKoffy,

 

I've changed my /usr/standalone/bootcaches.plist according to your instructions but it didn't work (refer to the changes hereafter). No Extensions.mkext file is generated and I'm still getting the "Still waiting for the root device" message when booting Lion 10.7.2.

 

I moved all kexts from /E/E to /S/L/E and put "UseKernelCache = No" in Chameleon.

 

I don't know what to do... :( Any suggestions?

 

Thank you!!!

 

...
   <key>MKext2</key>
	<dict>
		<key>ExtensionsDir</key>
		<string>/System/Library/Extensions</string>
		<key>Path</key>
		<string>/System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext</string>
		<key>Archs</key>
		<array>
			<string>i386</string>
			<string>x86_64</string>
		</array>
	</dict>
...

Link to comment
Share on other sites

 Share

×
×
  • Create New...