IMac won’t boot to internal drive, usb sticks – Apple hardware test extended fine

boothard driveimacmacos

My iMac is being very odd. It won't boot using the internal hard drive. It chimes, starts the Yosemite progress bar and then changes and looks as if it is about to show me the login screen but then it just hangs at a grey screen. After about 30 seconds it just shuts down.

My first thought was that it is just a software issue or hard drive failure so I attempted to boot up on my USB stick with Yosemite installer on it and then another one with TechTools Pro on it, they all fail at the same point as above.

I booted up and did a Apple Hardware Test, the initial test came back OK. The extended test came back OK also.

Just for the hell of it, I have put a different hard drive in it but still can't boot to USB stick to install OS X. Grr.

Any other suggestions would be gladly and gratefully received. Thank you 🙂

Best Answer

You should try to boot your OS in verbose mode or safe mode to see whether you can fix it or not.

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

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

If you really need to reinstall Mac OS X Yosemite, I'd suggest you run this script from any Mac, you need to have Yosemite downloaded in /Applications.

#!/bin/sh
# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ Yosemite.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app

# Convert the boot image to a 8GB sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Yosemite
hdiutil resize -size 8g /tmp/Yosemite.sparseimage

# Mount the sparse bundle for package addition
hdiutil attach /tmp/Yosemite.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build

# Copy Packages and Base System files to the sparse bundle
rm /Volumes/install_build/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/
cp -p /Volumes/install_app/BaseSystem* /Volumes/install_build/

# Unmount the installer image and sparse bundle
hdiutil detach /Volumes/install_app
hdiutil detach /Volumes/install_build

# Resize the partition in the sparse bundle to remove any free space
hdiutil resize -size `hdiutil resize -limits /tmp/Yosemite.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Yosemite.sparseimage

# Convert the sparse bundle to ISO/CD master
hdiutil convert /tmp/Yosemite.sparseimage -format UDTO -o /tmp/Yosemite
rm /tmp/Yosemite.sparseimage
mv /tmp/Yosemite.cdr ~/Desktop/Yosemite.iso

Credit goes to the person who wrote that script for Maverick

You can then restore the ISO using Disk Utility on a 8Gb USB Stick and it will be bootable.