You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

I ERASED my Macintosh HD and now can only boot using a USB!

I needed to wipe my Mac (2015 MBP) for selling and I accidentally deleted the entire Macintosh HD. Because of this, I got the blinking folder with the “?” upon startup because there was no drive for the Mac to boot on.


I ended up installing Catalina on a USB drive and booting from that but the Macintosh HD still doesn’t show up in disk utilities, as expected. The absolute only thing that shows up in desk utilities is the USB drive. 


How do I get the Macintosh HD back so I can boot from it? 


So thankful for this community for all its help!

Posted on Feb 15, 2021 3:13 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 19, 2021 2:58 PM

Hope_it_Helps Said:

"I ERASED my Macintosh HD and now can only boot using a USB!: [...]Now I can't get it to unmount. The exact error I get is "Unable to write to the last block of the device. Operation failed.[...]"

-------


Try Running First Aid:

  1. Boot: in Recovery Mode
  2. Select: Disk Utility
  3. Select: Your Internal Drive
  4. Click: First Aid button
15 replies
Question marked as Top-ranking reply

Feb 19, 2021 2:58 PM in response to Hope_it_Helps

Hope_it_Helps Said:

"I ERASED my Macintosh HD and now can only boot using a USB!: [...]Now I can't get it to unmount. The exact error I get is "Unable to write to the last block of the device. Operation failed.[...]"

-------


Try Running First Aid:

  1. Boot: in Recovery Mode
  2. Select: Disk Utility
  3. Select: Your Internal Drive
  4. Click: First Aid button

Mar 9, 2021 7:27 AM in response to HWTech

Oddly enough, the internal drive is showing at it's normal 250gb in Disk Utility but it still doesn't show up in terminal. It won't erase to create the new Machintosh HD. Doing the option boot showed Untilted and Recovery but I think that's both the USB boot.


Is there a way to fix this since the 250gb internal shows in Disk Utility? PS. I was able to run First Aid on the 250gb internal drive.




Mar 7, 2021 5:37 PM in response to Hope_it_Helps

Usually the internal drive will be "disk0". Since "disk1" is not shown in the report it may be the internal SSD which indicates perhaps the internal SSD is very slow to go to a ready state. Maybe you can Option Boot the laptop and let the laptop sit at the Apple boot picker menu for a few minutes to give the internal SSD time to go ready before you boot to the external drive. If this works, then the internal SSD has some sort of hardware issue possibly able to be "fixed" by using a Linux utility to access the SSD's hardware secure erase feature to reset the SSD to factory defaults (I can provide instructions if the SSD is seen with this delayed boot).


If the SSD doesn't go ready with a little extra wait time, then you can replace the original Apple SSD with a third party OWC Aura SSD, but to use a third party PCIe SSD requires that macOS 10.13+ was already installed at some point in the past so the laptop has the necessary system firmware update to work with a third party NVMe PCIe SSD.


SSDs can just fail at any time without any warning signs. I've seen it happen a lot.



Feb 15, 2021 3:39 PM in response to Hope_it_Helps

Hi Hope_it_Helps,


Thanks for the detailed description.


It seems that you correctly erased the drive; however macOS needs to be reinstalled - otherwise your computer doesn't have an operating system, and therefore can't boot.


To fix this, I'd try the following:


  1. Boot from the USB drive.
  2. If you start up to the login screen, log in, then make the USB drive your chosen startup disk in System Preferences -> Startup Disk. Keep the USB drive connected, and restart while holding down Command-R.
  3. You should now be in macOS Recovery. If you're prompted for an administrator password, provide it to continue.
  4. Select Disk Utility and click Continue.
  5. Select View -> Show All Devices.
  6. Select the top level of the internal drive and click Erase. Choose these options, then click Erase:
    1. Name: Macintosh HD
    2. Format: APFS
    3. Scheme: GUID Partition Map
  7. When finished, quit Disk Utility, then select Install macOS. Choose Macintosh HD as the destination, then start the installation.
  8. When the Setup Assistant appears, you can disconnect the USB drive.

Feb 19, 2021 2:15 PM in response to Encryptor5000

Thank you so much for your help!!


I got all the way to eracing the top-level HD (odd that it shows up in recovery and not the font-end USB boot).


Now I can't get it to unmount. The exact error I get is "Unable to write to the last block of the device. Operation failed.


I tried using terminal to repair the disk and force unmount with no luck. Just getting the error "unmount fail for /Volume/disk1".


Any other suggestions?

Feb 19, 2021 3:47 PM in response to Hope_it_Helps

Hope_it_Helps wrote:

Thank you so much for your help!!

I tried using terminal to repair the disk and force unmount with no luck. Just getting the error "unmount fail for /Volume/disk1".

IIRC disk1 is the mounted disk image that contains the macOS Recovery system (should be named macOS Base System). For obvious reasons this cannot be unmounted.


In Terminal, run "diskutil list" without the quotes and post the results for the first five disks here.

Mar 9, 2021 9:25 AM in response to Hope_it_Helps

The "Recovery-10.11.6" item is actually a hidden recovery partition on your internal drive that Disk Utility hides from view to "protect" the user. It is odd that the "Apple SSD ....." appears as "disk1" since usually the internal physical drive is "disk0". I just recently had a problem erasing a drive because for some reason macOS/Disk Utility got confused.


When this happens you need to write zeroes to the beginning of the drive to destroy the partition table so the drive then appears as completely unused/blank or "new" to Disk Utility. Having the information from the command line would have provided more details and confirmed these suspicions.


Using the command line (while booted from Recovery Mode or a macOS USB installer) you need to get the drive identifier(s) for the internal drive you want to erase by using the following command:

diskutil  list  internal


You may see two items listed where one is the physical drive and the other one is a virtual drive. You need to make sure no volumes are mounted on either the physical or virtual drives by issuing the following command making sure to replace "diskX" with the actual drive identifier(s) from the previous command starting with the virtual drive first (if it exists):

diskutil  unmountDisk  diskX


Do this for both the virtual drive and the physical drive. Once all volumes have been unmounted you can write zeroes to the beginning of the drive using the following command making sure to replace "diskX" with the drive identifier for the physical drive:

sudo  dd  if=/dev/zero  of=/dev/diskX  bs=100m  count=10


After this command completes successfully you should be able to erase the physical drive using Disk Utility.

Mar 25, 2021 4:50 PM in response to Hope_it_Helps

Your first attempt to unmount "disk1" was correct so try to force unmount the drive (make sure to confirm the drive identifier for the internal physical drive as it may have a different ID next time):

diskutil  unmountDisk  force  disk1


Was there another "internal" drive listed (it may be listed as "internal virtual")?


If it fails again verify the drive is mounted:

mount  


You can try to zero out the beginning of the drive using the following command making sure to use the correct drive identifier for the internal physical drive (replace "disk1" with the correct drive identifier):

dd  if=/dev/zero  of=/dev/disk1  bs=100m  count=10


Sometimes Disk Utility just gets confused by some partition errors so destroying the partition table by writing zeroes to the beginning of the drive can get past this problem. If the command complete successfully, then you should be able to launch Disk Utility to erase the physical drive.

Mar 27, 2021 12:17 PM in response to Hope_it_Helps

Usually the physical internal drive will appear as "disk0" which surprised me it did not on your previous photo. From the additional information you have provided about the drive appearing as a different higher number drive identifier and even missing completely tells me you have a bad SSD. The fact that the drive identifier was "disk1" and later a higher number tells me the SSD was having trouble getting to a ready state indicating a hardware issue.


If you were able to install macOS 10.15 to an external drive, then hopefully that means the system firmware was updated so it can support an NVMe SSD. At this point you will need to try installing an OWC Aura SSD to see if that resolves your problem.

https://eshop.macsales.com/shop/ssd/owc


Edit: You should confirm the laptop has the updated system firmware by booting from your external drive and launching the "System Profiler" app by Option-clicking the Apple menu and selecting the first item. On the default page look on the right pane for "BootROM". It should be something like 426.0.0.0 or higher if you installed Catalina or at a minimum the firmware should be 192.0.0.0.0 or 199.0.0.0.0. If the BootROM is not in this format, then please post the firmware version here. The laptop needs to already have had the system firmware updated to support an NVMe SSD before the original Apple SSD died or you will be unable to use a third party NVMe PCIe SSD in this laptop.

I ERASED my Macintosh HD and now can only boot using a USB!

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