Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.7: Restore Apple Hardware Test boot mode System 10.7
Unless you have a Mac released after July 20, 2011, Lion removes the ability to hold 'D' at startup to boot into Apple hardware test. Apple now recommends you simply use the disks that came with your Mac. Fortunately, it's an easy feature to restore.

First, you need an install disk. You have a couple of options:

Use the install disk that came with you Mac. Note this may be the 'Applications' Disk, and not the primary install disk. To find out which it is for your model go here.

NOTE: It's best if you use the install discs specific to each Mac you have to guarantee AHT will work.

Or you an use a Snow Leopard install disk. For this to work your Mac model will need to be older than that install disk, that's when it was introduced, not when you bought it. If it's an original Snow Leopard disk, that's older than Oct 2009, or if it's a more recent one, older than 10.6.3. If your Mac is old enough, you may even have success with a Leopard install disk.

In any event, try to use the most recent disk that would work with your computer. If you're not sure if a disk will work for you, try the hint anyway, it won't harm your computer.

So, insert your install disk and open Terminal. Type:
sudo cp -R /Volumes/[your disk's name]/System/Library/CoreServices/.diagnostics /System/Library/CoreServices
And that's it! Once the directory copies over, you'll just need to hold down the D key to startup your Mac. Sometimes, the process is a bit slow, so be patient. If it doesn't work, you can try a different disk.

[crarko adds: I haven't tested this one. It's possible that some future Lion update will either break this hint, or more hopefully, restore the capability and render it obsolete.]
    •    
  • Currently 4.25 / 5
  You rated: 5 / 5 (8 votes cast)
 
[58,939 views]  

10.7: Restore Apple Hardware Test boot mode | 22 comments | Create New Account
Click here to return to the '10.7: Restore Apple Hardware Test boot mode' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.7: Restore Apple Hardware Test boot mode
Authored by: emale on Aug 25, '11 09:03:45AM

On the one hand Apple now recommends you simply use the disks that came with your Mac on the other hand Apple says "discs are dead" and removes optical drives from Macs. How crazy is this?
But great hint :-)



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: BiL Castine on Aug 25, '11 09:26:28AM
Had our esteemed moderator tested this hint, he would have found it doesn't work as described. System/Library/Core Services is only writable by the user when preceded by "sudo". Thus, the correct syntax should be
 sudo cp -R /Volumes/[your disk's name]/System/Library/CoreServices/.diagnostics /System/Library/CoreServices


[ Reply to This | # ]
Doh!
Authored by: cycomachead on Aug 25, '11 11:29:22AM

Yeah, you're quite correct! Sorry for the mistake.

Somehow I forgot to add that in when writing the hint (or I was using the root account at the time….)

Anyway, yes, sudo must be used. (It would be nice if the original hint could be modified. :))



[ Reply to This | # ]
Doh!
Authored by: crarko on Aug 25, '11 01:05:30PM

Fixed it. Thanks for the catch.

-- The esteemed moderator



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: slb on Aug 25, '11 04:09:19PM

Had out esteemed smarta$$ looked, he'd have seen that Baltutis below posted the correct command.

If you're gonna call someone out, be smarter.

sudo cp -R /Volumes/[your INSTALL DISK name]/System/Library/CoreServices/.diagnostics /System/Library/CoreServices



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: Sven G on Aug 25, '11 11:16:50AM

If you use the discs that came with your Mac, you can also simply install the "CPUHelpFiles.mpkg" metapackage, usually on the Applications Install Disc (part of "Install Bundled Software": select only "CPU Help Files" and deselect everything else): this will install AHT and also the documentation files for your machine.



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: cycomachead on Aug 25, '11 11:31:20AM

I forgot about the CPUHelpFiles package because other utilities in there (such as the processor pref pane seem to be broken now), but that does work if you would prefer not to use terminal.



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: Sven G on Aug 25, '11 11:53:54AM

Well, rather, the "Processor" preference pane was an optional part of the Developer Tools (up to version 3.x for Snow Leopard), while "CPUHelpFiles.mpkg" installs only AHT and the machine-specific documentation stuff inside "/Library/Documentation/User Guides And Information": so, it should be quite safe too install, as there are no extra utilities there.



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: Sven G on Aug 25, '11 11:55:34AM

Of course, *to* install (not "too")...



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: alexiskai on Aug 25, '11 12:27:13PM

I'm pretty sure this doesn't work if your boot volume is encrypted. You'd need to create a separate unencrypted boot disk/partition, boot to that, install AHT, then boot into AHT.



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: Crazor on Aug 28, '11 05:24:14AM

On encrypted systems, there is a small booter partition which contains the EFI application that asks for your password, loads the kernel from the booter partition and once the kernel found and unlocked your encrypted volume, system startup continues as usual.

If your system has the recovery system (and most Lion installs should have), it and the booter share a partition after your root volume. diskutil list will confirm there is this hidden partition called "Recovery HD". If your system for some reason does not have the recovery system, but you encrypted the root volume, the partition will be named "Boot OS X".

Either way, just mount this hidden partition ("diskutil mount Recovery\ HD" or "diskutil mount Boot\ OS\ X") and then copy the .diagnostics folder to /Volumes/{Recovery\ HD|Boot\ OS\ X}/System/Library/CoreServices.

After that, you can boot to AHT by holding D, like on unencrypted systems.

It is probably a good idea to copy AHT to the Recovery HD, regardless of the encryption status of your root volume, but I haven't tested if the firmware finds AHT there when the partition is not the first HFS+ volume on your primary disk.

Curiously, one can boot the recovery system, but not AHT, when the firmware password is set...



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: jollyroger on Jan 20, '12 06:42:08AM

I just tried doing this, but there isn't enough space on the recovery volume to copy all of the files in the .diagnostics folder. : (

---
-monoclast



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: baltwo on Aug 25, '11 03:46:13PM

Maybe I'm wrong, but the command should be:

sudo cp -R /Volumes/[your INSTALL disc's name]/System/Library/CoreServices/.diagnostics /System/Library/CoreServices/



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: slb on Aug 25, '11 04:06:54PM

You are correct, BT! Slight difference, but then that's what makes things work or not!

SB



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: jaydisc on Aug 25, '11 07:03:05PM

FYI, I couldn't get "D" to work on a 2011 MacBook Air. My drive is encrypted and I had a firmware password turned on. Once I disabled the firmware password, "D" worked. That's a bit unfortunate, as what if my drive has died? How can I reach the recovery partition to disable the firmware password to get to the hardware test.



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: octavius on Aug 30, '11 09:47:58AM

great hint but AHT is pretty worthless and no longer really used. If you want to run diags on your computer that will actually do something, use apple service diagnostics (ASD) for your model instead



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: bjterp00 on Dec 22, '11 01:39:12PM

I could not find my original disks, but was able to restore the .diagnostics folder from a pre Lion upgrade time machine backup. Had to show hidden files first, but then just went back far enough and restored that one folder. Boot while holding D worked fine.



[ Reply to This | # ]
HELP! Can't do ANY diagnosing on Late-2011 MBP w/ 16GB RAM! :-(((
Authored by: MadMacMan on Dec 31, '11 09:51:21AM

Alright, I still don't understand how to find either the "Holding the D" function and/or some other utility (3rd party or Apple) for those of us who have a (Late-2011) MacBook Pro!? No disks, just a useless SuperDrive and no USB stick either. I did make myself my own USB restore flash drive, however, and I also have the Recovery HD partition unhidden, mounted, but I just cannot seem to locate this ".diagnostics"...folder(is it?) or is it a pkg or a file? :-( System files are also visible, so I did some manual searching for the elusive diagnostic "something-or-other". No dice across the board. :(

I would really like to check my 2x8GB RAM chips, which, thus far, work perfectly fine and show up correctly everywhere they should, including System Info/Profiler, "About this Mac", iStat Menus, Activity Monitor, and a few others. I just want to make sure, as I had not heard of that memory company before and the price was incredible ($139 shipped, no tax for BOTH from a seller on Amazon).

Thanks for helping! ;-)



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: AKazak on Feb 13, '12 04:26:08AM

I've got MacBook Pro (15-inch, Late 2011) with Apple Hardware Test originally accessed by holding D at startup.
However after restoring Mac OS X Lion by the Internet using Lion Recovery D-key stopped working. I've followed the tip and copied .diagnostics folder:

ls -al /Volumes/Macintosh\ HD/System/Library/CoreServices/.diagnostics/
total 48
drwxr-xr-x 3 root wheel 102 Feb 13 16:06 .
drwxr-xr-x 125 root wheel 4250 Feb 13 16:06 ..
-rwxr-xr-x 1 root wheel 22590 Feb 13 16:06 diags.efi

and

ls -al /Volumes/Recovery\ HD/System/Library/CoreServices/.diagnostics/
total 48
drwxr-xr-x 3 User staff 102 Jun 27 2011 .
drwxr-xr-x 4 User staff 136 Jun 27 2011 ..
-rwxr-xr-x 1 User staff 22590 Jun 27 2011 diags.efi

However the D-key still doesn't call AHT as expected.
What else should I try?



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: Deegee on Oct 15, '12 10:57:45PM

Hi, did you ever manage to get anywhere with this?



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: selkovjr on Oct 14, '13 04:06:48PM

I confirm that this method still works with 10.8.5 installed on a Feb 2011 macbook pro.



[ Reply to This | # ]
10.7: Restore Apple Hardware Test boot mode
Authored by: Sven G on Feb 13, '14 12:31:53AM

On newer Macs (which shipped with Mavericks), Apple Diagnostics initially is on the Recovery HD; so, after mounting it with:

$ diskutil mount Recovery\ HD

... Apple Diagnostics is in the folder:

/Volumes/Recovery\ HD/com.apple.recovery.boot/.diagnostics

So, the best thing to do would be to make a copy of this invisible folder (personally, I zipped it and stored it on an external hard drive), in order to be able to restore it if you reinstall OS X (which also updates the recovery partition, removing the ".diagnostics" folder); when restoring it, also remember to restore the original permissions for the ".diagnostics" folder and its contents: i.e., essentially, root read-write, wheel read-only and everyone read-only.

Sadly, presently there seems to be no way to re-download Apple Diagnostics from Apple and reinstall it: so, if you didn't make the backup copy from your initial, out-of-the-box setup, the only option remaining is the Internet-based one, as also explained here:

http://support.apple.com/kb/HT5781

(Probably, the situation is similar also for Macs which shipped with Lion and Mountain Lion (with AHT)...)



[ Reply to This | # ]