Cannot unmount disk0 resource busy

I am unable to wipe my hard drive and install new OS X as the resource is busy. I would imagine this is because I have Recovery open on this disk and that's why it is busy.

I've tried:

diskutil unmount disk0
hdiutil detach disk0

My disk parts look like this:

/dev/disk0
0: GUID_partition_scheme                   *250.1GB    disk0
1: EFI          EFI                         209.7MB    disk0s1
2: Apple HFS    Macintosh Hard Drive        249.2GB    disk0s2
3: Apple_Boot   Recovery HD                 650.0MB    disk0s3

/dev/disk1
0: Apple_partition_scheme                   *1.3GB     disk1
1: Apple_partiton_map                        30.7KB    disk1s1
2: Apple_HFS    OS X Base System             1.3GB     disk1s2

I am also unable to install from appstore as this Macbook 2010 Unibody does not have an operating system on it.

I am stuck in Recovery HD and wonder what my options to get running again are.


A couple of thing are not making sense in your description. When you boot to Recovery HD, you should also have about 15 lines of df output with devices running from disk0 to disk12 or more (it varies between OS X 10.8 and 10.11).

In your example, if you want to wipe all contents on what's normally named Macintosh HD and in your case is disk0s2/Macintosh Hard Drive - you could issue the command:

diskutil eraseVolume JHFS+ Macintosh\ HD disk0s2

The \ is needed to escape the space between "Macintosh HD" - quotes would work as well if you prefer that. I would just use Disk Utility to erase the volume and rename it Macintosh HD since that is far easier, there in the main menu of items, and doesn't need any care with spaces, quotes or messing up the disk0s2 and erasing the wrong area of the drive.

The reinstallation problem might be solved by erasing the storage, but that's probably a better stand alone question.

  • https://support.apple.com/en-us/HT204904

The above article walks you through how to use Recovery HD to erase and start over if that's your eventual goal.