ethereality

Q: How can I start the Apple Hardware Test when holding D doesn't work and I don't have the installation disc?

How can I start the Apple Hardware Test when holding D doesn't work and I don't have the installation disc?

 

  1. The directions say, "Press and hold the D key before the gray startup screen appears." This does not work.
  2. The "Apple Hardware Test Read Me.rtf" file says, "If your computer does not restart to Apple Hardware Test: Restart your computer with the DVD containing Apple Hardware Test." I do not have such a DVD, and my installation disc -- assuming it is with the packaging from when I bought this laptop -- is about 11,000 km away.


I am preparing to send in my August 2010 Macbook Pro to be refurbished, because it is randomly ceasing to function (e.g. randomly taking minutes to complete a given task) but I was hoping to diagnose and solve any problems myself before it came to that. Apple Support recommends this diagnostic test as a first step, and so I am trying to do it. Please help me.

MacBook Pro, OS X Yosemite (10.10.1), 2.4GHzIntelCore2Duo;4GB 1067MHzDDR3

Posted on Jan 22, 2015 6:07 PM

Close

Q: How can I start the Apple Hardware Test when holding D doesn't work and I don't have the installation disc?

  • All replies
  • Helpful answers

Page 1 Next
  • by dot.com,

    dot.com dot.com Jan 22, 2015 6:18 PM in response to ethereality
    Level 2 (434 points)
    Jan 22, 2015 6:18 PM in response to ethereality

    Try reading this discussion - some, repeat some of the AHT downloads are available - depends on your exact model. Make sure to get the correct one for your hardware (if you're not sure how to know this ask):

     

    Imac diagnostics will not start in Mavericks

     

    Good luck

  • by Kappy,

    Kappy Kappy Jan 22, 2015 6:17 PM in response to ethereality
    Level 10 (271,052 points)
    Desktops
    Jan 22, 2015 6:17 PM in response to ethereality
  • by ethereality,

    ethereality ethereality Jan 22, 2015 6:49 PM in response to Kappy
    Level 1 (38 points)
    Notebooks
    Jan 22, 2015 6:49 PM in response to Kappy

    Kappy, it appears the article you linked is for getting the test off the DVD, which I've already explained I don't have.

  • by Drew Reece,

    Drew Reece Drew Reece Jan 22, 2015 8:18 PM in response to ethereality
    Level 5 (7,537 points)
    Notebooks
    Jan 22, 2015 8:18 PM in response to ethereality

    This seems the easiest way to figure out your model info to me…

    https://github.com/upekkha/AppleHardwareTest

     

    These two Terminal commands from that page will output the info that matches Kappy's list or the ones on Github

    sysctl hw.model | awk '{ print $2 }'

    ioreg -l | grep board-id | awk -F\" '{ print $4 }'




  • by ethereality,

    ethereality ethereality Jan 22, 2015 11:04 PM in response to dot.com
    Level 1 (38 points)
    Notebooks
    Jan 22, 2015 11:04 PM in response to dot.com

    I have downloaded the indicated file for my machine, but cannot copy its hidden files into /System/Library/CoreServices/.diagnostics: It is asking me if I want to overwrite CoreServices (using the Finder application), and saying the folders are identical (in terminal):

    $ cp -n CoreServices/ ../../System/Library/CoreServices/

    cp: ../../System/Library/CoreServices and CoreServices/ are identical (not copied).

     

    $ cp -Rn CoreServices/ ../../System/Library/CoreServices/

    cp: ../../System/Library/CoreServices and CoreServices/ are identical (not copied).

     

    $ cp -Rn CoreServices/. ../../System/Library/CoreServices/

    cp: ../../System/Library/CoreServices/. and CoreServices/. are identical (not copied).

    Is my attempt to copy the files from the downloaded CoreServices folder into my computer's 'actual' CoreServices folder incorrect? How do I proceed? Is there really no simple way to enable 'Show Hidden Files and Folders' like in Windows?

     

    Replacing or overwriting the folder while trying to copy seems unacceptable, since it implies all the other files will be erased in order to copy these, and I don't know how to copy the hidden files into this hidden directory. Hence I cannot proceed.

  • by Drew Reece,

    Drew Reece Drew Reece Jan 23, 2015 1:34 AM in response to ethereality
    Level 5 (7,537 points)
    Notebooks
    Jan 23, 2015 1:34 AM in response to ethereality

    eek, that looks bad! Where are you getting these copy instructions from?

     

    The -n looks like it might have saved you from nuking your OS, stop trying that command!

     

    It looks like you haven't added .diagnostics to the path to me, but you should wait for a second opinion or show us the full instructions for reference.

  • by dot.com,Solvedanswer

    dot.com dot.com Jan 23, 2015 2:36 PM in response to ethereality
    Level 2 (434 points)
    Jan 23, 2015 2:36 PM in response to ethereality

    These are the commands I would use if it were my system:

     

    Assume you have downloaded the correct hardware test image -- you've never told us the exact model of MacBook you have so are you positive you have the correct one? Once the test image is mounted in /Volumes/AHTCTwo (this name might be different depending on which AHT image you downloaded)  -- just double-click on the "dmg" file you downloaded to mount it, then do the following in a terminal window:

     

         cd  /Volumes/AHTCTwo/System/Library/CoreServices

         sudo mkdir /System/Library/CoreServices/.diagnostics                                <== only if the .diagnostics folder does not exist

         sudo ditto .diagnostics /System/Library/CoreServices/.diagnostics

         cd /System/Library/CoreServices/.diagnostics

         sudo xattr -dr com.apple.quarantine CommonAHTResources/

         sudo xattr -dr com.apple.quarantine Mac-F22586C8/

         sudo xattr -d com.apple.quarantine diags.efi

     

    All the "sudo" commands may prompt for your admin password (only do this when you've logged into an "admin" type account).


    The last 3 "sudo" commands remove the com.apple.quarantine attributes recursively (if they don't have that extended attribute you don't need to do them) that get put on the files and folders during the copy - doesn't seem to be a way to have this not happen as I tried a couple of different things to copy the folders and file. Also the names of the folders may be different for the version of the AHT image you downloaded for your system - change the names accordingly. There was one "diags.efi" file and two folders in the image I downloaded.

     

    There was also a "Apple Hardware Test Read Me.app" program in the /Volumes/AHTCTwo folder - would guess that all of the AHT download images have them - so run it and it opens up TextEdit and it explains a lot of what will happen. Suggest you read it before running the hardware test (which you do by holding down the "d" key during a power-on or reboot).

     

    If you have any questions -- ASK FIRST.

     

    Good luck

  • by ethereality,

    ethereality ethereality Jan 25, 2015 4:24 PM in response to Drew Reece
    Level 1 (38 points)
    Notebooks
    Jan 25, 2015 4:24 PM in response to Drew Reece
    Where are you getting these copy instructions from?

     

    dot's thread links to https://github.com/upekkha/AppleHardwareTest which says,

    Download the AHT for your computer model and use the contents to restore the /System/Library/CoreServices/.diagnostics folder,

    so I was simply trying to copy the contents from the downloaded folder into the correct location.

  • by ethereality,

    ethereality ethereality Jan 25, 2015 4:44 PM in response to dot.com
    Level 1 (38 points)
    Notebooks
    Jan 25, 2015 4:44 PM in response to dot.com

    dot.com wrote:

     

    you've never told us the exact model of MacBook you have so are you positive you have the correct one?

    I'm sure I followed github's directions. Quoting the terminal command and output:

    $ sysctl hw.model | awk '{ print $2 }'

    MacBookPro7,1

     

    There is only one entry matching 'MacBookPro7' on that webpage, "MacBookPro7,1 Mac-F222BEC8", so that is what I downloaded. It mounts as AHTCOne, but I copied its contents to my desktop before trying to copy its contents to the CoreServices folder.

    dot.com wrote:

     

         sudo mkdir /System/Library/CoreServices/.diagnostics                                <== only if the .diagnostics folder does not exist

    Doesn't my previously quoted error message from the terminal imply this folder does already exist, and with all the same contents that I downloaded? "[source folder] and [destination folder] are identical", it said when I tried copying earlier. (Perhaps it refused to copy only because the folder names were the same, and it overwrites rather than merges -- i.e. I should have tried using this 'ditto' command instead? I read the man page before trying the command, so I had included the -n precisely to stop it from overwriting other files...)

     

    Moreover, how can I view the hidden folders, such as whether .diagnostics exists?! I cannot find a 'show hidden folders' command in the Finder application!

     

    I had tried earlier to see whether the .diagnostics folder were present: Checking the folder contents with 'ls' from within my Desktop:

    $ ls ../../System/Library/CoreServices/

    Volume Name Icon

    I don't really know what this implies, but ls is supposed to "list directory contents". It's surely wrong, because when I navigate to the same folder within Finder there are many files, e.g. "Dock.app", "DumpPanic", "Encodings" folder, Finder.app, loads of things I don't want to alter.

     

    dot.com wrote:

     

         sudo xattr -dr com.apple.quarantine CommonAHTResources/

         sudo xattr -dr com.apple.quarantine Mac-F22586C8/

         sudo xattr -d com.apple.quarantine diags.efi

     

    [...]


    The last 3 "sudo" commands remove the com.apple.quarantine attributes recursively (if they don't have that extended attribute you don't need to do them) that get put on the files and folders during the copy - doesn't seem to be a way to have this not happen as I tried a couple of different things to copy the folders and file. Also the names of the folders may be different for the version of the AHT image you downloaded for your system - change the names accordingly. There was one "diags.efi" file and two folders in the image I downloaded.

    Are you saying I must run this command for every single file in the downloaded CoreServices folder?*

     

    * How do I copy-paste the current path location from the Finder application?

  • by Drew Reece,

    Drew Reece Drew Reece Jan 25, 2015 5:34 PM in response to ethereality
    Level 5 (7,537 points)
    Notebooks
    Jan 25, 2015 5:34 PM in response to ethereality

    ethereality wrote:

    It mounts as AHTCOne, but I copied its contents to my desktop before trying to copy its contents to the CoreServices folder.

    Don't do that, dot.com didn't tell you to do that, instructions break when you decide to do your own thing.

     

    ethereality wrote:

    Doesn't my previously quoted error message from the terminal imply this folder does already exist, and with all the same contents that I downloaded? "[source folder] and [destination folder] are identical", it said when I tried copying earlier. (Perhaps it refused to copy only because the folder names were the same, and it overwrites rather than merges -- i.e. I should have tried using this 'ditto' command instead? I read the man page before trying the command, so I had included the -n precisely to stop it from overwriting other files...)

    Go back & re-read your earlier post. There is no '.diagnostics' in the path you used.

    The -n option of copy saved your bacon.

    If in doubt get the manual out… ("man commandname" in Terminal or google "mac manual commandname")

    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/cp.1.html

     

    You were attempting to replace the ENTIRE CoreServices folder.


    CoreServices is critical to allow booting, you can't afford to get this wrong.

    Do you have a bootable backup?

    Don't proceed any further without one.

     

    ethereality wrote:

    I had tried earlier to see whether the .diagnostics folder were present: Checking the folder contents with 'ls' from within my Desktop:

    $ ls ../../System/Library/CoreServices/

    Volume Name Icon

    Again manuals help…

    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/ls.1.html

     

    From ls manual


    -a  Include directory entries whose names begin with a dot (.).

    -a means .diagnostics will be shown

     

    -l  (The lowercase letter ``ell''.) List in long format. (See below.) If the output is to a terminal, a total sum for all the file sizes is output on a line before the long listing.

    -l gives more info

     

    Put that together…

    ls -la /System/Library/CoreServices/

    …will list an installed .diagnostics folder if it exists.

     

    You can show hidden files in Finder but I strongly recommend against it - it encourages to look in places where you really do not need to be.

    ethereality wrote:

     

    dot.com wrote:

     

         sudo xattr -dr com.apple.quarantine CommonAHTResources/

         sudo xattr -dr com.apple.quarantine Mac-F22586C8/

         sudo xattr -d com.apple.quarantine diags.efi

    Are you saying I must run this command for every single file in the downloaded CoreServices folder?*

     

    * How do I copy-paste the current path location from the Finder application?

     

    Do not run that on every item in CoreServices!!! dot.com is only removing attributes within the .diagnostics folder ONLY.

     

    * Paths can be completed via drag & dropping folders in Terminal.


    Please take more care to follow the instructions posted, this part of the OS will give you a bad day if you make typo's or mistakes.

  • by dot.com,

    dot.com dot.com Jan 25, 2015 6:15 PM in response to ethereality
    Level 2 (434 points)
    Jan 25, 2015 6:15 PM in response to ethereality

    You should pat yourself on the back for tackling this bit of command line stuff - most people don't learn to use the Terminal and command line stuff - it's a different kind of skill that comes in very handy sometimes - for example with this. Finder sometimes makes things easy and sometimes it makes them hard or even impossible.

     

    I'm not trying to give you a hard time or anything, just want to be sure you've got the right version. We can't see what you're doing and can only go by what you say. If you leave out an important detail, need to verify that before recommending what you might want to try. Without knowing exactly which download you got I had to assume a folder name that might not be what you have. So understand what it's doing before you do it and make any appropriate changes since we aren't standing over your shoulder to help. If you don't understand ASK BEFORE, not after, cause by then it might be too late to help.

     

    The commands I gave are what would do the trick I believe. The order is important, very important, so don't do part of them and and then do others and expect things to work (they might but they also might not). Or use different commands that are similar, but not equivalent. They are in a specific order for a reason. The "xattr" command uses the "-dr" argument - the "r" means recursive so you only do it on the top level folder (so you don't need to do the xattr command on dozens or hundreds or thousands of things) - the "d" means to remove the named attribute. Read the "xattr" man page (in a Terminal window do a "man xattr" (without the quotes)). Have fun - there are likely some things in there that would need more explanation - suggest learning about "man" pages if you want to do much with the Terminal command line). A handy thing to do is "man -k xxx" which shows all the commands that contain the string xxx - which is a good way to find the actual command sometimes (but not always).

     

    If you don't want to follow my suggestions, that's fine. I'm just trying to help. By using the "-n" argument, you saved yourself. But the fact that you don't understand that files and folders starting with a "." are hidden from you (unless you use the "-a" arg with ls), you should read the man page for "ls" as well.

     

    I would recommend you read the man pages for any commands you don't understand so you can learn what they are doing. After that and you still don't understand something please ask.

  • by ethereality,

    ethereality ethereality Mar 2, 2015 12:50 AM in response to dot.com
    Level 1 (38 points)
    Notebooks
    Mar 2, 2015 12:50 AM in response to dot.com

    I've done as you described, after reading the commands' man pages to understand them. I will review the included Read Me.app as you suggest (why is this text file an application? in case the computer's installed text editor isn't working?) and try running the software from startup soon.

     

    Here's the relevant parts of my Terminal, in case you wish to double-check me (or see what my downloaded filenames look like):

    Last login: Mon Mar  2 15:59:52 on ttys001

    [computer name]:~ [account name]$ pwd

    /Users/[account name]

    [...]

    [computer name]:~ [account name]$ ls ../../System/Library/CoreServices/.diagnostics

    ls: ../../System/Library/CoreServices/.diagnostics: No such file or directory

    [computer name]:~ [account name]$ ls -a ../../System/Library/CoreServices/.diagnostics

    ls: ../../System/Library/CoreServices/.diagnostics: No such file or directory

    [computer name]:~ [account name]$ cd /Volumes/AHTCOne

    [computer name]:AHTCOne [account name]$ cd /Volumes/AHTCOne/System/Library/CoreServices/

    [computer name]:CoreServices [account name]$ ls .diagnostics

    CommonAHTResources Mac-F222BEC8 diags.efi

    [computer name]:CoreServices [account name]$ ls /System/Library/CoreServices/.diagnostics

    ls: /System/Library/CoreServices/.diagnostics: No such file or directory

    [computer name]:CoreServices [account name]$ man ls

    [computer name]:CoreServices [account name]$ ls -a /System/Library/CoreServices/.diagnostics

    ls: /System/Library/CoreServices/.diagnostics: No such file or directory

    [computer name]:CoreServices [account name]$ sudo mkdir /System/Library/CoreServices/.diagnostics

     

     

    WARNING: Improper use of the sudo command could lead to data loss

    or the deletion of important system files. Please double-check your

    typing when using sudo. Type "man sudo" for more information.

     

     

    To proceed, enter your password, or type Ctrl-C to abort.

     

     

    Password:

    [computer name]:CoreServices [account name]$ man ditto

    [computer name]:CoreServices [account name]$ pwd

    /Volumes/AHTCOne/System/Library/CoreServices

    [computer name]:CoreServices [account name]$ ls -a

    . ._Volume Name Icon Volume Name Icon

    .. .diagnostics

    [computer name]:CoreServices [account name]$ sudo ditto .diagnostics /System/Library/CoreServices/.diagnostics

    Password:

    [computer name]:CoreServices [account name]$ cd /System/Library/CoreServices/.diagnostics

    [computer name]:.diagnostics [account name]$ man xattr

    [computer name]:.diagnostics [account name]$ pwd

    /System/Library/CoreServices/.diagnostics

    [computer name]:.diagnostics [account name]$ ls -a

    . CommonAHTResources diags.efi

    .. Mac-F222BEC8

    [computer name]:.diagnostics [account name]$ sudo xattr -dr com.apple.quarantine CommonAHTResources/

    Password:

    [computer name]:.diagnostics [account name]$ sudo xattr -dr com.apple.quarantine Mac-F222BEC8/

    [computer name]:.diagnostics [account name]$ sudo xattr -d com.apple.quarantine diags.efi

    xattr: diags.efi: No such xattr: com.apple.quarantine

    [computer name]:.diagnostics [account name]$

  • by Drew Reece,

    Drew Reece Drew Reece Mar 2, 2015 10:42 AM in response to ethereality
    Level 5 (7,537 points)
    Notebooks
    Mar 2, 2015 10:42 AM in response to ethereality

    It looks like it is installed, have you rebooted holding D?

     

    Does it start running AHT?

Page 1 Next