Create a bootable USB installer

Curtisy of Apple. You could do some Googling and follow another tutorial and use an easier GUI tool, there are thousands out there that only do these few commands.

Before you're able to create a bootable OS X installer, you'll need to do the following first:

  1. Download the OS X Installer app from the Mac App Store.
  2. Mount the volume you want to convert into a bootable installer. This could be removable media such as a USB flash drive, or a secondary internal partition.
  3. You can then use the createinstallmedia tool to convert the volume from step two into a bootable installer based off the installer app from step one. To learn how to use createinstallmedia, use the following command in Terminal:

OS X Yosemite

/Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia

OS X Mavericks

/Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia

Examples

For example, assuming you have a volume mounted at /Volumes/MyVolume and the OS X installer app is at /Applications/Install\ OS\ X\ Mavericks.app you could erase /Volumes/MyVolume and convert it into a bootable installer with this command:

OS X Yosemite

sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Yosemite.app

OS X Mavericks

sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Mavericks.app

Install the OS

You should now have a bootable OSX installer. Take the installer and plug it into the latest and greatest OSX device you have in inventory. I am using a 15 inch retina Macbook pro with all upgraded hardware. Macbooks are the best canidate for their more extensive hardware requirements.

  1. Turn on the device and hold Option (Alt)
  2. At the device selection screen, arrow over to the "OS X Installer"
  3. Push enter and wait for it to boot
  4. At the OSX installer screen, format the Hard Drive
    • Go to the menu bar -> Utilities -> Disk Utility
    • Navigate to the first partition of the Macontosh HD on the left. By default the partition name is also "Macintosh HD"
    • Click on the Erase tab at the top
    • Click the Erase.... button at the bottom
    • Yes, Erase the Partition at the dialog
    • Quit the Disk Utility
  5. Now at the OS X screen -> Continue
  6. At the License Agreement -> Continue
    • Yes Agree the license agreement, do we have a choice?
  7. Select the newly formatted Macintosh HD as the install disk -> Continue
  8. Wait for the installation to complete

Finish the new installation

Lets hold the machine's hand and walk it through Apple's welcome screens. The Mac will talk to you, and try and convince you to use VoiceOver, don't listen to it.

  1. Unitd States -> Continue
  2. U.S. Keyboard -> Continue
  3. Don't transfer any information now -> Continue
  4. Don't sign in with an Apple ID -> Continue
    • Yes Skip
  5. Terms and Conditions -> Agree
    • Yes Agree, do we have a choice?
  6. Create a Computer Account, Administrator
    • Full Name: administrator
    • Account Name: administrator
    • Account Picture: The Earth looks nice
    • Password: TS Admin password
    • Retype the 30 digit password again
    • Hint: TS Admin password
    • Continue
  7. Don't send diagnostic information to Apple -> Continue

You should now be at a fresh administrator profile and are ready to configure the OS

Configuring the OS

Always be thinking about the end user, the image you are creating will have a specific user and has specific needs.

Installing software and updates

  1. Install updates from the Mac App Store, reboot when prompted
  2. Check for and install updates again, reboot when prompted
  3. Repeat steps 1 and 2 untill no more OS updates can be found
  4. Remove crap from the dock. Leave
    • Finder
    • Launchpad
    • Safari
    • Mac App Store
    • System Preferences
  5. Install the latest versions of these and drag them to the dock
    • Google chrome
    • Firefox
  6. Install the latest versions of these from the internet
    • VLC media player
    • Onyx (/Applications/Utilities Folder)
    • Adobe Reader
    • Adobe Flash
    • Microsoft Silverlight
  7. Install these software packages from //fs2/installs/software
    • Microsoft Office 2011
    • Adobe CS6 (We have a site license, let it go everywhere)
    • Pages
    • Keynote
    • Numbers
    • Garageband
    • iMovie
    • iDVD
      • Here is a script:
      • mkdir /Volumes/fs2/
      • mkdir /tmp/idvd/
      • mount_smbfs //puppet:puppet@fs2/installs/ /Volumes/fs2/
      • cp /Volumes/fs2/software/MacOS/iLife/iDVD.pkg /tmp/idvd/
      • cp /Volumes/fs2/software/MacOS/iLife/iDVD7.1.2Update.pkg /tmp/idvd/
      • installer -allowUntrusted -pkg /tmp/idvd/iDVD.pkg -target /
      • installer -allowUntrusted -pkg /tmp/idvd/iDVD7.1.2Update.pkg -target /
      • rm -rf /tmp/idvd/
      • umount /Volumes/fs2
    • Install Developer Tools
      • Open Terminal
    • Type git
    • Press Enter
    • When prompted to install developer line tools, press install

Configure software

Open all software installed, make sure all licenses and configurations are setup properly. Test all applications to the best of your abilities to ensure no crashing or errors occur.

  1. Open Microsoft Word
    • Allow it to access your contacts
    • First Name: Technical
    • Last Name: Services
    • Company Name: Peninsula School District
    • Continue
    • Don't download the latest updates periodically
    • Don't join the customer experiance program
    • Continue
    • Done
  2. Continue into creating a new document, select different fonts and play around.
  3. Update Microsoft word
    • While Word is open go to Help -> Check for Updates
    • Push the Check for updates button
    • Install the updates when prompted
    • Check for updates over and over again until there are no more to be found
  4. Open and update the rest of the Microsoft Suite
    • Powerpoint
    • Outlook
    • Excel
  5. Launch Firefox
    • This is an application downloaded from the internet, open it anyways
    • Don't set to the default browser, never ask us again
    • See if there are updates available
      • Top next to Apple, Firefox -> About Firefox
      • Under version, should say "Firefox is up to date"
    • Go to preferences
      • General
      • Tabs
        • Uncheck: Warn me when closing multiple tabs
      • Search
        • Use Google for search engine
    • History -> Clear Recent History -> Clear Everything
  6. Launch Google Chrome
    • Make it the default browser
      • If not prompted, Go to settings and scroll to the bottom
    • Under Settings
      • Go to Advanced Settings at the bottom
      • Privacy, Clear browsing data
        • From the beginning of time
        • Check all boxes
      • Privacy, Use a wweb service to help resolve spelling errors
      • Provacy, Enable "Ok, Google" because why not?
      • Set homepage to http://my.psd401.net
        • On Startup, Open a specific page or tabs
    • Ensure up to date
      • Menu
      • About Google Chrome
      • If already up to date, press the button to allow automatic updates for all users
  7. Open Safari
    • Close the favorites sidebar
    • Go to Sarafi -> Preferences
  8. Open and update Adobe CS6
    • Launch Photoshop
    • Make sure Licensing is working properly
    • Click help -> Update
    • Install all available udates
    • Launch Illistrator
      • You will be prompted to install the legacy Java 6 runtime
      • Click more info, you will be taken to an apple page
      • Download the dmg and install the pkg
      • Then test and ensure Illustrator works
    • Launch InDesign, ensure no plugin issues
    • Launch Adobe Reader
      • When prompted, set it as the default PDF viewer
    • Launch Adobe Acrobat
      • When prompted, don't set it as the default PDF viewer
  9. Open the iLife and iWork products, walk through their intros and create new documents
    • Pages
    • Keynote
    • Numbers
    • iMovie
    • Garageband
      • This will need to download content from Apple to the system Library

System Preferences

  1. Sharing
    • Set a generic computer name: Fresh-10-10-Image
    • Check Remote Login
    • Check Remote Management
      • Check Observe
        • Check Control
      • Check Generate Reports
      • Check Open and quit Applications
      • Check Chage settings
      • Check Delete and replace items
      • Check Start text chat or send messages
      • Check Restart and shut down
      • Check Copy items
      • Press "Okay"
      • Allow Access for: Only these users
        • Click the Plus icon
        • Select the administrator account
        • Select the options listed above
    • Check Remote Apple Events
  2. Security & Privacy
    • Click the Lock to make changes
    • Uncheck Require password after sleep or screen saver begins
    • Allow apps downloaded from Anywhere
  3. Mouse
    • Plug in an Apple mouse
    • On the right side of the mouse, enable Secondary Click
    • On the side of the mouse, enable Mission Control
  4. Trackpad
    • Check Tap to Click
    • Check Three finger drag
  5. Energy Saver
    • Uncheck put hard disks to sleep when possible, on Both Battery and Power Adapter
    • Turn Display off after 15 minutes
    • Click on the battery on the statusbar next to the time, and select Show Percentage
  6. Keyboard
    • Drag the Key Repeat and Delay until repeat sliders all the way to the right
    • Set the keyboard brightness to turn off when the computer is not used for 5 minutes
  7. Desktop and Screensaver
    • Set a desktop background
      • I took the Milkyway default background from OSX and put a white PSD logo over it and it looks pretty good.
      • Place the background in the /Library/Desktop Pictures/ folder, so it is accessible for all users. Be sure to inherit permissions!
    • Start screen saver after Never We don't want distracting screen savers in the classroom or in a lab, let's just rely on the energy saver to turn the screen off after 15 minutes.
  8. Users & Groups
    • Enable Guest account
      • Unlock
      • Click on Guest User
      • Allow guests users to connect to shared folders
      • Allow guests to log in to this computer
    • Login Options
      • Uncheck allow fast user switching
  9. Network
    • Remove all network connections besides Ethernet and Wi-Fi

Prepare for capture

Lets do a little cleanup of the Administrator account.

  1. Delete all the installers from the Downloads folder
  2. Clear off the desktop
  3. Open the connect to server menu
    • Click on the clock
    • Clear recent servers
    • Remove the Server address field and type "smb://" with no server
  4. Go to Finder preferences
    • Show Connected servers on the desktop
    • Advanced: When performing a search, search the Current Folder
  5. Setup the Finish Image script
  6. When the computer first boots, we want to automatically log into administrator. (Finish image script will change this)
    • System Preferences -> Users & Groups -> Login Options -> Automatic login to administrator
  7. Last. Click on the Apple -> Recent Items -> Clear Menu
  8. Shut Down

Capturing the image

  1. Plug a Deploy Studio flash drive into the computer
  2. Hold Option (Alt) While booting the computer
  3. Boot to the Deploy Studio Flash Drive
  4. Choose the second option, "Create a master from a volume"
  5. Come up with an image name, "OSX10.10.1Base_12082014"
  6. Press play to capture
  7. Wait
  8. After the reboot and autostartup, test the Finish Image script
  9. If there are any problems, edit Finish Image scripts on github
  10. Reimage and test some more
  11. If all is well, then you are done!