Disable Gatekeeper – Command Line

To ‘allow applications downloaded from anywhere’ from the command line, enter the following into Terminal

sudo spctl --master-disable

This changes the option located in System Preferences, Security & Privacy, General

This will allow you to install software from sources other than the Mac App Store

Create a bootable Lion USB key

To make a bootable Lion USB key, you will need the following

1. A USB Key, minimum 8GB, I use these
2. The Install Mac OS X Lion App

Ok, so first, you need to start up your Mac

Now plug the USB key into your Mac

Next you will need to open Disk Utility, this is located in /Applications/Utilities

Format the USB Key so that it is Mac OS X Journaled and make sure you choose the ‘GUID Partition Table’ option, otherwise you will not be able to boot a Mac from it.

Then you need to locate ‘Install Mac OS X Lion.app’ which should be in /Applications

If you have deleted it since installing then you can redownload it by opening the App Store, then hold down ALT and click on Purchases, this will enable you to redownload it by clicking Install

Click on the ‘Install Mac OS X Lion.app’ to run it, click on ‘Continue’ then Agree to the license and you will be shown your main hard disk, under that there is an option to ‘Show All Disks’ click on that and choose your USB key, click on ‘Install’ and the process will begin, you will then have to restart the machine so the installation can complete, this usually takes around 40 minutes

After this has finished you will be able to boot from your USB key into a full Mac OS Environment, and providing you keep this OS fully updated then you should be able to use it to boot up any Mac.

Once it is fully patched, you can install any additional tools that you use for troubleshooting machines.