Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

FoxyFoxyMcr

macrumors newbie
Original poster
Jul 24, 2022
7
0
Hi All!

Would any wonderful bod please help? Im tearing my hair out o_O

I've been trying to restore the Apple Hardware Test diagnostics tool on my 11" MacBook Air (2012 A1465) - based on various posts Ive read which say this achievable.

Ive mounted the Github download “AHTEFour” folder to Disk Utility and typed (in Terminal)

cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics \ /Volumes/Macintosh HD/System/Library/CoreServices/

I get this back:

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file

cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory


I don't know what any of this means, but I don't see the folder appear in the destination.

What am I doing wrong please? I can send the link I am using as guidance, if thats ok with the forum rules.

I am using Catalina 10.15.7 and think perhaps doing a clean install is what has wiped the original diagnostics folder. When i try to use the D key on start up, it starts internet recovery, makes me connect to my WiFI, and then says cannot load EFI/Drivers/TestSupport.Efi so possibly I am way off base with what I am doing. A Gal’s gotta give it go 💩
 

adrianlondon

macrumors 603
Nov 28, 2013
5,527
8,344
Switzerland
You have some weird stuff in your command.

First, what is "...ostics \ /Vol..."? Why the \?

Second, you have a space that has to be escaped. So "...osh HD" to "...osh\ HD"
 
  • Like
Reactions: FoxyFoxyMcr

FoxyFoxyMcr

macrumors newbie
Original poster
Jul 24, 2022
7
0
You have some weird stuff in your command.

First, what is "...ostics \ /Vol..."? Why the \?

Second, you have a space that has to be escaped. So "...osh HD" to "...osh\ HD"
Hiya 👋🏼

The command is what I copied from a post on apple.stackexchange. I thought it was to differentiate the end of the “copy this” and the the start of the “copy to” - is that not the case? 🙈

I’ll amend the Macintosh HD bit, thanks.
 

Slartibart

macrumors 68040
Aug 19, 2020
3,140
2,815
just use cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/Macintosh HD/System/Library/CoreServices/

the “\” was used to indicated that there is no line break. The command will copy “.diagnostics” from the volume “AHTEFour” to the folder “CoreServices” in your system. I am not sure about the permission, maybe you have to use sudo cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/Macintosh HD/System/Library/CoreServices/
 
  • Like
Reactions: FoxyFoxyMcr

FoxyFoxyMcr

macrumors newbie
Original poster
Jul 24, 2022
7
0
just use cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/Macintosh HD/System/Library/CoreServices/

the “\” was used to indicated that there is no line break. The command will copy “.diagnostics” from the volume “AHTEFour” to the folder “CoreServices” in your system. I am not sure about the permission, maybe you have to use sudo cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/Macintosh HD/System/Library/CoreServices/
Thanks! I get this reply again...

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file

cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory

Does this means its copied? Shouldn't I see a blue Diagnostics folder in the target location?
 

FoxyFoxyMcr

macrumors newbie
Original poster
Jul 24, 2022
7
0
Thanks! I get this reply again...

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file

cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory

Does this means its copied? Shouldn't I see a blue Diagnostics folder in the target location?
sudo cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/Macintosh HD/System/Library/CoreServices/

this one comes back with "password" and a little key symbol, but won't let me type the password
 

russell_314

macrumors 604
Feb 10, 2019
6,651
10,241
USA
sudo cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/Macintosh HD/System/Library/CoreServices/

this one comes back with "password" and a little key symbol, but won't let me type the password
I don't know much about this stuff but in a terminal window the characters don't show when typing a password. You're just doing it blind and press enter.
 
  • Like
Reactions: FoxyFoxyMcr

FoxyFoxyMcr

macrumors newbie
Original poster
Jul 24, 2022
7
0
I don't know much about this stuff but in a terminal window the characters don't show when typing a password. You're just doing it blind and press enter.
thanks for explaining this. I just typed it blind like you said and got the same

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file

cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
 

Slartibart

macrumors 68040
Aug 19, 2020
3,140
2,815
the problem is the space in the name of your SSD/hard drive. use:

cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/"Macintosh HD"/System/Library/CoreServices/

or

cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/Macintosh\ HD/System/Library/CoreServices/
 
  • Like
Reactions: FoxyFoxyMcr

FoxyFoxyMcr

macrumors newbie
Original poster
Jul 24, 2022
7
0
the problem is the space in the name of your SSD/hard drive. use:

cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/"Macintosh HD"/System/Library/CoreServices/

or

cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/Macintosh\ HD/System/Library/CoreServices/
Well I reckon they are the right commands, cos I get a massive long list of "computer says no" 🤣💩

i think Im going to have to speak to Apple about it. But it was good to a have a faff, first 🤣🤣
 

Slartibart

macrumors 68040
Aug 19, 2020
3,140
2,815
Well I reckon they are the right commands, cos I get a massive long list of "computer says no" 🤣💩

i think Im going to have to speak to Apple about it. But it was good to a have a faff, first 🤣🤣
You internal drive is called “Macintosh HD”… there is a space between both parts of the name. The terminal can resolve that only if you put it in quotes or if it’s preceded by a back slash. This is what I modified. Of course it is possible that additionally something doesn’t exist in the copied folder path on your system… still folder or file names including spaces must be masked as shown for use in the terminal.
 

Odessa

macrumors member
Nov 5, 2021
72
97
sudo cp -R /Volumes/AHTEFour/System/Library/CoreServices/.diagnostics /Volumes/Macintosh HD/System/Library/CoreServices/

this one comes back with "password" and a little key symbol, but won't let me type the password
just type your password and press enter, even if you dont see **** showing up, it's actually normal,
 

BanditoB

macrumors 6502
Feb 24, 2009
482
258
Chicago, IL
Are you certain that your storage drive is named "Macintosh HD". It is normally written without a space as in "MacintoshHD". If you've renamed your drive, then you need to replace it in the copy command.

A couple of other things: one, the folder "AHTEFour" doesn't exist on my system and there is also no folder called ".diagnostics" in my "CoreServices" folder. I suspect that they are not there for you as well. Secondly, you can copy files via Finder much more easily. Start finder, go to the "Go" menu and select "Go to folder" and there you can enter "/volumes", hit enter, and then browse from there.

If you find the ".diagnostics" folder in your "CoreServices" folder, you can then copy it from there.

Good luck!
 
Last edited:

NoBoMac

Moderator
Staff member
Jul 1, 2014
6,254
4,939
Really don't need the "/Volumes/Macintosh HD" in the destination path, as /System is rooted at MacHD (aka the internal drive).

Two, Catalina is a sealed volume at /System, so don't think any amount of simple copies will allow writing to the MacHD.

Third, guessing the diagnostics are probably now in one of the hidden boot/recovery partitions. Not at a Catalina machine right now to mount them and see what's there, so hence a guess.

EDIT: as I suspected, diagnostics is under the Recovery partition. On a Catalina machine, found it at following, once the Recovery partition is mounted:

Code:
% pwd
/Volumes/Recovery/8AC0FBFE-3F26-4682-87E1-7F06A2570B7F/.diagnostics
% ls
AppleDiagnostics.chunklist    Info.plist
AppleDiagnostics.dmg
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.