Archive for the ‘Macintosh’ Category

How To Pull Data Off A Dead Macintosh

Recently I had the rare opportunity to tackle a serious problem with a Macbook Pro. For some reason an update locked up midway through and the owner had no choice but to shut the laptop off abruptly after it had been siting on for several hours not making any progress in the update and with no available option to cancel/revert.  I suspect the hard drive is beginning to wear out and failed to read/write something important, locking the system up completely.  When they attempted to power their system on next time it remained stuck with the startup screen (Apple Logo with the rotating “gears” below).

Apple includes a copy of their OS on discs you can boot from to run the included  Disk Utility. This checks the file system for integrity issues, file permission errors and corrects them for you. Unfortunately doing this did not solve this particular problem and the laptop remained stuck. Even booting into MacOS’s “Safe Mode” (by holding down SHIFT right after the startup chime is heard) didn’t work.

Most guides I’ve found on the Internet will tell you to send the system to an Apple Expert at this point. While there is a slim chance they might be able to revert the changes or correct the problem that’s causing a system to lockup while booting, an alternative approach is to do what is termed a “destructive recovery”, where the hard drive is erased and the OS reinstalled on a clean slate so to speak. Before you do that of course you’ll want to pull your own personal files/data off the drive. You can’t do this with the Disk Utility provided by the MacOS install discs, but there is another “utility” that’s totally free to download that you can do this with: Ubuntu Linux.

What You Need

1.  A blank CD
2.  Another computer to burn that CD with
3.  Ubuntu Linux ISO image file
4.  An external hard drive (preferably one that’s formatted to Windows NTFS; I will explain why in a moment)

Burning Ubuntu to a CD

First, visit the link to Ubuntu’s website.  Click the Get Ubuntu button and follow the steps to download the 32-bit version of Ubuntu.  You’ll be asked to download a large (about 700MB) ISO image file.  Once downloaded, you need to burn this file to a CD.  If you are burning this CD with another Mac you can follow this guide that will show you how to use the built in Disk Utility app to burn the Ubuntu ISO file you have to download from www.ubuntu.com.  And if you are burning with Windows, there is a “Show Me How” button you can click on at Ubuntu’s download page that will show you how to use a program called InfraRecorder to burn the ISO file.

Booting Ubuntu On Your Mac

Once the CD is burnt you will need to boot from it.  I have found the best way to do this on a Mac is to turn the system on and immediately after you hear the classic “chime” sound, hold down the Option key on your keyboard.   (Tip:  If you are using a Mac with a Windows keyboard hold down ALT instead.  Also, if you need to eject a disc from the system, hold down F12).  Eventually you will see this:


Double-click on the CD that says “Windows”.  We know it’s not actually Windows, but Mac doesn’t know any better… or Ubuntu isn’t presenting itself correctly.  Anyhooo…

If all goes well (and I can’t promise that it will but it did for me) you will see the Ubuntu boot screen appear (pictured above) with the purple background.  Please be patient as this is a slow process; loading an entire OS from a CD is not a quick and snappy ordeal.  Eventually Ubuntu will load up the Ubuntu installer screen.  At this point click “Try Ubuntu”.

It will proceed to load the rest of Ubuntu Linux right off the disc.  Eventually you will see something like this:

Accessing Your Data

First, we need to browse the hard drive inside the Mac.  You’ll do this using the Places menu.  When you click Places, you will see a list of several common folders like Home Folder, Pictures, etc.  Look past those in about the middle of the list and you should see an item called Macintosh HD.  We will mount it by clicking on it in the places menu.  (Note: It would also be a good idea to repeat this step to mount the external hard drive or media you intend to copy your data on to at this time, just to get mounting it out of the way).  The next thing you’ll see is the contents of the Macintosh HD volume.  Unfortunately there is a lot of data in this drive that you won’t be able to access/read right away due to file ownership and permissions.  But there’s a way around that.

You need to gain full administrative access to the hard drive so you don’t have to worry about file permissions getting in the way.  It is also recommended that you use an NTFS formated external hard drive for this because it will help avoid further file permission issues later down the road when you move your data back.  (If you use a Linux/Unix/Mac formatted external drive the files you copy are going to change owners from you to the Linux superuser account which means you’d have to change ownership of every file after copying them, so it’s just easier to scrape all those attributes off the files by sending them to an NTFS filesystem which does not store those descriptors).

Gaining Full Administrative Access To Your Files

To gain administrative access to the hard drive and browse the contents, click Applications>Accessories>Terminal in the upper left.  A new window will appear with a black background and white text.  From here type:

gksu nautilus

…and press the Enter key.  This will open the Nautilus file browser as the SuperUser (aka, “root” user).  It is exactly the same window you saw open when you mounted the drives from the Places menu, but keep in mind that this new file browsing window that has appeared is the ONLY window with root access.  Any others that were already open are still running at the standard user level, so you can’t drag files from the super users browser to any others unless you open a second terminal window and start a second instance of Nautilus in the same manner.  But it’s pretty easy to do all the browsing you need with the one window using the Edit>Copy and Edit>Paste menu options.

Note: The rooted instance of Nautilus will only let you browse volumes that have already been mounted.  If you’ve not already accessed your external hard drive or the Macintosh HD hard drive using the Places menu as mentioned earlier, do so now and then close or minimize those windows to get them out of the way, leaving the super-user instance of Nautilus running up front.

Copying Your Data

Once you’ve started the Nautilus file browser as the super-user, you can click on “Macintosh HD” in the left hand side of the Natilus window to begin browsing your hard drive.  For most users the most important data is going to be stored in the Users folder.  Simply scroll through the Macintosh HD hard drive to find a folder called Users.  If you browse through it a little you will quickly be familiar with the files you are looking at inside the Users folder.  You just need to copy everything out to the external hard drive.  To makes things simple and quick it’s easy to just copy and paste the entire Users folder to an external hard drive (as mentioned, NTFS drives are recommended purely to make the copying of data back to the computer easier after the OS has been reinstalled).

Also note: Stopping after the Users folder alone may not be adequate enough for some advanced users who may have data stored in other folders, such as the /var folder if the system was an Apache server.  Details about where your production/business critical data is auto-saved should be researched from the developers/publishers of said software or their respective README.txt/help documentation before proceeding to format your hard drive as all data will be lost after formatting.  In almost all cases everything will be in the Users folder, but fair warning to you if you are not certain.  For more information, refer to this official help article about application data storage locations.  By the way, the ” ~/ ” folder they refer to is shorthand for “your home folder”, which is inside the Users folder; you will find that everything they list is stored somewhere in there so you should be good with not copying anything else.

Reinstalling Mac OS

Now with all the user data backed up on an external hard drive you can restart the system with your original Mac OS install discs and proceed to use the Disk Utility to erase and re-format the hard drive and then proceed with installing the OS on a fresh partition.  Just press that Option key again to bring up the boot menu and boot from the MacOS install disc 1.  I would strongly recommend searching for and installing any and all available updates available for the OS and software before moving data back to the computer.

Moving Your Data Back

I have found that moving data back isn’t going to be as simple as moving the entire Users folder at once because Mac doesn’t like to let you merge folders.  You will be able to copy and paste the files and folders in groups to get everything back to where it was originally.  Alternatively you can use this tool called Folder Merge for Mac to help you copy all your files and folders back into place while skipping the ones that can’t be overwritten in their place.

If all goes well, you should be able to backup the data from your Mac and reinstall the OS in a matter of about 3 hours, most of which is a just a matter of sitting and waiting for things to finish.

Troubleshooting:  What if the drive isn’t shown?

In newer versions of Ubuntu (verions 11.04 and newer) the new Unity desktop interface is used, so there is no Places menu to open up.  However, you can still open your Nautilus file browser by clicking on the Home Folder icon.  Once open, look along the left side of the screen to see if your drive is shown among the other popular locations.

If it is not shown it may be necessary to mount the drive manually via a terminal window.  To open a terminal in Ubuntu 11.04 or later, click the Ubuntu button at the top of your dock bar to open the search panel and type in “Terminal”.  You’ll see the shortcut for Terminal appear which you can just click on to open up a terminal/command prompt.

Once the terminal is open you’ll want to get a list of the drives Linux is able to see.  To do this, type in the command:

sudo fdisk -l

The output will look something like this:

Starting at the top Linux is telling me that it sees an 80 gigabyte sized hard drive and has called the drive /dev/sda.  Within that hard drive are three partitions, called /dev/sda1, /dev/sda2 and /dev/sda5.  Below that we see there is a second 2000 gigabyte sized external hard drive and it has been called /dev/sdb, with only one partition called /dev/sdb1.  If we were looking at a Mac we’d likely only care about /dev/sda partitions and would only be interested in mounting whichever of these partitions is the largest.  You can quickly determine which is the largest of them all by checking under the Blocks column.

Once you’ve determined which partition is the largest we need to mount it.  For the sake of example, lets pretend that /dev/sda1 needs to be mounted.  Before we can do that we need to create a temporary placeholder folder for this partition to be aliased with after mounting.  To create an empty folder on your desktop called “temp” you would type:

mkdir ~/Desktop/temp

(Note: all linux terminal commands are case-sensitive).  Now we can mount /dev/sda1 into this temp folder with the following command:

sudo mount /dev/sda1 ~/Desktop/temp

You can close or minimize the terminal window at this point and find the folder we created called temp on your desktop and open it.  Within should be the contents of your Mac hard drive, and you can now begin copying data from there into an external hard drive or other external media.  When you are finished it’s easiest to use the shut down menu in the top-right corner to shut the computer down (which will eject the disk for you).  If you were successful at extracting your data the next step would be to boot from your MacOS disc and proceed with using the Disk Utility to remove/format the existing partition(s) on your Mac’s hard drive, create a new partition and install MacOS on top.  I would recommend disconnecting your external hard drive before doing this so you don’t risk deleting your external hard drives partition by accident.

Good luck!

Saturday, July 2nd, 2011

Troubleshooting No Video On A Power Mac G5

I got a call today from someone who was in need of help with their Power Mac G5 computer.  The problem they were having was the system would power up, the famous startup chime sound effect would play but there would be no video displayed on the monitor.  As far as the monitor was concerned the computer was still off as the power light on it would remain amber instead of turn green.  Unfortunately you don’t get Mac-oriented training in most technical institutes so I didn’t know exactly how to approach the problem.  Is it hardware?  Is it software?  It was time to call for reinforcements!

With the help of a friend of mine who happens to use a G5 for graphics design work on a daily basis we began troubleshooting this machine.  Going off of Apple’s official troubleshooting pages we tried holding Command-Apple-P-R at boot in an attempt to reset the PRAM (which is similar to a PC’s CMOS) but for some reason it would never reset, or at least we never heard the second chime sound indicating a reset.

Ultimately the thing that did the trick was unplugging the systems power cord, opening the case up, removing the dual-fan assembly that’s in front of the RAM slots and pressing the PMU Reset button located on the “logic board” ONCE!  The ONCE part of this was stressed as pressing it more than once could potentially turn the system a trendy looking boat anchor.

When the system was powered back up there was no video for a moment and then the OS finally started to boot.  I shut the system down,  turned it back on and it still worked.  So I had considered this a finished job and decided to shutdown and take the computer back to it’s owner.  Well, then things got strange all over again.

With the system back under the desk in its original location, reconnecting the USB cables for the printer, keyboard and mouse to the computer and pressing the power button I was greeted to a chime, the grey-on-grey Apple boot-splash screen but that was it.  No whirly-circle busy animation, no hard drive activity, nothing.  So I forced the power off and waited before retrying again.  Suddenly we were back to square one with no video on screen.

I decided to see if hitting the PMU reset would help here so I unplugged the system, opened the case, pressed the button and shut it back up.  That didn’t work.  Finally I unplugged everything from the system except the keyboard and the power and turned it on again.  The system finally booted up to the desktop.  I shut it down and reattached the printer and the networking cable while the system was powered off.  For some reason this had an effect on the computers ability to boot up because it didn’t want to show video once again.  I pulled everything but the keyboard one more time, powered it up and it booted all the way up once more.  While the computer was on I reattached all the USB cables as they were, which produced no problems, shut the computer down, and finally upon powering it back up it successfully booted all the way.

So, we have a very interesting glitch here with Apple’s Power Mac G5 machines.  It would seem that if you have the system powered off and you attach certain devices via USB while the system is off, it gets confused when you first turn it on.  Perhaps the PRAM keeps an inventory of USB devices and where they are plugged in that throws a fit if anything on those ports change while it’s off.  Well, that’s what I think.  It’s only a theory.  Alternatively there might have been something going on with the printer; perhaps some funky USB-to-LPT converter wasn’t declaring itself properly.All that I know is the best thing to try if you have this kind of problem is to unplug the machine and all cables attached, hit the PMU reset ONCE, plug the power and keyboard only back in and then press the power button with your fingers crossed.

This reminds me of a PC that my fiances father owned that had a PCI USB port expansion card in it to add 3 more ports to the back of the PC.  You had to plug USB devices in before turning the computer on or they wouldn’t be detected by Windows.  Kind of the opposite of what’s going with this Mac.  I’m sure fixing something like that would be a matter of a firmware update for the card itself but there wasn’t one available when I checked, nor were any updates available for Mac OS today.  Anyway, it was a learning experience for me; its not too often you get a chance to attempt fixing a Mac hardware problem.

Tuesday, June 29th, 2010