Partition issue, couldn't unmount disk (error)

Hi,


I have a Mac that I put a partition on a few months ago, I now want to reformat. Yet when I go to my Recovery HD on Lion then to Disk Utility and try to format my HDD it gives me an error saying it couldn't unmount disk, the two partitions on the HDD unmount but the HDD does not. So I googled it and read a few soulitions however the most common one creating a bootable drive with the Recovery HD on it dosen't work either. One of the soulitions I saw was installing Linux on a removable drive and formating the drive from their, however that seems inpractical for what I'm trying to accomplish, if anyone has a fix for this it would be greatly apreactited.


Thanks.

MacBook Pro, Mac OS X (10.7.3)

Posted on Apr 22, 2012 2:59 AM

Reply
42 replies

Apr 29, 2012 11:27 AM in response to Linc Davis

Linc you can change, resize, and add partitions when booted into the OS or from the R-HD or from booting from an install disc using Disk Utility.


User uploaded file


You have to use the resize arrow, in red bottom right corner, to drag the existing partition up, resizing it, then create a new partition from the space left over.


You can't use the Partition drop down, in Yellow.

Jan 27, 2015 9:12 AM in response to goldish

Hi


For me what worked was the following:

1. Create an external boot device (bootable SD card)

Here is the link to the procedure I followed

Create a bootable installer for OS X Mavericks or Yosemite - Apple Support


2. Boot from an external device (in my case a SD card)

For shortcuts for different boot options please see the following link

Startup key combinations for Intel-based Macs - Apple Support


3. Once the system booted from the external device I went to the menu and opened "Terminal" and entered a command (found in the link below) in order to force the unmount

http://apple.stackexchange.com/questions/105673/disk-utility-wont-unmount-hd-for -formatting


4. Went to the disk utility and now I could format the partition (in my case I created a Raid1 and then formatted)


Hope it helps


All the Best

Jun 27, 2012 8:58 PM in response to goldish

I am having the same problem.


to recap:

  • I have a macbook air
  • I have two partitions on it (systemHD and usersHD)
  • I have an eternal USB drive
  • I installed a recovery partition on it (with Recover HD Disk Assistant)
  • I booted to this external Recovery partition
  • I launched Disk Utility, and have tried EVERY method mentioned so far to erase or repartition or remove a partition…

SAME error every time, "ca so PLEASE don't give me the same rigamaroll you've given Goldish…


The only thing i can think of:

when I rebooted holding the option key, there were 3 bootable drives, my internal Lion startup disk, the internal Recovery and the external Recovery. I selected the external recovery, but what if the machine is just dumb and won't acutally do so, instead booting stubbornly again to the internal Recovery drive?


There is a strange thing in DU: on my external USB ther are two partitions, one has files, the other is just the external Recovry (which i should be booted to). However, DU does not show the external recovery volume under the entry for the external drive, it only shows the one partition with my files… AND then there's a weird little network volume below a grey line (disk1) with the image "Mac OS X Base System" underneath it…

This is screwy, and I think the answer is APPLE MESSED UP WITH LION.


anyway, I need to erase and reinstall, and i have to blank out the internal drive… just gotta do it… so this is really irking me, and goldish too, i bet. Did you ever fix this issue on your mac?

Jun 28, 2012 12:24 AM in response to Willeyeam

I found a work around, but it seems sloppy and I did things I'm not certain I'd recommend (hopefully someone who knows more than I do will pipe in over here)


the idea was to get rid of the internal drive's Recovery HD, so that i can boot to the external Recovery HD and wipe out the internal drive nice and clean. Thing is I may already have a clean, single partition internal disk before I even boot to the external Recovery HD, but for safety's sake I'm going to follow through as I don't have an internal Recovery HD right now.


BACKUP FIRST! It's not gonna be my fault if you lose your data!


my steps:

  1. enable Disk Utility's Debug menu by launching terminal and running defaults write com.apple.DiskUtility DUDebugMenuEnabled 1
  2. launch Disk Utility,
  3. under the Debug menu, select "Show Every Partition"
  4. select the Recovery HD volume under the internal harddisk's entry (it was greyed out, but worked anyway)
  5. go to the Erase tab,
  6. give it a new name (i used "blah"), erase it, and confirm
  7. select the internal harddisk's entry (above "blah"), and switch to the Partition tab,
  8. select the "blah" partition and click the minus button (below, left), and confirm
  9. drag the bottom-right corner of the remaining partition(s) down so that they fill the disk, and confirm
  10. now plug in the external drive with a Recovery HD on it (I already created this before)
  11. restart the machine and hold down the option key at startup
  12. NOW THERE IS ONLY THE EXTERNAL RECOVERY HD!!! no chance of booting to the wrong one
  13. after selecting your language, launch Disk Utility
  14. select the entry for your internal disk, and switch to the Partition tab
  15. do whatever you want!!! I just did this and it worked! no stupid error about not unmounting!


harr har harr apple i win again


I'M GUESSING:

  • if you reinstall Lion, you should get the internal Recovery HD again.
  • if you use more than one partition and then install Lion 10.7, you may end up with screwed partitions (but this is a guess because that's what happened to me when I ran the Lion Installer.app over my Snow Leopard 10.6 installation.
  • if your machine is new enough to use Internet Recovery by holding down command-option-R at startup, you may not have to go through all this to avoid booting from the internal Recovery HD
  • that there is a smoother, safer way to do this, but i don't know what that is


Now I'll reinstall Lion (just because I added a partition to my internal disk, and I have little faith in hot partitioning). This should create a new Recovery HD on the internal disk, which is itself a hot partitioning, but what am I gonna do? If that messes it up I'll report back.

Jul 28, 2014 9:32 AM in response to goldish

I'm having the same issue with Mavericks as the original poster. This is clearly a bug, so I'm not sure why Linc's responses to goldish are so combative.


The REASON we are getting an error is that Disk Utility is attempting to unmount a volume that it has already unmounted; Disk Utility in Recovery unmounts the volume prior to the "Checking catalog file" step. (This is a trivial check in Disk Utility's code to ensure that the unmount(2) system call's errno is not EINVAL. Or, alternatively, you could ensure that the code doesn't try to unmount the volume twice in the first place, but that might require actual work.)


Here are the steps to reproduce the issue, assuming you have a 10.9 system and a HDD split into regular and Boot Camp partitions.


  1. Boot into the recovery partition. I held "option" while powering on and chose the Recovery volume.
  2. Launch Disk Utility.
  3. Select the main HDD, then the Partition tab.
  4. Select the Boot Camp partition and erase it with the "-" button.
  5. Hit "Apply." This should finish successfully.
  6. Resize the remaining volume to fill up all remaining space.
  7. Hit "Apply" again.


The reason you can get this to work from within the regular boot volume is that the regular system doesn't attempt to unmount it twice. But since I'm attempting to reset my computer to zero to return it to inventory, this is a huge extra effort to reboot into the regular volume, create a user, run Disk Utility there, then reboot back into Recovery and re-install OSX a second time just to resize the disk partition.

Apr 22, 2012 4:52 AM in response to goldish

In DU on the partition tab highlight the last partition and click the Minus Sign. Then expand the first partition to include the whole drive (bottom right hand corner). Then go to the Erase Tab and select the new expanded partition then click erase.


NOTE:

You must be booting the computer from the Recovery HD partition, a USB stick with the Recovery HD partition files on it, Internet Recovery system or a OS X install DVD to do this.


You can not select the complete, physical, drive while booting the computer form any of it partitions.

Apr 29, 2012 5:31 AM in response to Linc Davis

I partitioned my HDD (boot camp) then I decided last week to reinstall the OS (because I noticed things to be a little slow)


when I tried to reinstall in the Recovery HD, it gives me an error saying that I need to unmount my HDD


I go back to diskutil still on the Recovery HD and try to unmount but it just gives me the error :


"Partition failed with the error: Couldn’t unmount disk."


if I try to click the - on the partition tab or do anything else


"Partition failed with the error: Couldn’t unmount disk."


thats it..


what do I do?

Apr 29, 2012 9:11 AM in response to goldish

When asked for an exact description of what you're trying to do, you posted only a screenshot that shows an attempt to erase a volume, and an error message different from the one you've been reporting. That conflicts with your verbal description. Every message from you in this thread says something different. When you can come up with an exact, complete, consistent description of the problem, please post it.

Jun 27, 2012 9:07 PM in response to Willeyeam

CONFIRMED:


the danged thing won't acutally boot to the external Recovery partition!


my steps:

while in Recovery mode, I launched Terminal

I ran diskutil list

disk0 is where my two internal partitions, and the internal Recovery partition are

i ran diskutil eraseDisk JHFS+ MacHD disk0 but got an error that it couldn't unmount, again

I ran diskutil unmount force disk0 but again it said all but one volume were unmounted, doh!

Now, supposedly, I am booted form the external disk, at disk2, so I ran diskutil unmount force disk2 with NO ERROR.


Clearly i was booted form the internal Recovery drive DESPITE expressly selecting the USB drive in the boot menu (when holding option at startup).


APPLE SCREWED THIS UP BIG TIME


What am i going to do? This machine has no optical drive for an installation DVD, and no firewire port for target disk mode, and I don't have an extra disk to install Lion onto… I"M ******

Jul 11, 2012 7:42 AM in response to Willeyeam

I also just had this issue and spent ages before I found this thread. So what happened is I couldn't delete the bootcamp partition and I couldn't boot from a recovery USB key (but recovery disk did launch). Nothing wrong with the recovery USB key as I set up another machine just after it.


However I solved it a different way.


1. Booted up into OSX.


2. Ran Disk Utility.


3. Selected the main disk and then partitions.


4. Selected "Bootcamp" and then deleted it. Resized the remaining partition to full size.


5. Rebooted into the recovery disk.


The re-install worked fine. So it appears trying to delete the bootcamp partition only worked if I didn't boot into the recovery disk in the machine. (what some people mentioned earlier should not work).


Hope that helps.

Nov 26, 2012 3:58 AM in response to goldish

Hey, I dont know if you found your solution but here it is. Firstly, to all the people suggesting that you cannot expand your partition while booted, that's just not true.


The problem isnt the mounted disk, the problem is the way that "free space" (from your bootcamp partition) is formatted. Heres how to fix.


Suggested preface: Verify permissions and disk from command+r disk utility after chime.


Steps:

1) Boot into your OS X, just like you normally would

2) open disk utility

3) click your main disk, not the partition.

4) click the PARTITION tab

5) Click the minus sign on the bootcamp partition, it should go away. dont click apply yet. if its already empty (bootcamp partition removed) go to step 6.

6) Click the PLUS SIGN under the layout, make sure the Format to the right is MAC OS EXTENDED JOURNALED

7) apply.

8) when its done, click the minus sign on the new partition

9) drag your original OS X Partition to fill the layout.

10) apply. done.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Partition issue, couldn't unmount disk (error)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.