Jump to content

Slow boot with Lion+Chameleon (processing all extensions during boot)


  • Please log in to reply
22 replies to this topic

#1
FuManchu84

FuManchu84

    InsanelyMac Protégé

  • Members
  • PipPip
  • 65 posts
I already successfully installed Lion a few times but booting up with Chameleon takes VERY long!

When I press Enter after selecting the Lion-partition in the screen becomes grey and stays like this for maybe 2 minutes until the dark-grey apple logo with the spinning wheel under it appears. From then on it feels like booting up normal so the slow phase is the grey-screen phase before the apple logo appears. I'm booting from a USB-disk but I don't think this is the reason why it's taking so long.

When I boot with "-v" to show me what's happening during that greyscreen phase it shows me that it's reading all the kernel extensions. It goes through every single extension showing "reading extensionxyz.kext" while every extension takes about half a second which explains the estimated two minutes.

I tried different Versions of Chameleon (2.0 RC5 r752 and r1135) and different versions of Lion (DP4 and GM) but it's the same phenomenon in every combination. I also repaired permissions and rebuilt the kernel cache using Kext Wizard but that didn't help. Any suggestions?

#2
Effendi

Effendi

    InsanelyMac Protégé

  • Members
  • PipPip
  • 87 posts
  • Gender:Male
  • Location:Vienna, Austria
Usekernelcache=Yes fixes that but the system won't load anything from /E/E as a result. Either install everything to /S/L/E or live with the long boot. For now at least.

#3
FuManchu84

FuManchu84

    InsanelyMac Protégé

  • Members
  • PipPip
  • 65 posts

Usekernelcache=Yes fixes that but the system won't load anything from /E/E as a result. Either install everything to /S/L/E or live with the long boot. For now at least.

Ok, thanks but that doesn't sound so good. Do you think there will be a soon improvement in a Chameleon update?

#4
Effendi

Effendi

    InsanelyMac Protégé

  • Members
  • PipPip
  • 87 posts
  • Gender:Male
  • Location:Vienna, Austria
Does not really matter what I think as I am not one of the dev's :P

#5
FuManchu84

FuManchu84

    InsanelyMac Protégé

  • Members
  • PipPip
  • 65 posts
Ok, no good news. I added UseKernelCache=Yes to my boot.plist. The next boot was exactly as before (processing every extension). But at the next boot it skipped processing the kexts but then it freezes at that point (now that happens every time):
Attached File  Foto_1.JPG   594.65KB   123 downloads

My boot.plist looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Default Partition</key>
	<string>hd(3,3)</string>
	<key>Graphics Mode</key>
	<string>1680x1050x32</string>
	<key>GraphicsEnabler</key>
	<string>Yes</string>
	<key>Instant Menu</key>
	<string>Yes</string>
	<key>Kernel</key>
	<string>mach_kernel</string>
	<key>Kernel Flags</key>
	<string>-v</string>
	<key>Legacy Logo</key>
	<string>Yes</string>
	<key>Rescan Prompt</key>
	<string>Yes</string>
	<key>Theme</key>
	<string>CLEAN_MAC_OSX_BOOT</string>
	<key>Timeout</key>
	<string>5</string>
	<key>UseKernelCache</key>
	<string>Yes</string>
</dict>
</plist>


#6
JohnnyD

JohnnyD

    InsanelyMac Protégé

  • Members
  • Pip
  • 26 posts
  • Gender:Male
  • Location:Ohio, US
  • Interests:Computers

Ok, no good news. I added UseKernelCache=Yes to my boot.plist. The next boot was exactly as before (processing every extension). But at the next boot it skipped processing the kexts but then it freezes at that point (now that happens every time):
Attached File  Foto_1.JPG   594.65KB   123 downloads

My boot.plist looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Default Partition</key>
	<string>hd(3,3)</string>
	<key>Graphics Mode</key>
	<string>1680x1050x32</string>
	<key>GraphicsEnabler</key>
	<string>Yes</string>
	<key>Instant Menu</key>
	<string>Yes</string>
	<key>Kernel</key>
	<string>mach_kernel</string>
	<key>Kernel Flags</key>
	<string>-v</string>
	<key>Legacy Logo</key>
	<string>Yes</string>
	<key>Rescan Prompt</key>
	<string>Yes</string>
	<key>Theme</key>
	<string>CLEAN_MAC_OSX_BOOT</string>
	<key>Timeout</key>
	<string>5</string>
	<key>UseKernelCache</key>
	<string>Yes</string>
</dict>
</plist>


I had the same issue. I did have to install all the kexts to /S/l/E. Then I used Kext Wizard to rebuild permission and caches, Im sure there are commands to pass in command line to do this, but kext wizard gives a nice easy to manage GUI for all kext operations.

You can also do this in Command prompt to rebuild it.

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

#7
FuManchu84

FuManchu84

    InsanelyMac Protégé

  • Members
  • PipPip
  • 65 posts
No good news here... The behavior with "UseKernelCache=Yes" is like this now (chronologically):

- I install all the kexts to s/l/e with Kext Wizard and add "UseKernelCache=Yes" to the boot.plist
- restart -> all kexts are being processed (which is SLOW and my actual problem)
- next restart -> kexts aren't processed but boot is stuck at a certain point (see screenshot above)
- next restart -> stuck again

- When I repair permissions and rebuild caches again the next boot again processes all kexts again
- next restart -> stuck

So I dont't know what I'm doing wrong. My options now are a very slow boot or no boot at all. Any suggestions?

Seems I messed up a little bit. I deleted the kexts and re-installed them and now it works. I don't know what went wrong the first time. Sorry for the spam...

#8
Drfrag

Drfrag

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Gender:Male
  • Location:Brazil

No good news here... The behavior with "UseKernelCache=Yes" is like this now (chronologically):

- I install all the kexts to s/l/e with Kext Wizard and add "UseKernelCache=Yes" to the boot.plist
- restart -> all kexts are being processed (which is SLOW and my actual problem)
- next restart -> kexts aren't processed but boot is stuck at a certain point (see screenshot above)
- next restart -> stuck again

- When I repair permissions and rebuild caches again the next boot again processes all kexts again
- next restart -> stuck

So I dont't know what I'm doing wrong. My options now are a very slow boot or no boot at all. Any suggestions?

Seems I messed up a little bit. I deleted the kexts and re-installed them and now it works. I don't know what went wrong the first time. Sorry for the spam...


Have you tried to move all kexts from /extra/extensions to /system/library/extensions and then try to rebuild caches or use "UseKernelCache=Yes" on com.apple.boot.plist?

I see that you have a motherboard very similar to mine. I used to have sleep and wake functioning well on Snow Leopard only with DSDT hacks (Masterchief's hacks), but with Lion I cannot wake up from Sleep and have my BIOS been erase after trying to Sleep. How did you fixed that on your Lion's install?

#9
whitegerry

whitegerry

    InsanelyMac Protégé

  • Members
  • PipPip
  • 59 posts
  • Gender:Male
add "GUI=no" to the boot.plist

#10
vboyz

vboyz

    InsanelyMac Protégé

  • Members
  • PipPip
  • 69 posts
I found that if you do not use -v then it boots much quicker. Only use -v when u have to do debug, but if it's working, I don't see why -v for.

#11
Effendi

Effendi

    InsanelyMac Protégé

  • Members
  • PipPip
  • 87 posts
  • Gender:Male
  • Location:Vienna, Austria
Sending the debug messages to the screen also takes processing time which can be saved by omitting -v on boot.

#12
Mr Giggles

Mr Giggles

    InsanelyMac Protégé

  • Members
  • Pip
  • 32 posts
  • Gender:Male
  • Location:University of Iowa
Yes, i have the same issue on 10.7.
My SL install would crush the boot time of SL, its quite strange. I'm using a SSD and this boot process makes owning one irrelevant. my old disk drives can crush my SSD when booting SL vs lion. (although not once booted - heh)

I'll poke around the chameleon camp to see if anyone's posted there

#13
einsteinx2

einsteinx2

    InsanelyMac Protégé

  • Donators
  • 19 posts
  • Gender:Male
I'm having the same issue. The interesting thing, is that when I used my Lion install USB stick to boot it didn't check all kexts (I'll have to try it again to verify it still does that). Also IIRC, when I had no other drives but my boot drive installed, and booted from my boot drive not USB, it didn't do it either. Only when I also have my clone boot drive installed and boot from my regular boot drive it checks all kexts. When I get some free time I'll test each case again to verify, but in any case it seems there is something causing it to check all kexts when other times it doesn't. Now just need to figure out why it does in some cases and not in others.

#14
MTWomg

MTWomg

    InsanelyMac Protégé

  • Members
  • PipPip
  • 79 posts
It's a Lion issue. Lion's kerel doesn't support loading the kextcache of directories other than SLE.

If you switch to XPC, it works around this by doing a bunch of trickery (loads the kexts before loading the kernel)

You can also recompile the kernel with this fixed.

#15
Nixwiz

Nixwiz

    InsanelyMac Protégé

  • Members
  • Pip
  • 27 posts

It's a Lion issue. Lion's kerel doesn't support loading the kextcache of directories other than SLE.


Thanks!


I had the same Problem here and
sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions
fixed it




greetz

N.

#16
cubswinfllclssic

cubswinfllclssic

    InsanelyMac Protégé

  • Members
  • PipPip
  • 85 posts
  • Gender:Male
  • Location:Elmhurst, IL

Thanks!


I had the same Problem here and

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




greetz

N.



Worked for me! Still loads the ones in /Extra/Extensions/ as well, which is good because I was worried that it wouldn't.

Note: You DON'T need to place all your extensions in /System/Library/Extensions in order for this to work. Chameleon loads the kexts in /Extra/Extensions first, then OS X boots the kextcache.

#17
wizzord

wizzord

    InsanelyMac Protégé

  • Members
  • Pip
  • 29 posts
  • Gender:Male
Does it have any influence on the boot time whether or not all extensions are in in S/L/E => kextcache ?

#18
miliuco

miliuco

    InsanelyMac Sage

  • Donators
  • 396 posts
  • Gender:Male
  • Location:Spain
As whitegerry said, using GUI=No in com.apple.Boot.plist also solves this problem but you loose chameleon graphical interface.

#19
cubswinfllclssic

cubswinfllclssic

    InsanelyMac Protégé

  • Members
  • PipPip
  • 85 posts
  • Gender:Male
  • Location:Elmhurst, IL

Does it have any influence on the boot time whether or not all extensions are in in S/L/E => kextcache ?


Slightly, I suppose-- the extensions in /Extra/Extensions are injected at boot-time, meaning that they are loaded and processed individually. Using a kextcache, the extensions in /System/Library/Extensions are cached.

If you have LOTS of extensions in/Extra/Extensions, just build an Extensions.mkext in that folder as well and Lion will load it like the one in /System/Library/Extensions, rather than loading each kext individually.

#20
nesnfsn

nesnfsn

    InsanelyMac Protégé

  • Members
  • Pip
  • 37 posts
  • Gender:Male
  • Location:SE USA

Slightly, I suppose-- the extensions in /Extra/Extensions are injected at boot-time, meaning that they are loaded and processed individually. Using a kextcache, the extensions in /System/Library/Extensions are cached.

If you have LOTS of extensions in/Extra/Extensions, just build an Extensions.mkext in that folder as well and Lion will load it like the one in /System/Library/Extensions, rather than loading each kext individually.

Could you spell out the Command Line instructions that have to be entered for the kexts in /Extra/Extensions folder?

More basic question in addition, do I have to repair permissions for kexts within /Extra/Extensions when I modify or replace kexts within that folder as well?

Looking forward to your guidance on both questions,
nesnfsn in sunny South Florida





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