Archive for the ‘Mac OS X’ 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

How To Send A Fax From Your Computer

I recently bumped into someone who is a big fan of Skype and uses it to save money at his businesses, as land-lines cost far more for businesses than they do residential customers. He’s seen real savings by using it and was wanting to migrate his company completely away from the local telephone services and go 100% Skype. One of the hitches here was the necessity to have a fax line that you could send and receive faxes on.

Unfortunately there is no good way to send a fax from your computer using Skype. The audio compression that takes place when sound is transmitted from one side to the other undergoes a great deal of detail loss, and this results in error correction protocols taking over and throttling the speed of the fax modem down to a crawl. So in theory, you could use Skype somehow to send a fax but it would literally take forever.

Enter in online faxing services. These are companies that allow you to send and receive faxes over the Internet. In doing some research to find one that performed well and at a modest price I stumbled across someone recommending a company called PamFax.  It was not long after first trying their service that I was pretty sure I could close the book on this egg hunt.

PamFax is delivered to you as a small program you install on your system and use to create your account.  They offer a free membership program which allows you to send three pages for free to see if you like their product or not.  I decided to sign up for the free account and then used a nearby fax machine where I work to send a fax to my new PamFax number.  The instant the fax was sent my PamFax account page auto-updated itself to tell me I had received a new fax.  Faxes are put into an inbox, just like emails, and each fax is downloadable in PDF format.

Sending a fax is also very easy.  You can either use the PamFax program to upload files you want to send or use the virtual PamFax printer device to send your documents to PamFax when you press Print in any application.  Here’s a video that demonstrates how easy it is to send a Fax:

Of course there will be times when you need to fax a physical document that’s already on paper.  The best way to do that is use a flatbed scanner to scan the documents into a PDF file.  You can do this very quickly with any number of Scanner-to-PDF style programs and any scanner.  A free one I’ve found to work well is aptly called Scan to PDF by Ironfist Software.  It is a free utility that you can use to scan multiple pages and then save all of them as one PDF file, which you’d then upload to PamFax for faxing to one or multiple recipients.

The cost for sending a fax varies based on whether or not you want to pay a monthly fee.  If you don’t pay a monthly fee it will cost you 13 cents per page sent and you will not be able to receive faxes.  If you step it up to the “Basic” package you will be able to receive unlimited faxes at a monthly rate of $5.84 plus 13 cents per page sent.  The professional package costs $8.80 a month, includes 20 free page out per month (9 cents per page after that), allows you to keep your received faxes online forever, and gives you the ability to administrate employee access to the account and regulate their limitations.  So there’s something for everybody.

In the end I was pretty impressed with how easy it was to install and use PamFax.  What’s even more impressive to me is their support for Linux. It’s rare that I have to send a fax but the next time I need to I know exactly what I’m going to use.  Good bye Kinko’s!

Monday, June 13th, 2011

Virtual Dave: Now for Windows, Ubuntu and Mac!

All good things come to an end…  Fortunately, Virtual Dave isn’t one of them.  I’ve recently made the decision to drop my own remote assistance software in favor of using a new open-source VNC launcher called Gitso.  This launcher has a few benefits over the previous iterations of my older “Virtual Dave” software:

  • Lightweight:  It’s written in Python and loads very fast.
  • Simple:  Sometimes losing a couple “bells and whistles” is a good thing.
  • Multiple platforms:  Gitso works on Windows, Ubuntu Linux and Mac OS X.
  • Active Development Pipeline:  A feature request I submitted was approved for the next version less than a half hour after I submitted it.
  • Open-Source:  Free as in freedom.

There are a lot of features in the coming versions of this software I have been looking for in a VNC tool for a long time.  And who knows, I might learn a thing or two about programming in Python with this little tool.

Tuesday, March 9th, 2010