iMac Mid 2007 locks up moments after being booted

It's complicated. Friend brought the computer to me for help. Was behaving "strangely."

When I turn it on, a few minutes after booting up (sometimes a few seconds) it starts the wait cursor and that never goes away.

If I boot into terminal, it works fine. If I boot it on Snow Leopard install disk, use the disk util, works fine for ever and reports no problems with the hard drive.

If I boot into safe mode, no difference.

No external equipment attached.

No updates pending (tried doing updates at terminal, can't get that to actually connect to internet, though... I'm missing something there).

Pulled the memory, cleaned contacts, put it back in. No difference; wasn't expecting any since it runs fine booted from install disk, but one tries what one can think of, yes?

The machine has 4gb memory, 250 gb hd, running 10.6.something.


The next step seems to be to do a full backup, wipe the disk and restore, except that I can't do that, because when booted up normally, it runs for seconds only, perhaps two minutes, then locks.


Advice! Help!!


Please avoid telling me "it's old." I know it. But it's a working machine. In fact, I have a mac laptop exhibiting the very same behavior, and I'm also at the end of the checklist with that one. So, I'd really like to resolve this.


I have scanned this forum for similar things and pursued those as far as I could; no joy.


Thanks!

Posted on Feb 27, 2019 10:21 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 27, 2019 2:23 PM

I would suspect the hard drive is bad. Do you have a USB/Firewire bootable OSX drive you can use to boot this iMac? If so you can use DriveDX to check the health of the hard drive. If not, you could try putting it into Target Disk Mode and connecting to another running system and using DriveDX with a special driver. I'm not sure if the required communication will pass through a Targeted Disk though or if the driver works with FireWire or is even needed.


If the above does not work or is unavailable, then create a bootable Knoppix Linux USB drive using Etcher. Use Option boot to get the Apple Boot Selector Menu and choose the orange icon. Most likely it will be labeled "EFI", but on these older systems it could also appear as "Windows". Once booted to the Knoppix Desktop, click on the "Start" menu in the lower left and launch GSmartControl (Start --> System Tools --> GSmartControl). Select the iMac hard drive and see if the drive's health is listed as failing. If it isn't failing, double check the SMART Attributes using GSmartControl. If the RAW Values for any of the following attributes are non-zero, then the drive is failing. Not all drives have all of these attributes.


Reallocated Sector Count

Reallocated Event Count

Current Pending Sector

Uncorrectable Error


Also check the Load Cycle Count. Using the value in the "Value" or "Worst" column, if it is "001" then if the drive isn't bad yet, it will soon be failing.


Check the "Error Log" tab for any errors which usually indicate a failing hard drive.


There is also an option to run a drive self-test. The short one usually takes about two minutes and the Long/Extended test can take an hour or more.


Not all drive failures will show up with these utilities.

Similar questions

24 replies
Question marked as Top-ranking reply

Feb 27, 2019 2:23 PM in response to ComputerWhisperer

I would suspect the hard drive is bad. Do you have a USB/Firewire bootable OSX drive you can use to boot this iMac? If so you can use DriveDX to check the health of the hard drive. If not, you could try putting it into Target Disk Mode and connecting to another running system and using DriveDX with a special driver. I'm not sure if the required communication will pass through a Targeted Disk though or if the driver works with FireWire or is even needed.


If the above does not work or is unavailable, then create a bootable Knoppix Linux USB drive using Etcher. Use Option boot to get the Apple Boot Selector Menu and choose the orange icon. Most likely it will be labeled "EFI", but on these older systems it could also appear as "Windows". Once booted to the Knoppix Desktop, click on the "Start" menu in the lower left and launch GSmartControl (Start --> System Tools --> GSmartControl). Select the iMac hard drive and see if the drive's health is listed as failing. If it isn't failing, double check the SMART Attributes using GSmartControl. If the RAW Values for any of the following attributes are non-zero, then the drive is failing. Not all drives have all of these attributes.


Reallocated Sector Count

Reallocated Event Count

Current Pending Sector

Uncorrectable Error


Also check the Load Cycle Count. Using the value in the "Value" or "Worst" column, if it is "001" then if the drive isn't bad yet, it will soon be failing.


Check the "Error Log" tab for any errors which usually indicate a failing hard drive.


There is also an option to run a drive self-test. The short one usually takes about two minutes and the Long/Extended test can take an hour or more.


Not all drive failures will show up with these utilities.

Mar 2, 2019 1:38 PM in response to ComputerWhisperer

9 Power_On_Hours          -O--CK   020   020   000    -    58896
195 Hardware_ECC_Recovered  -OSR--   001   001   000    -    52461383

why you are so certain it's an hdd problem.


I believe attribute #195 shows the drive is failing. Normally I don't monitor this attribute, but you can see the "Value" & "Worst" column value reports "001" which usually means it past normal usage. Utilities won't report it as failing because the "Threshold" column is "000" and the "Worst" value will never report "000". Columns with a "Threshold" value of "001" will trigger a SMART failure warning in the drive when the "Worst" value reaches the "Threshold". I believe the "000" thresholds are just to inform about possible end of life conditions since the drive may be able to run safely for a while longer.


The drive has almost 59k hours on it so it has been a very good drive. As you can see from the "Value" & "Worst" columns for Power On hours, it is reporting "020" which is closing in on "000" which is its expected end of life although it could possibly last longer, but not in this case. Here is an interesting post by Backblaze about how they predict hard drive failures. I came to the same conclusions even from my much more limited personal experience. FYI, predicting SSD failures is not quite so easy.


it seems to me that a hard disk error should time out eventually, the OS ought to come back with "read error" "can not proceed" something, not just vanish down a rabbit hole on an hdd problem, you know? But maybe OSX doesn't work that way? 


Ideally yes, but just like anything else, programming is everything and the firmware on the drive isn't able to properly process some conditions.


By the way I really LIKE Knoppix a lot. Very sweet, clean, fast, simple. Nice, nice, very nice.


Yeah, I stumbled across Knoppix years ago after make a custom BartPE CD. Way better than Bart's ever was. I don't like it quite as well now due to some changes over the years, but it includes many useful tools and can boot the majority of systems. If I ever get the time, I want to create my own custom boot disk using pure Debian as a base similar to Knoppix.


Possibly OSX simply needs a repair?


If so, then you would need a third party utility such as Disk Warrior since Disk Utility is very limited into what it can do. Since I believe the drive is no longer safe to use, purchasing Disk Warrior doesn't make much sense if you can use the options I suggested in an earlier post to retrieve the data. If you are unable to copy individual items from the drive using either an OSX boot disk (disable Spotlight on the iMac drive after mounting it) or Knoppix, then the last two options are either perform a bit for bit clone of the drive using Linux or use a professional data recovery service. I can provide instructions for a bit for bit clone using Knoppix.

Feb 27, 2019 11:57 AM in response to ComputerWhisperer

That sounds like a thermal shutdown except for the bit about it working in safe mode and when booted form an optical drive. Still, it would be worth eliminating from the pool of suspects.


Do you have the gray system install/restore disks that came with the computer. If so, find the one that has "Apple Hardware Test" or "AHT" printed on it. It's usually in smallish print at the 8 o'clock position relative to the spindle hole. These are Apple instructions for using the test:

How to use Apple Hardware Test on your Mac - Apple Support


Run AHT and, if it presents error codes, please post them for our translation. The good news is that AHT will detect dead or underperforming fans as well as failed temp sensors. The bad news is that most temp sensors are integral with the logic board and cannot be replaced separately.

Feb 27, 2019 10:55 PM in response to ComputerWhisperer

I've found a lot of USB Flash drives have issues booting (even name brands). Do you have another one to try? You can even put Knoppix on an external USB hard drive using Etcher. An Ubuntu Live CD/USB can work too. If GSmartControl is not installed on the Ubuntu Live CD/USB, then connect an Ethernet cable to the iMac and open a Terminal and run the following commands in order:

sudo  apt  update
sudo  apt  install  gsmartcontrol


If "apt" doesn't work, try "apt-get" or "aptitude" instead. I don't use Ubuntu so I don't know which one of these commands is enabled by default.


I've also found that it is sometimes necessary to power on the computer first and then plug in the USB Flash drive and do a warm reboot. You may want to try this if you can boot to the SL DVD.


The 2007 iMac did have some odd boot issues in general, like not always being able to Netboot. I also believe this iMac could boot Legacy MBR boot drives as well as EFI boot drives. Knoppix may show up as both as you found out with the DVD.


If Linux begins to boot and stalls, it is sometimes necessary to disable power management on boot. Knoppix has "cheat codes" if it displays a text interface. From your description it doesn't sound like it makes it this far.


Another option is to install Snow Leopard onto a USB drive (Flash drive or hard drive) and boot it externally. Install DriveDX to check the internal drive's health. It will be slow, but it should work.


The SMART status found in Disk Utility is utterly worthless. I believe it will only alert an issue when one of the drive's SMART Attributes reaches a critical point which rarely happens. I've only ever seen OSX/Disk Utility report one drive as bad out of hundreds which were confirmed bad using other means.

Mar 9, 2019 1:11 PM in response to HWTech

The cloned drive behaves exactly like the original. No difference. The machine boots up, lets me log in and then 10 - 30 seconds later to it goes into permanent wait cursor (OS or UI lock up). I don't even have to do anything after logging in. Leave it alone, it goes to wait. Try doing something, it goes to wait. Either drive.


I have connected the cloned drive externally and booted up from it; I have swapped it with the internal drive. Boots a little faster that way, but no other difference.


As for navigating on the drive (either one), I can get around on them under Knoppix (which continues to impress me!), under Windows (using HFSExplorer, which isn't perfect, but is pretty darn good), and so on. I can navigate to the /users directory, where I see some user folders, and in those I see a list of more directories, with such things as desktop, documents, downloads, music, and so on. No directory called "Home," though I assume you didn't mean "home" literally.


I don't know filevault. Looking it up, I see it's an encryption thingie. This is an ordinary consumer user (that the machine belongs to), so unlikely anything is encrypted anyway. But it all seems to be in the clear, scanning around on the drive.


Thanks for the continuing help!

Mar 9, 2019 5:35 PM in response to ComputerWhisperer

I can navigate to the /users directory, where I see some user folders, and in those I see a list of more directories, with such things as desktop, documents, downloads, music, and so on. No directory called "Home," though I assume you didn't mean "home" literally.

The "home" folder just refers to the root of the user's home directory. Normally in the "Users" folder you should see folders with the "shortnames" of any user accounts on the system and possibly a Guest account.


I don't know filevault. Looking it up, I see it's an encryption thingie. This is an ordinary consumer user (that the machine belongs to), so unlikely anything is encrypted anyway. But it all seems to be in the clear, scanning around on the drive. 

It would be unusual to see an encrypted account on a desktop system, but it is possible if the person is security minded. With FileVault 1 which is used by Snow Leopard, it would just encrypt the user's home folder. It has been a while, but I seem to recall at one point you would still see a folder with the "shortname" of the user's account in the Users folder, but later I believe they made this folder hidden as well (meaning it begins with a dot ".").


Now the important part is the Sparse Image file where the encrypted data is stored. This would be a hidden file (meaning it begins with a dot) and could be located either in the "Users" folder or within the sub-folder with the user's shortname. With Knoppix you will need to enable the viewing of hidden items by clicking on the "View" menu in the file manager and checking the "Show Hidden" box. I'm not sure how your Windows utility handles hidden items.


If the data is located within an encrypted image, then it is easiest to store it to another location. I've opened Apple image files using Linux before, but I'm not sure I ever tried to open an encrypted image.



Feb 27, 2019 12:48 PM in response to Allan Jones

Thanks for the reply.


Wouldn't a heat problem cause the machine to turn itself off, rather than go to a never-ending wait cursor?

At any rate, I thought your suggestion about AHT was great, and I've spent the last hour trying to get AHT to run. Conflicting instructions for how to do that on Snow Leopard. The ones that don't work suggest it should be accessible from the bash terminal on the install disk, but the critical command doesn't work (sudo command not found). The ones that might work I can't test, as they suggest there is a 2nd disk for snow leopard and it's actually on that disk. But I bought snow leopard directly from Apple (years ago), and there was only the one disk. ...


So, I seem to be blocked there. Unless there's a way to assemble a bootable AHT using what's on the install disk (where terminal doesn't know "sudo"), or the normal system terminal (which does know sudo) or using a Windows machine (as I don't have access to a working Mac right now).


NOTE: when returning from terminal on the install disk ('exit'), booted from the install disk, the machine did the infinite wait cursor (call it "DMV Mode" -- endless waiting in line). So, it's not just the hard drive boot that does this. And that does suggest hardware, yes? And not hard drive, also yes? Memory? Or video (mouse cursor being a video card function, I think)?


Any more suggestions?

Feb 27, 2019 9:40 PM in response to HWTech

Thank you for this. Very encouraging. However...


I created a bootable Linux USB with etcher, only the Mac won't recognize it. I hold down option during boot, get the boot options screen and it shows only the hdd. If I let it boot up "normally," it comes up noticing the flash drive, but proclaiming it unreadable, would I like to (re)format it? Obviously I don't. On researching this (commonly reported problem in mid-2007 iMacs, no real solutions that I found), I came across the possibility that iMacs of this age (mid 2007) don't boot anything from USB except OSX in some version of other. No idea if that's true, but I built a bootable DVD of Knoppix. However...


When I put that in the iMac, use the option key, I get the hdd listed, and TWO cds to choose from: one says "windows" the other says "EFI". If I choose EFI, it locks up instantly; mouse freezes in place, etc. If I reboot and then choose "windows" it gets as far as "choose cd boot type: " and is waiting for input, but accepts no input from the keyboard at all.


I researched that it turns out to be a commonly reported problem, but the "fixes" are all related to running a Windows install disk on the iMac, and didn't fix anything, anyway.


I am now trying to build an ubuntu bootable, but it'll be an install disk, not a working desktop, and won't have the recommended diagnostic on it, anyway, and...


I think I'm getting far afield here. And probably for no purpose.


I did boot the machine from Snow Leopard install disk, and used the disk utilities widget there, to verify the drive and permissions, repair the drive and permissions. Disk Repair reported no problems. Permissions reported many, but my experiences with Macs is that's normal; you fix them and move on. The "smart' readout on disk utils showed no problems, though it was not a detailed readout.


I'm spinning out... Going to go to bed and try again tomorrow. Any suggestions in the mean time would be much appreciated.

Feb 28, 2019 7:35 PM in response to ComputerWhisperer

Ok... finally got the machine booted under Ubuntu. After much grief and anguish. Turned out it won't boot Ubuntu from DVD either; also has the "choose cd-rom boot method" keyboard-no-worky problem, but installing it on ANOTHER thumb drive, as you suggested, did work. (Odd that, and I'll choose not to think that one over just now.)


So, ran the drive self test and pulled the complete smart stats. The drive self-test passes "ok" (both short and long test) and the four stats your specifically mentioned are all 0 (zero). (That was: Reallocated Sector Count, Reallocated Event Count, Current Pending Sector, Uncorrectable Error.)


Also, the machine seems to be quite happy to stay in Ubuntu and work just fine, with no complaints. No lock ups. Of course, it isn't accessing the hard drive either. But I did bring up FireFox and LibreOffice and tried to tax RAM at least. Couldn't make it fail. Proves nothing though.


So: not a hard drive immanent failure issue. It's stable on OSX Snow Leopard install disk. Stable on Ubuntu-live DVD. Extremely unstable booted into OSX 10.6.8 from the hdd.


Once the wait cursor came up during boot up and never went away. Didn't even get to the desktop that time before vanishing down the rabbit hole. Hard power off, reboot and it came up to desktop just fine, long enough to eject the disc in the DVD drive at least. Would not do a normal power down, however. Just seemed to ignore the suggestion that it should power down. No wait cursor, but no shutting down either. Odd, that one.


Any other suggestions, my friends?

Mar 1, 2019 2:35 PM in response to ComputerWhisperer

Just for further reference: I also have on hand a PowerBook G4 that does precisely the same thing. Within seconds to a minute tops after booting up it goes to permanent wait cursor. I have tried to put together a bootable malware disk for either machine, but without a working Mac at hand, of some sort, this is proving difficult at best. I was thinking maybe some sort of malware got in there, except that booting in safe mode makes no difference at all, so it's probably a thin hope.


What else can I try? Is there anything left? Everything is fine, it just doesn't work on OSX?

Mar 2, 2019 12:08 PM in response to HWTech

output from GSmartControl follows (trimmed a bit; the window won't let me post all of it at once)


=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED


General SMART Values:

Offline data collection status: (0x84) Offline data collection activity

was suspended by an interrupting command from host.

Auto Offline Data Collection: Enabled.

Self-test execution status: ( 0) The previous self-test routine completed

without error or no self-test has ever

been run.

Total time to complete Offline

data collection: ( 6180) seconds.

Offline data collection

capabilities: (0x7b) SMART execute Offline immediate.

Auto Offline data collection on/off support.

Suspend Offline collection upon new

command.

Offline surface scan supported.

Self-test supported.

Conveyance Self-test supported.

Selective Self-test supported.

SMART capabilities: (0x0003) Saves SMART data before entering

power-saving mode.

Supports SMART auto save timer.

Error logging capability: (0x01) Error logging supported.

General Purpose Logging supported.

Short self-test routine

recommended polling time: ( 2) minutes.

Extended self-test routine

recommended polling time: ( 75) minutes.

Conveyance self-test routine

recommended polling time: ( 5) minutes.

SCT capabilities: (0x303f) SCT Status supported.

SCT Error Recovery Control supported.

SCT Feature Control supported.

SCT Data Table supported.


SMART Attributes Data Structure revision number: 16

Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE

1 Raw_Read_Error_Rate POSR-- 200 200 051 - 0

3 Spin_Up_Time PO---- 156 151 021 - 5175

4 Start_Stop_Count -O--CK 024 024 000 - 76831

5 Reallocated_Sector_Ct PO--CK 200 200 140 - 0

7 Seek_Error_Rate -OSR-- 100 253 051 - 0

9 Power_On_Hours -O--CK 020 020 000 - 58896

10 Spin_Retry_Count -O--C- 100 100 051 - 0

11 Calibration_Retry_Count -O--C- 100 100 051 - 0

12 Power_Cycle_Count -O--CK 096 096 000 - 4399

192 Power-Off_Retract_Count -O--CK 200 200 000 - 0

193 Load_Cycle_Count -O--CK 175 175 000 - 76948

194 Temperature_Celsius -O---K 128 088 000 - 19

195 Hardware_ECC_Recovered -OSR-- 001 001 000 - 52461383

196 Reallocated_Event_Count -O--CK 200 200 000 - 0

197 Current_Pending_Sector -O--C- 200 200 000 - 0

198 Offline_Uncorrectable ----C- 200 200 000 - 0

199 UDMA_CRC_Error_Count -OSRCK 200 200 000 - 0

200 Multi_Zone_Error_Rate ---R-- 200 200 051 - 0


SMART Extended Comprehensive Error Log Version: 1 (6 sectors)

No Errors Logged


SMART Extended Self-test Log Version: 1 (1 sectors)

Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error

# 1 Short offline Completed without error 00% 58892 -


SMART Selective self-test log data structure revision number 1

SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS

1 0 0 Not_testing

2 0 0 Not_testing

3 0 0 Not_testing

4 0 0 Not_testing

5 0 0 Not_testing

Selective self-test flags (0x0):

After scanning selected spans, do NOT read-scan remainder of disk.

If Selective self-test is pending on power-up, resume after 0 minute delay.


SCT Status Version: 2

SCT Version (vendor specific): 258 (0x0102)

SCT Support Level: 1

Device State: SMART Off-line Data Collection executing in background (4)

Current Temperature: 19 Celsius

Power Cycle Min/Max Temperature: 12/19 Celsius

Lifetime Min/Max Temperature: 13/59 Celsius

Under/Over Temperature Limit Count: 0/0


SCT Temperature History Version: 2

Temperature Sampling Period: 1 minute

Temperature Logging Interval: 1 minute

Min/Max recommended Temperature: 0/60 Celsius

Min/Max Temperature Limit: 1/85 Celsius

Temperature History Size (Index): 128 (81)


SCT Error Recovery Control:

Read: Disabled

Write: Disabled


Device Statistics (GP/SMART Log 0x04) not supported



Mar 2, 2019 12:08 PM in response to ComputerWhisperer

Had to edit the above, because the page wouldn't let me post anything that big. So... the rest of what I was going to say follows:


also, both short and extended test pass without incident, 100%.


Granted, I'm mainly a windows tech (darn it), but it seems to me that a hard disk error should time out eventually, the OS ought to come back with "read error" "can not proceed" something, not just vanish down a rabbit hole on an hdd problem, you know? But maybe OSX doesn't work that way?


What i mean is, I'm trying to understand why you are so certain it's an hdd problem. Possibly OSX simply needs a repair?


By the way I really LIKE Knoppix a lot. Very sweet, clean, fast, simple. Nice, nice, very nice. (btw: I hadd to pull out the temperature log, to get this to post)


Mar 2, 2019 3:18 PM in response to HWTech

Piffle... yeah. I was afraid I was going to end up having to make a clone of the disk, using some esoteric process, given the circumstances. Certainly just by age alone, the hard disk is the likely culprit, number of hours on alone is highly suspicious. So... ok. Let's swap the drive.


I have a disk of similar capacity, and I can hook it up USB, and I can boot Knoppix. What are the next steps?


I *REALLY* appreciate all the help. I can get around on a Mac, but my major expertise is PCs. Although this week has certainly been an education.

Mar 8, 2019 2:47 PM in response to HWTech

I thank you for this incredibly detailed instruction set on how to clone disks under Knoppix. The way you explained made it nice and simple. However...


I still have the problem. The problem got cloned with the disk.


Any more suggestions? The machine is not usable this way. Is there anything short of a clean install of Snow Leopard that will work, at this point?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iMac Mid 2007 locks up moments after being booted

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