16 July 2010

Alter EFI v1.4

It's faster, better, and totally more innovative in design and functionality! The new Mercedes Benz E-class Cabriolet!

Nah, that's not how I want to introduce the new version of this little application that will help you manage EFI boot on your HP Mini 311.

First of, some history (this is really short). The script was a gift from a friend of mine, Kappy.
"RE: A gift
I wrote a little AppleScript to automate the process of rebuilding Extensions.mkext when modifying the EFI.  It's sort of like Dalton's Upgrade 1.0 program.  I did this because I have had continued problems with Upgrade quitting upon launch..."
Actually, the "Dalton's Upgrade 1.0 program" in the message above is UpdateEFI, specifically versions 1.3 and down. But the code is not taken from that UpdateEFI version (note though that the latest UpdateEFI 2's entire code is open, made by MistaBishi). Alter EFI's roots is Kappy's own personal attempt to recreate the features of the utility, taking inspiration from the InsanelyWind people.

Elated to finally have an app I could use, one that didn't patch IntelGMA950 kexts for me (cause that didn't make sense with the HP Mini 311 Ion graphics chipset), I found myself constantly using Alter EFI and adding some tweaks here and there. Hence Alter EFI was on v1.2 when first launched to the HP Mini 311 Darwin Project community.

The workflow for Alter EFI is simpler. There are only two options (three if we include "Cancel"):
1. "Edit Others" - for simple mounting of EFI; useful when you only want to edit boot plist, smbios.plist, swap dsdt - tasks that do not removing or installing kexts.
2. "Edit Kexts" - for installing or removing kexts; rebuilds Extensions.mkext automatically.

Until v1.3, the option "Edit Kexts" rebuilt the mkext from only /EFI/Extra/Extensions. But recently, it has been reported that combining /Extra/Extensions/ and /System/Library/Extensions/ for the Extensions.mkext has solved the "blank screen on wake during graphical boot mode" without system instability. And so, that kind of Extensions.mkext has  been adapted for the next Alter EFI version. The "Edit Kexts" will now create the Extensions.mkext much like how UpdateEFI2 creates it.

- Mounts and unmounts EFI volume automatically
- Opens a Finder window automatically at /Volumes/EFI/Extra/ for option "Edit Others" and /Volumes/EFI/Extra/Extensions/ for "Edit Kexts".
- Permissions are automatically configured for the /Volumes/EFI/Extra/ and /Volumes/EFI/Extra/Extensions/ so you can edit plists and delete kexts respectively without encountering the "You do not have enough permissions" blocking message from OS X.
-Permissions are also configured in such a way that when you're in "Edit Others" mode, you cannot change anything inside the Extensions folder without first authenticating (if you're not altogether blocked specifically when deleting a kext). Same is true for when you're in "Edit Kexts" mode, you cannot change anything in the Extra folder (com.apple.Boot.plist, smbios.plist, DSDT.aml).
- Includes basic error handling - EFI mounting/unmounting.

In keeping with the spirit of openness and love of knowledge shown by caring to share it to everyone willing to learn, the source script is included as part of the download package. Note though that the main Alter EFI application is saved as "application - run only mode". This is because Alter EFI seems to work better* when saved as such. 

*When saved as editable script, once the workflow runs through an error, instead of running it through the error handling routine, the AppleScript Editor application launches and opens the script for editing, disrupting the workflow and causing confusion to the end user.


MistaBishi said...

Looks nice :)
If you don't mind, I will be looking at the code to help me clean up mine. I won't be taking any, I hope this is okay?

LeMaurien19 said...

Thanks and look away, it's definitely no problem for me. I'd even appreciate feedback :D

I'm only beginning AppleScript, and actually I just took cue from what Kappy has already put in there as initial structure for the script.

Your UpdateEFI2 is a beauty compared to this beast.