Determining the OS X version on a nonbooted-but-bootable disk

Happens every time: Client comes in with a nonbooting Mac that turns out to need an OS reinstall, but they don’t have their installer media. It’s less of an issue with recovery partitions and Internet Recovery, but it happens often enough to be annoying. Here’s how to find the installed OS version.

  • Start the problem machine in target disk mode and connect it to a functional box.
  • On the working machine, open Terminal and enter
strings /path/to/mach_kernel | grep 'Darwin'
  • The path to the mach_kernel will be /Volumes/drivename/mach_kernel.
  • The returned data should look something like this
Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
  • grepping ‘Darwin Kernel Version’ returns marginally cleaner results, but requires too much typing.
  • Anyway, now cross reference your kernel version with Wikipedia’s Darwin release history tableet voíla, your installed system version.

Sometimes, it’s the little things. Hat tip to Mac Help for the right command.


2 thoughts on “Determining the OS X version on a nonbooted-but-bootable disk

  1. What about:

    defaults read “/Volumes/volume_name/System/Library/CoreServices/SystemVersion” ProductVersion

    Works at least back to 10.6.

    • Nice! Eric Holtam also pointed out that doing Get Info from the Finder on a bootable drive lists the bootable OS version, at least as far back as 10.6. Amazing what you miss…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s