Upgrading and selling my MacBook, how do I clean install Lion and iLife?

I have a Unibody MacBook (late 2008) which shipped with Leopard (specs here).

When I sell it, I know I can move my data and settings to my new Laptop through Migration Assistant; for the new owner, I'd like to wipe everything except the standard software (plus all updates).

Given that the machine's original OS and install disks were 10.5.5 and iLife '09, what do I have to do sell it with Lion?

A) Just wipe everything except standard OS X apps + iLife?

or

B) Make a Lion USB drive (and give it to the buyer), and do and erase and install (or equivalent)

And if B) - How do I get iLife on there?


Solution 1:

If you want to sell your machine but also include installed software, there is a way to set this up that will ensure none of your personal data is on the machine, as well as provide a better box opening experience for your buyer.

  • I would suggest doing a secure erase of your hard disk first. Then, install Lion.

  • Configure a dummy user account named "test" or "admin" or something generic

  • Install the software you want to include

  • Restart your machine in Single User mode by holding + S on startup.

  • Very carefully, do the following:

mount -uw / (This mounts the root volume so you can make changes to it.

rm /var/db/.AppleSetupDone (This removes the flag that tells Setup Assistant that it's done)

rm /var/db/dslocal/nodes/Default/users/"shortname".plist (Replace "shortname" with the user account name you set up before. This removes the user plist)

rm -rf /Users/shortname (Replace "shortname" with the user account name you set up before. This removes the User directory)

rm -rf /Library/Preferences (This resets preferences)

shutdown -r now (This restarts the computer)

Verify that your machine starts up to the Setup Assistant and you're done. That way, your buyer can start up the machine to the Setup Assistant and still retain the software you want to provide them with.

Good luck.

Solution 2:

You should erase your disk using the Disk Utility on a install USB drive, NOT from the recovery partition as the recovery partition contains your Wifi credentials and you want it erased, too. Then install Lion from that stick. When it's rebooting the last time during the installation process hold alt to get into the boot manager and press Power to turn the computer off. There is no trivial way of preinstalling iLife, I'd recommend shipping it on a separate medium.

Remember to turn off EFI password if you use it. (If you don't know what this is, you probably didn't enable it.)