Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Hardware test...

I can't do (unless I'm really stupid) Apple Hardware Test on my box. I hold down D at boot, no go. I hold down Option-D at boot, no go. I do the same with the install disc in, no go ... Am I missing something? Does Tech Tool Deluxe do the same thing? Is it better, or not?

MacBook Pro, Mac OS X (10.6.8)

Posted on Jan 5, 2015 6:29 PM

Reply
67 replies

Feb 8, 2015 5:02 PM in response to Drew Reece

OK, that was it. I had been knocking my head against the wall for almost a week and it was such a simple thing. Thanks.


sudo bless --folder "/Volumes/iMac AHT/System/Library/CoreServices/.diagnostics" --file "/Volumes/iMac AHT/System/Library/CoreServices/.diagnostics/diags.efi"


I was thinking that, since there weren't quotes directly around iMac AHT, the space needed to be escaped. Didn't realize that the quotes around the entire thing took care of that. Btw, what is the purpose of the quotes around those two entire lines?

Feb 8, 2015 7:30 PM in response to WZZZ

WZZZ wrote:



Btw, what is the purpose of the quotes around those two entire lines?

Huh? In your command…?


sudo bless --folder "/Volumes/iMac AHT/System/Library/CoreServices/.diagnostics" --file "/Volumes/iMac AHT/System/Library/CoreServices/.diagnostics/diags.efi"

There are no quotes over the 2 lines, it's all one line too 🙂

I'm not sure I understand what you mean?

Feb 9, 2015 5:33 AM in response to Drew Reece

1. All the bless commands I've seen have enclosing quotes around the entire line (two sets of quotes around the entire two lines that are separated by --file), not just around the volume name; is that done just as a precaution in case the volume name has spaces? and 2. For those bless commands, why isn't it sufficient just to suggest putting quotes around the volume name, if and only if the volume name has spaces?


In other words, would this command have worked equally well:


sudo bless --folder /Volumes/"iMac AHT"/System/Library/CoreServices/.diagnostics" --file /Volumes/"iMac AHT"/System/Library/CoreServices/.diagnostics/diags.efi"


Instead of


sudo bless --folder "/Volumes/iMac AHT/System/Library/CoreServices/.diagnostics" --file "/Volumes/iMac AHT/System/Library/CoreServices/.diagnostics/diags.efi"


My question was really are those quotes necessary around the entire two lines that are separated by --file? Are they doing anything other than escaping the space in the volume name? It seemed like they were doing something other than that.

Feb 9, 2015 11:15 AM in response to WZZZ

Wrapping the whole line would escape everything enclosed, it seems to work OK. I haven't seen reasons for quoting the command & the argument flags like that, it seems unusual to me but it does work 🙂

Double quotes lead to the contents being interpolated or expanded in the shell. You can use single quotes if you want to avoid it & pass a literal value that will 'stay literal'. That would fail if you wrap the whole line in single quotes.


You are right, the disk name could be quoted or you could quote just the spaces too…


sudo bless --folder /Volumes/iMac" "AHT/System/Library/CoreServices/.diagnostics --file /Volumes/iMac" "AHT/System/Library/CoreServices/.diagnostics/diags.efi


It doesn't really matter so long as the right characters are passed, the trouble is knowing which ones to escape or quote, I tend to escape manually when testing then use double quotes in scripts.


Did you get the Mac to boot from AHT?

Feb 9, 2015 7:31 PM in response to Drew Reece

Interesting, never came across inserting double quotes inside the space that needs to be escaped. The Mac booted to the AHT right away from Option/Alt (think it got renamed "boot.efi"). Didn't run it; just keeping it around (along with the real deal ASD for this Mac) in case the optical drive ever gets funky.

Hardware test...

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