Help me erase my HDD - it refuses to die!

Discussion in 'Mac mini' started by Cassady, Mar 16, 2018.

  1. Cassady macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #1
    Greetings!

    Finally took the plunge on upgrading my late 2012 Mini, and installed a second 1TB SSD.

    I still have the original HDD installed, which was the start-up disk – and now, despite my best efforts, cannot get to erase it!
    I want to leave the OS/start-up on the SSD, and keep the 1TB HDD as hard storage, with both being backed up via TM to a DAS.

    Background:

    Have Server running on the HDD, with Sierra (latest) installed. Been having issues upgrading to H-Sierra, but guess that's a story for a different thread.

    Plugged the new SSD into the Mini as a external, fired up Recovery Mode, and installed macOS Sierra onto it.
    Then used File Transfer assistant(?) to get everything off my HDD, and over onto the SSD.

    When that was done, installed the SSD inside the Mini, and then started her up holding Option down, and booted into the SSD. Checked all was as it should be, and confirmed that the SSD is the start disk, inside System Preferences.

    If I reboot, boots onto/into the SSD - so all ready and working as expected.
    Now, move on to erasing the HDD.

    Open up Disk Utility, select the HDD and "erase" - error, cannot erase the disk as it failed to unmount.
    Right - do some reading, seems this can happen if something is trying to modify the disk - figure it might be a TM backup or something.
    So advice is to restart, and boot into Recovery Mode.

    Reboot, hold down Cmd+R >>> and... chime.... and... starts booting into the HDD.
    I know, since the progress bar is waaaaay slower to start rolling, unlike the new SSD.
    Regardless, in Recovery Mode - go into Disk Utility, and try and erase.
    Same story >> cannot unmount disk.
    Over on the Apple logo, select Startup disk, and confirm the SSD is selected - reboot again.
    Hold down CMD+R >>> and... chime.... and... starts booting into the HDD!!
    This keeps happening. I cannot seem to boot into Recovery using the SSD.

    So presumably I cannot erase it, because it cannot unmount, because it keeps booting into the HDD when I try and launch Recovery Mode!

    What on earth? How do I force it to recovery-mode boot into the SSD, so that I can nuke the HDD?
    Can this really be so hard?

    Is Server playing some role here - is it defaulting to the HDD since it thinks of that drive as the "main drive", regardless of what I try and boot from?

    Any suggestions would be greatly appreciated!
     
  2. organicCPU macrumors 6502a

    organicCPU

    Joined:
    Aug 8, 2016
    #2
    Try pressing just the Option key while booting and see if you can select from two Recovery partitions. If that doesn't work, open Terminal and get a complete list of your partitions:
    Code:
    diskutil list
    I don't know these Mac mini dual drive setups, but I can imagine that the mini is using that Recovery partition on the primary ATA interface by standard if you press Cmd + R. If so, switching the drives or the connectors, should face that problem.
     
  3. saulinpa macrumors 6502a

    Joined:
    Jun 15, 2008
    #3
    Can also try Internet Recovery. Then no drive needs mounted.
    - Option-Command-R or Shift-Option-Command-R at startup
     
  4. Cassady thread starter macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #4
    I have done that.

    At startup with Opt down, I see two Drives, both with Sierra and Server installed, same versions (being the SSD and HDD), AND their related Recovery partitions. I can boot into either, but have the SSD selected as the boot drive/start up disk.

    As mentioned, all works in that regard - I boot into the SSD, and restarting also defaults to the SSD.

    The issue is that, regardless of where I try and erase from - Disk Utility on the SSD, or in Recovery Mode - it cannot unmount the drive, so cannot erase.

    That is also why I could not upgrade to HS, come to think of it - could not install the new OS, because the drive would not unmount.
     
  5. Cassady, Mar 16, 2018
    Last edited: Mar 17, 2018

    Cassady thread starter macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #5
    And then open Disk Utility, and try erasing from there?

    EDIT: Ok - tried that - same result. Disk Utility from Mountain Lion(?) couldn't save me either!

    Same story - cannot unmount the drive....
     
  6. Cassady thread starter macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #6
    OK. Tried to install macOS High Sierra on the SSD. Restarted, went through some motions, before being met by the grey notification screen, with the HS picture in the circle at the top.

    Below it, the following message:

    "macOS could not be installed on your computer

    Unable to unmount volume for repair.
    Quit the installer to restart your compute and try again.

    [Restart]"


    Sigh. This is obviously the root of my issues.

    Do I start a new thread over in the HS forum, explaining that my Volumes cannot be unmounted?
    Or do I persevere here, and hope for some help - in spite of this not seemingly being a Mac Mini issue, but more related to the OS?
     
  7. Fishrrman macrumors P6

    Fishrrman

    Joined:
    Feb 20, 2009
    #7
    1. Create a bootable USB flashdrive installer.
    2. Boot from it.
    3. Open disk utility (from the flashdrive installer) and try again.

    Any better?
     
  8. Cassady thread starter macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #8
    I have a HS install disk, used for my MBP. Would that work - or should I rather make a Sierra one?
     
  9. organicCPU macrumors 6502a

    organicCPU

    Joined:
    Aug 8, 2016
    #9
    The problem that you can't unmount the HDD drive should normally get resolved on its own. Most likely macOS is running fsck or spotlight indexing on the drive. That process will prevent unmounting the drive for a certain amount of time.

    Force to unmount a device regardless of open files or processes:
    Code:
    diskutil umountDisk force /dev/diskX
    X has to be the device number of the drive you want to unmount (use 'diskutil list' before to find out)
     
  10. Cassady thread starter macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #10
    Thanks.

    Were it have been recent issues, or only a handful of occasions, would have been less worried. But this was initially preventing my upgrading from Sierra to HS on the HDD, and I tried on several occasions over the past months - at least 10 attempts spread out over that period.

    And now, the same happening with the SSD - so surely points to something deeper.

    The unmountdisk Force option - so try and run that in Terminal off the SSD, hopefully get the HDD to unmount, but then how do I erase? I must presumably mount it again to erase, correct? Hopefully if it does unmount, that will resolve things.

    Will give it a go now.
     
  11. organicCPU macrumors 6502a

    organicCPU

    Joined:
    Aug 8, 2016
    #11
    Use this with caution, as ALL of your data will get erased (make sure to use the correct device and detach all unneeded external drives):
    Code:
    diskutil eraseDisk JHFS+ NameOfDisk /dev/diskX
    Substitute NameOfDisk with the name you desire and substitute X with the correct identifier.

    EDIT: Disk doesn't have to be mounted, but has to be recognised by 'diskutil list'
     
  12. Cassady thread starter macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #12
    Just tried by booting into USB Recovery - no go. So looks like the alternative suggestion is all I have going.
    --- Post Merged, Mar 17, 2018 ---
    I appreciate the help - just want to check something:

    Can't I try and force unmount, and then try and mount/erase again, through Disk Utility? Why the jump to eraseDisk now?
    --- Post Merged, Mar 17, 2018 ---
    WAIT >> force Unmount appears to have done the trick! Just want to check things!
     
  13. organicCPU macrumors 6502a

    organicCPU

    Joined:
    Aug 8, 2016
    #13
    Yes, that's up to you, Disk Utility, the GUI of diskutil, should work, too.
     
  14. Cassady thread starter macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #14
    Thanks for the help - at least I appear to finally be making some progress.

    The good news is that I managed to nuke my original HDD - which is what I wanted.

    After unmounting with your terminal and suggestion, the drive was greyed out - but could be selected and erased.

    It is now visible as a 1TB empty drive, that I can copy data on to.


    The bad news - still cannot install HS on the SSD. Same error message as before, that I had received when trying to update the HDD - cannot unmount.


    Guess I can try and force unmount the SSD - remount it, and then try the install here? I would presumably need to be in Terminal in Recovery Mode to try this, right?
     
  15. organicCPU macrumors 6502a

    organicCPU

    Joined:
    Aug 8, 2016
    #15
    Just did one HS install that worked flawlessly, so I better resist to give inept advice with that.
    Keep in mind, that you successfully deleted you second copy of your running system.
    I recommend making a backup of your working macOS Sierra Server before trying to upgrade to HS.

    Probably there were some issues on the HDD that were handed on the SSD, therefore you'll get this error:
    Can you run Disk Utility's First Aid on the mounted or unmounted SSD?
     
  16. Cassady, Mar 17, 2018
    Last edited: Mar 17, 2018

    Cassady thread starter macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #16
    Yes - [edit:] managed to do it on both. "Froze" the booted drive while it checked - all reported as working fine.

    Just tried to unmount the SSD using the Terminal in Recovery Mode - worked. Then remounted it, and restarted.

    Ran the HS installer again, same problem. So appears something is holding the drive - which can be broken via the ForceUnmount - but that's obviously not done when the Installer tries to work its magic - so when it tries to unmount/mount, and cannot - the error gets thrown...
     
  17. Fishrrman macrumors P6

    Fishrrman

    Joined:
    Feb 20, 2009
    #17
    Try the Low Sierra bootable drive you have.
    See if that works.

    The idea here is to "boot EXTERNALLY".
    That means you boot from SOMETHING OTHER THAN the problem Mac.

    Brain surgeons can't work on themselves.
    They have to get another surgeon to do the job.
     
  18. organicCPU macrumors 6502a

    organicCPU

    Joined:
    Aug 8, 2016
    #18
    Honestly, I have no idea, if that's a disk error copied over to the SSD, some special setting somewhere in the system that you forgot about, a bug in macOS or even a hardware defect, like a broken cable or something like that.

    So you do have prepared a functional USB thumb drive containing the HS installer, e.g. with DiskMaker X? (Having an installer drive is always a good idea.)
    Booting the thumb drive (Option) and upgrading to HS could work fine, like @Fishrrman suggested.
    On the other hand that could also fail, because you couldn't unmount the SSD drive, even while booted Internet Recovery. Side note for Internet Recovery: Shift+Option+Cmd+R -> macOS that came with your Mac (Mountain Lion), Option+Cmd+R -> latest macOS (High Sierra).

    If you want to start over and make a fresh install, that's probably the fastest and cleanest solution. To do so, boot your installer thumb drive or boot into High Sierra Internet Recovery, open Terminal and force to unmount the SSD, open Disk Utility and erase the unmounted SSD, then start the installation procedure that will hopefully give you a clean HS installation. If you don't want to make a clean install, but further trying to solve the problem, it could mean a bunch of testing and trying.
     
  19. Cassady thread starter macrumors 6502a

    Cassady

    Joined:
    Jul 7, 2012
    Location:
    Sqornshellous
    #19
    Hi - appreciate the suggestion!

    I tried that. I also booted into the Internet Recovery mode. And nothing. Erase fails because it cannot unmount.

    As mentioned earlier, the suggested Terminal 'force' unmount command did the trick – but now I am stuck trying to upgrade the SSD to High Sierra... Whereas I can get it to unmount (with force), the installer doesn't try that trick - so it gives up at the point that it tries to erase the drive (and fails).
    --- Post Merged, Mar 18, 2018 ---
    Yes - your 2nd paragraph pretty much sums up the situation. Bootable USB installer >> Recovery Mode AND Internet Recovery Mode, all fail to unmount the drive, so the Erase fails.
    Your suggested 'force' umnount works however - but since the Installer doesn't try that, it stops the upgrade as soon as it tries to erase, and fails at the unmount.

    So it appears that my only option at the moment is to nuke and start over.
    I am a little bit hesitant though, since that process will presumably upgrade the SSD straight to HS, whereas the TM backup of the old HDD, is still sitting on Sierra... I know that should presumably not be an issue, but I'm a tad nervous... Especially given that the HDD installation clearly had some issues...
    Regardless, I don't appear to have much of a choice at the moment...
     
  20. Fishrrman macrumors P6

    Fishrrman

    Joined:
    Feb 20, 2009
    #20
    Well, you could do this:
    1. Take the SSD -OUT OF- the Mini (physically)
    2. Connect it using a USB3/SATA adapter/dongle like this:
    https://www.amazon.com/Sabrent-2-5-...478&sr=1-2-spell&keywords=sabremt+usb3+to+ssd
    3. Erase it that way.
    4. Install the OS "externally", get the drive "set up"
    5. Boot it externally to see that all was ok.
    6. RE-install it back into the Mini.

    Alternative:
    Take it out, and just boot and run the Mini that way (external USB3 SSD booter).
    I've been doing that going on 6 years now, works great.
     
  21. organicCPU macrumors 6502a

    organicCPU

    Joined:
    Aug 8, 2016
    #21
    I guess the OP could erase the drive without detaching the drive by forcing to unmount and reformat the SSD, but if I understood correctly he's still ambivalent of upgrading to HS.

    If you'd ask me, I wouldn't upgrade to HS now, at least not until the last stable release of HS will be out in September this year. I've been upgrading a Mac mini to HS and it's o.k. for less demanding things, like surfing the web and mail. But then there are clear flaws, like Preview crashing on large PDF's and weird rendering bugs in Finder. For a production system IMO HS isn't matured enough by now.

    As a conclusion you could install Sierra, if you've got an installer somewhere or trying to fix your current installation. Trying to fix the current installation should be possible, as it's an open file that prevents unmounting. If we find out, what exact open file is causing the problem, we could try measures against that file being always open. Maybe there is a more efficient way to get rid of the issue (like deleting a mount point, make a NVRAM reset, make a combo update or maybe just boot into Safe Mode), but here is a suggestion to get at least closer to the root of the problem...

    You could boot into Internet Recovery or booting an external media and then identify all active process numbers (PID) on the device (your SSD):
    Code:
    sudo fuser -c /dev/diskX
    The PIDs are the numbers of the output without the trailing c.
    Then get info about one or more specific process(es):
    Code:
    ps -p PID
    Or quit one or more process(es):
    Code:
    sudo kill -9 PID
    To kill more than one PID or get info on more than one PID with that commands, just add several PIDs after each other, separated by a space.

    If you quit one process after another and try to unmount the drive the normal way (without the force verb) after each kill command, you should be able to unmount the drive regularly as soon as the blocking process is terminated. This way you should be able to identify the process that is blocking the regular unmounting. Once you know what's going on exactly, it's probably to delete a certain plist or something like that.
     
  22. Partron22 macrumors 68020

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #22
    Why not throw everything on your HDD, visible or not, into the trash, then empty it?
    That should leave you with just the problem file(s) left.
    You may need to do a few rm in terminal to get as clean as possible.
    That should eventually leave just the problem file, which may fall to a sudo rm, or might go away after quitting the process that's using it.
     
  23. aLbAn macrumors newbie

    Joined:
    Sep 30, 2005
    Location:
    Netherlands
    #23
    Since you started off with connecting the SSD externally, can’t you do the same with the old HDD?
    Remove the old HDD from the Mini, boot from the new SSD, then hot-plug the external old HDD like any regular external device? You should be able to unmount then, I think.
     

Share This Page

22 March 16, 2018