Lost hard drive -could I get it back using Terminal ?

Hi,

I have tried a lot of the diskutil in Unix using Terminal, but I think I am missing something.

Could You help me to get my intern hd back, so I can install a new Mac OS system, step by step using Terminal. The disk is grey...

Please, see my photos.


Best,

Magnus

iMac 21.5", macOS 10.12

Posted on Jul 17, 2019 10:52 AM

Reply

Similar questions

23 replies

Jul 17, 2019 10:59 AM in response to MrAgnwik

You mean these don't work?


1. Start up from macOS Recovery

To start up from macOS Recovery, turn on your Mac and immediately press and hold one of the following combinations on your keyboard. Command-R is generally recommended, especially if you never installed macOS Sierra 10.12.4 or later.

Command (⌘)-R

Install the latest macOS that was installed on your Mac.

Option-⌘-R

Upgrade to the latest macOS compatible with your Mac.

Shift-Option-⌘-R

Install the macOS that came with your Mac, or the closest version still available.


2. Decide whether to erase (format) your disk

If you need to erase your disk before installing macOS, select Disk Utility from the Utilities window, then click Continue. You probably don't need to erase, unless you're selling or giving away your Mac or have an issue that requires you to erase. Learn more about when and how to erase.

3. Install macOS

After starting up from macOS Recovery, follow these steps to install macOS:

1 Choose Reinstall macOS (or Reinstall OS X) from the Utilities window.

2 Click Continue, then follow the onscreen instructions to choose your disk and begin installation.

3 If the installer asks to unlock your disk, enter the password you use to log in to your Mac. If it doesn't see your disk, or it says that it can't install on your computer or volume, you might need to erase your disk. 


1 Please allow installation to complete without putting your Mac to sleep or closing its lid. During installation, your Mac might restart and show a progress bar several times, and the screen might be empty for minutes at a time.

If your Mac restarts to a setup assistant, but you're selling or giving it away, press Command-Q to quit the assistant without completing setup. Then click Shut Down. When the new owner starts up the Mac, they can use their own information to complete setup.


If you never installed macOS Sierra 10.12.4

If macOS Sierra 10.12.4 or later was never installed on your Mac, macOS Recovery works differently:

• Command-R is still the recommended way to start up from macOS Recovery. This combination makes sure that the installation isn't associated with your Apple ID, which is important if you're selling or giving away your Mac.

• Option-Command-R installs the macOS that came with your Mac, or the closest version still available.

• Shift-Option-Command-R isn't available.

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


Jul 17, 2019 11:39 AM in response to MrAgnwik

Recovery on older Macs needs some storage on the Mac. Newer Macs (also) have Internet Recovery. But you’re already apparently booted into something; into Recovery or Internet Recovery or into a bootable USB installer. The latter can be created on another local Mac, and the created USB device transferred over to this Mac and booted.


If erasing and formatting as GPT with HFS+ from within Disk Utility.app (booted from the bootable installer) doesn’t work? Replace the hard disk. It’s very likely failed.


Jul 17, 2019 1:40 PM in response to MrAgnwik

To check the health of the hard drive you can create a bootable Knoppix Linux USB drive using Etcher (Mac/Windows/Linux). Option Boot the Knoppix drive and select the orange icon labeled "EFI". Once at the Knoppix desktop, click on the "Start" menu in the lower left of the Taskbar and navigate to "System Tools --> GSmartControl". If the drive shows as failing and it is a traditional hard drive, then it has a physical failure. If the drive reports as healthy or you have an SSD installed, then double-click the drive icon in GSmartControl and it should provide an option to save the report which you can post here as the SMART Attributes and error log may contain clues which don't necessarily trigger a failure alert.


Jul 18, 2019 6:13 AM in response to MrAgnwik

This does confirm you have a failing hard drive. Attribute #184 End-to-End Errors are past their expected values and SMART is actually showing a failing condition. I've personally never seen this error condition before. Here is the information on the particular error if you are interested:


This attribute is a part of Hewlett-Packard's SMART IV technology, as well as part of other vendors' IO Error Detection and Correction schemas, and it contains a count of parity errors which occur in the data path to the media via the drive's cache RAM.[41]

https://en.wikipedia.org/wiki/S.M.A.R.T.#ATA_S.M.A.R.T._attributes

Jul 17, 2019 11:09 AM in response to Tesserax

Command-R is not working

Apple Disk Utility doesn't´t work.

Using Terminal and "diskutil" reformatDisk or reformatVolume

its starts , but to the end it can´t mount the disk

The "disk0s2" is grey and I can´t use First Aid or Erase in Apple Disk Utility, then its lost and I have to restart the iMac.


Using diskutil eraseDisk HFS+ MacHD disk0, doesn't work...as it can´t mount.




Jul 18, 2019 7:27 AM in response to MrAgnwik

Depending on the exact model of iMac you have, you may need to purchase a temperature sensor adapter so the fans don't run at full speed when using a third party drive.


iMac Late 2009 and iMac 2010 Thermal Sensor Adapter

https://eshop.macsales.com/item/OWC/DIDIMACHDD09/


iMac 2011 Thermal Sensor Adapter

https://eshop.macsales.com/item/OWC/DIDIMACHDD11/


iMac 2012+ Thermal Sensor Adapter

https://eshop.macsales.com/item/OWC/DIDIMACHDD12/



Since SSD prices have come down so much, you should consider installing an SSD. Just be aware that only a few vendors supply an OS independent firmware updater. Also you will need a 2.5" to 3.5" adapter bracket to mount the SSD.



Good verified working backups are even more important when using SSDs since an SSD can fail without any warning signs and data recovery can be very difficult to impossible.



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.

Lost hard drive -could I get it back using Terminal ?

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