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

h00ligan

macrumors 68040
Original poster
Apr 10, 2003
3,046
147
London
If you partition the factory drive, or replace it with a new drive - you cannot recover the apple hardware test through any reasonable means.

This was confirmed with a senior apple tech today.

Even if you use the recovery tool to make a thumb drive, then use that thumb drive to recreate apple's recovery partition.. then use that recovery partition to resintall from the internet - it will not be placed back.

The only way to then replace it is to find a factory fresh machine and copy it over using terminal from the mounted target disk.. and even that is iffy ( based on the source machine type.

The stupidity keeps on rolling. The bottom line is, there is no way to do a real factory restore.
 
Last edited:
I'm new to Macs so I don't understand the risk I am running by this shortcoming. If I were to replace my OEM drive with a new SSD on my 2010 13" MBP, for example, what will I loose by not being able to recreate the apple hardware test properly? Data loss (Assume I'm running a backup utility such as Timemachine or similar)? Or is this an inconvenience? Thank you for helping me to understand.
 
If you partition the factory drive, or replace it with a new drive - you cannot recover the apple hardware test through any reasonable means.

This was confirmed with a senior apple tech today.

Even if you use the recovery tool to make a thumb drive, then use that thumb drive to recreate apple's recovery partition.. then use that recovery partition to resintall from the internet - it will not be placed back.

The only way to then replace it is to find a factory fresh machine and copy it over using terminal from the mounted target disk.. and even that is iffy ( based on the source machine type.

The stupidity keeps on rolling. The bottom line is, there is no way to do a real factory restore.

I agree, it's unfortunate the test partition can't be restored. I believe our original MBA had this feature and I replaced its drive - only restoring the SL partition. I never tested the test feature after that, but based on what you're saying, it's gone.

If it indeed is a special partition on the HD and hidden, and if would need to need to use Terminal anyway, why not make an image file of the test partition, then recreate the partition on the new drive and restore from the image file? I don't have an example here to work with here, but I assume it's on its own partition. You would need to save the UUID to restore the correct partition type. Also, it should be recreated in the same relative partition position.
 
If you partition the factory drive, or replace it with a new drive - you cannot recover the apple hardware test through any reasonable means.

Sorry to be dense but could you please explain what an apple hardware test is?

When would we be sorry that it was missing?

New macbook pro 2011 ... I have reinstalled my operating system from the internet onto a complete fresh drive and everything works just peachy! Apps all authorized etc ...
 
Sorry to be dense but could you please explain what an apple hardware test is?

When would we be sorry that it was missing?

New macbook pro 2011 ... I have reinstalled my operating system from the internet onto a complete fresh drive and everything works just peachy! Apps all authorized etc ...

Apple Hardware Test (AHT) contains a suite of diagnostics that will test the hardware of your computer. It's a great way to rule out a hardware issue when troubleshooting your computer.

Read: http://support.apple.com/kb/ht1509
 
According to the linked Apple Tech page:

"To start up your computer in Apple Hardware Test:

Press the power button to turn on your computer.
Press and hold the D key before the gray startup screen appears. An Internet-enabled connection via Ethernet or Wi-Fi is required to use this feature.
Note: Some Macintosh computers that shipped with OS X Lion support the use of Apple Hardware Test over the Internet. These computers will start up to an Internet-based version of AHT if the hard drive does not contain AHT."

and further down:

"Additional Information

For some Apple computers that shipped with OS X Lion, if Apple Hardware Test cannot be found on the hard drive, an Internet-based version starts up instead."

So, some new Macs that shipped with Lion have it on the HD and some don't? That seems odd.
 
It looks like the majority of machines use the AHT off an included disc, so earlier machines and at least some portion of those shipped with Lion, don't need to worry about restoring the AHT partition.

I would, just for my own knowledge, be interested in seeing what the AHT partition looks like, both positionally and size wise. If someone has the HD version, I'd appreciate seeing what the output from the following looks like:
Code:
%[B]diskutil list[/B]
%[B]sudo gpt -r show -l disk0[/B]
Thanks.

And, as always, make sure to have a backup of your data, just in case (of Murphy, for one ;) ).
 
It's not a partition. The aht lives on the boot drive and is bootable. Even discounting the below if you have a bad drive there is no way to runt aht without a bootable disk from the factory.

Part 1

Here's what happens. On a new machine you get a recovery partition and os partition. Let's separate the two to discuss the issue.

You can make a bootable thumb drive using apples recovery assistant they just posted. That rebuilds a disk with recovery partition. This partition is necessary to run disk diagnostics on the os partition, reinstall lion, restore from time machine. You can complete these from the thumb drive so recreating the partition is not absolutely necessary if you want to carry the thumb drive.

Caveat. You MUST recreate the partition if you want to use filevault 2. It is a necessary component of filevault 2 and running recovery from a thumb drive doesn't work. The odd factor here is that if you have disk problems you cannot pass a decrypt key and run file hierarchy repair. Odd because it is required and for no size cost the decryption should be possible.

As it sits If your encrypted disk starts to fail. It fails. This is new behavior compared to the initial filevault 1 implementation. where the os was separate and repairable regardless of encrypted home directories. It is actuall much more of a risk for data loss especially given fv2 high failure and time machine failing every time for me.

Part 2.

On the os drive there lives a hidden folder in system / library / coreservices. It is named .diagnostic tools. You can see it from terminal with a sudo ls -la |more on that directory. (if someone with lion could tarball that .diagnostic folder for me I'd be grateful)

This .diagnostic tool exists only in the coreservices folder on a factory install. When you reinstall using the recovery partition you do not get back the system specific .diagnostictools folder because what you are getting during that install is a basic copy/install of lion.

Attempting to sudo cp the file back from an old system recovery disk (2007 MacBook pro) allows me to boot with d held down however the tool cannot be run as it is too old. In theory anyone who has the system restore disks for 10.6.7 or 8 should be able to restore this way.

Clearly this was a massive oversight. To circumvent this issue when they caught it on new model machines with no optical drive, one can boot using option d and run hardware test from apples servers.

Someone was just stupid and forgot to put this capability into all released lion computers that lack recovery media. I would hope/ expect apple
Would release a package to reinstall the hardware test.

Also to clarify some above confusion the restore partition can be remade and lion can be reinstalled. The issue is it will never be exactly as it was from the factory and at least one quite important tool is missing.

Also to another above respondent you are correct. Some can boot from the Internet. Driveless models. This was apples big effup. They didn't realize somehow that since no media existed all lion machines need this. Any Mac shipping with lion and an optical drive is going to have this issue.

This was all written on iPhone. Sorry for typos.
 
Last edited:
Thanks for the clarification. So, it's a special boot mode which resides within the OS partition. I would not expect to find the file on my Early 2009 UB, since AHT for this machine would be on the original restore discs.
 
I would guess they just programmed the efi to look at a bootable executable when d is pressed. :/ Using the disc you can copy it to your mac if it is not there, it's pretty easy actually.. but there are no discs for these machines..
 
I have a question. Look at the screenshot below. Is the partition with the hardware test tools in disk0s1? That partition is 209.7MB (209,715,200 bytes) in size. I'm wondering if I should make an image of it since I am planning to replace the stock HDD with an SSD soon.
 

Attachments

  • Screen Shot 2011-09-13 at 2.24.53 PM.png
    Screen Shot 2011-09-13 at 2.24.53 PM.png
    178.8 KB · Views: 259
Doubtful. One can boot from the drive with one partition to run aht. You can however tarball the relevant folder to tester it later.

That partition may have to do with filevault. Are you using filevault?
 
I'm new to Macs so I don't understand the risk I am running by this shortcoming. If I were to replace my OEM drive with a new SSD on my 2010 13" MBP, for example, what will I loose by not being able to recreate the apple hardware test properly? Data loss (Assume I'm running a backup utility such as Timemachine or similar)? Or is this an inconvenience? Thank you for helping me to understand.

The 2010 MBP comes with DVDs, this does not concern you in any way. The OP is referring to the newer models which have stopped coming with restore DVDs containing the hardware test.
 
Doubtful. One can boot from the drive with one partition to run aht. You can however tarball the relevant folder to tester it later.

That partition may have to do with filevault. Are you using filevault?

No, I am not running filevault. That partition is supposed to be hidden by default and normally wouldn't even show up in disk utility.

Just to be clear, if the Apple Hardware Test Tools are on the main partition and is hidden, how come disk cloning software or Time Machine cannot back it up?
 
If you partition the factory drive, or replace it with a new drive - you cannot recover the apple hardware test through any reasonable means.

This was confirmed with a senior apple tech today.

Even if you use the recovery tool to make a thumb drive, then use that thumb drive to recreate apple's recovery partition.. then use that recovery partition to resintall from the internet - it will not be placed back.

The only way to then replace it is to find a factory fresh machine and copy it over using terminal from the mounted target disk.. and even that is iffy ( based on the source machine type.

The stupidity keeps on rolling. The bottom line is, there is no way to do a real factory restore.

CCC solved this problem. If anyone interested in more information you can visit their website:

http://help.bombich.com/kb/advanced-strategies/the-disk-center#recovery_hd

I am in the process of cloning my HDD to new SSD and was making sure I have everything ready then I remembered this and remembered that last month when Apple replaced my bad HDD they used a utility to re-create that recovery partition in the new one. Now, it seems that CCC will archive your Recovery partition when it clones your HDD but you will have to manually recover the partition if you want to boot and use you clone. And in manually I mean click of a button. But you need to clone or archive your Recovery partition. I have just cloned my Recovery HD to a flash drive just in case.
 
Heads up - apple hardware test unrecoverable on 2011 macbook pros after partition

Yes, the new release MBP now has three partitions.
One EFI (AHT), one OSX and a Recovery HDD.
I had tried to clone them using various method.
GParted, Clonezilla etc.
Managed to clone all of them, however, only the OSX and Recovery HDD are working fine.
The EFI which I supposed where the AHT is, are unable to access anymore once I switch to the new SSD.
Now everytime if I need to diagnose my MBP hardware.
Pressing 'D' while booting up will straight promot for wifi network.

Wonder is there any means to 'align' and make the EFI partition works again?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.