Jump to content

Howto: configure Lion to auto generate MKext


  • Please log in to reply
11 replies to this topic

#1
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 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.
Attached File  bootcaches.zip   3.43KB   232 downloads

#2
cili0

cili0

    InsanelyMacaholic

  • FAQ Team
  • 3,008 posts
  • Gender:Male
  • Location:Italy
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.

#3
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts
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

#4
mindlessmissy

mindlessmissy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 99 posts
  • Gender:Male
Seems to work pretty well BUT it seems like some kexts are excluded from the generated Extensions.mkext .. (eg IONetworkingFamily.kext .. )

BUT all in all, GENIUS find ... Thanks ...

#5
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts
The generated mkext contains basic drivers needed for boot (not net-boot) so it is normal.

#6
cili0

cili0

    InsanelyMacaholic

  • FAQ Team
  • 3,008 posts
  • Gender:Male
  • Location:Italy
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

#7
Regi Yassin

Regi Yassin

    Who am I ?

  • Members
  • PipPipPipPipPip
  • 278 posts
  • Gender:Not Telling
how about with

kextcache -mkext /System/Library/caches/blablabla/stratup/extensions.mkext /S/L/E/

is this different?
===============
wrong section, sorry

#8
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

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.

#9
cili0

cili0

    InsanelyMacaholic

  • FAQ Team
  • 3,008 posts
  • Gender:Male
  • Location:Italy
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

#10
bOsSX

bOsSX

    InsanelyMac Protégé

  • Members
  • Pip
  • 11 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.
Attached File  bootcaches.zip   3.43KB   232 downloads


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

#11
hotKoffy

hotKoffy

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts

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

#12
skn

skn

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 214 posts
  • Gender:Male
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>
...






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy