zhell Posted March 25, 2009 Share Posted March 25, 2009 For vanilla installs, you often need a proper kernel extensions cache file on your boot volume at "Extra/Extensions.mkext" . This guide shows how to use the Apple-supplied "kextcache" tool to create this file quickly, incorporating kexts from multiple directories and excluding any non-boot kexts such as those from Parallels Desktop (which may lead to kernel panics). All the info for this can be found in the man page of kextcache, but most tutorials seem to ignore that... so here goes my recommended way of calling "kextcache": KEXT_RETAIL="/System/Library/Extensions" KEXT_EXTRA="/Volumes/boot/Extra/Extensions" MKEXT="/Volumes/boot/Extra/Extensions.mkext" kextcache -v 1 -t -l -a i386 \ -m "$MKEXT" "$KEXT_EXTRA" "$KEXT_RETAIL" * -v 1: be verbose (show dependency failures etc.) * -t: Perform all possible tests on the named kext(s) and indicate whether the kext is loadable * -l: only include kexts required for local boot (as specified in the package's Info.plist). This is very important to ensure that no unwanted kexts are loaded too early. For instance, Parallels Desktop kexts can seriously mess up the boot process if they are already loaded by the bootloader (Chameleon/PC-EFI) instead of later on by kextd * -a i386: only include kexts for architecture i386. * -m "$MKEXT": create kext cache file Link to comment Share on other sites More sharing options...
boxman Posted March 26, 2009 Share Posted March 26, 2009 I am liking the boot partition concept more and more. I imagine after everything has been stable for some time that I would like to hide the boot partition. I know I have seen this as a terminal script some where in the forum but is that an option you could add to your script ? cheers Link to comment Share on other sites More sharing options...
zhell Posted March 26, 2009 Author Share Posted March 26, 2009 I imagine after everything has been stable for some time that I would like to hide the boot partition. I know I have seen this as a terminal script some where in the forum but is that an option you could add to your script ? Thanks for the suggestion, I think this would be useful. First off, I would like to gather some feedback. Here's a quick refresher on how you could do it manually: - Determine the UUID of the boot partition: diskutil info /Volumes/boot | sed -E -n -e's/ +Volume UUID: +([A-Z0-9]+)/\1/p' - Edit the file "/etc/fstab" (it probably does not exist yet), and add a line as shown below:UUID=<The UUID you determined above> none hfs rw,noauto In my case, the file "/etc/fstab" looks as follows (everything following a "#" sign is ignored): # Hide bootloader partition UUID=2A1A5F4D-7025-3C2A-81FC-7CF3E96A53AB none hfs rw,noauto # Hide Windows Vista partition UUID=A020FA1E-97D4-4341-BEE6-81BBBD513FBF none ntfs ro,noauto Link to comment Share on other sites More sharing options...
MickB Posted March 26, 2009 Share Posted March 26, 2009 I tried the app (just double-clicked it) and it worked like a charm. This will prove convenient when I try get sleep to work on my rig... One question, though: Could you make it also turn on the ``bootable'' flag of the boot partition? Thx! Link to comment Share on other sites More sharing options...
zhell Posted March 26, 2009 Author Share Posted March 26, 2009 I tried the app (just double-clicked it) and it worked like a charm. This will prove convenient when I try get sleep to work on my rig... One question, though: Could you make it also turn on the ``bootable'' flag of the boot partition? Thx! Thanks for the feedback. Setting the partition active could be done as well in a future version. Link to comment Share on other sites More sharing options...
digital_dreamer Posted May 19, 2009 Share Posted May 19, 2009 Now, this is intriguing. I wasn't aware that you could build the boot cache from more than one directory. Cool. Certainly, this does away with the dependency errors that occur because it most of the commands I've seen only focus on one directory. So, I played around with this last night and it works rather well. The only issue I had is that my Natit.kext doesn't appear to be loading. I got the graphics corruption at boot. I haven't looked into the system.log to see if it's loading (really hadn't had time to mess with it). The other thing that's getting my curiosity is the mention of the "boot" volume. Are we talking about a small partition set aside just for the kexts, etc, just like is done with the EFI partition, except that the EFI partition is normally invisible and part of the GUID setup? I like the /Extra folder setup that Chameleon uses on our boot volume. It allows our files to be visible and easily managed, something that can't be said for the EFI partition. Although it can be made visible, it must be regularly unmounted with the directory "rm" or you'll have issues. So, what are the reasons for using this partition as opposed to the EFI partition, particularly if you want it invisible? Your use of sed to extract the UUID is interesting! I have no idea what the "-E" is for, although I do understand the use of "-e", but it doesn't look to be needed. There are two sed commands here? I figured most would use the more common method: diskutil info /volumes/boot | grep UUID | awk '{ print $3 }' best regards, MAJ Link to comment Share on other sites More sharing options...
Recommended Posts