My fairly young MacBook Pro started randomly hanging, not coming out of sleep, and being generally disagreeable a couple days ago, and it turned out to be a bad hard disk.
What’s disconcerting is that Disk Utility.app didn’t see any problem with the disk. I had to install smartmontools to find the error.
After installing MacPorts, install smartmontools:
sudo port install smartmontools
Then tell the drive to do a long self-check in the background:
sudo smartctl -t long /dev/disk0
Note that this check may take an hour to run, but it’s done in the background, so you can continue to use your computer while it does its little dance on the catwalk.
Check the status of the test with:
sudo smartctl -c /dev/disk0
I was unlucky:
... Self-test execution status: ( 121) The previous self-test completed having the read element of the test failed. ...
See The macosxhints forums for more discussion about this issue.
Related posts:
- HOWTO: Force https with Amazon Elastic Load Balancer and Apache
The Amazon ELB service now supports https, which is great, but how do you configure Apache such that it redirects all insecure requests to use a secure connection? It turns...... - Installing git with MacPorts
The Good: MacPorts makes git, the new source version control system hotness, available to Mac users. The Bad: MacPorts sometimes has attitude, and poops out trying to compile or install...... - Apache2, PHP, and MySQL on Mac OS X using MacPorts
1. Install MacPorts Follow the instructions here: http://www.macports.org/install.php. 2. Install apache2 sudo port install apache2 Note that the macports instructions suggest installing the launchctl script now, but we’ll do that...... - HOWTO: Make system-wide RVM installations work with cron, monit, delayed_job, and passenger
System-wide RVM installations are recommended for production deployments, but because /usr/bin/ruby is no longer the “correct” ruby, you need to tell all your moving parts about RVM. Before installing ruby......