Last night, my 27” mid 2011 iMac which is my main production computer just died. I was just using it normally when my screen suddenly flickered repeatedly like it has some kind of a bad TV reception. Then the screen suddenly freezes showing this “green vertical lines” across the screen. Tried to restart it but it’s not booting up anymore and it’s just stuck with a white screen with those green vertical lines I mentioned above. The worst part is, even iMac’s “safe mode” is not working!

I do have 3 external backups of all my files and all of them are backed up using Apple’s time machine. The only problem is I wasn’t able to backup all of my latest “work” files I did that day > < I decided to get the outdated version of those files from my external backup HDD’s and hook them up into my Windows gaming machine. To my surprise, Windows isn’t recognizing the HDD’s either! And I just realized the filesystem type of those HDD’s were designed to only work with OSX > < I’m doomed!

My iMac Just Died (4)
Before the crash, my screen suddenly flickered and became distorted like it’s in dual screen or something. Decided to re-boot from here.

I did some research and used 3rd party programs like MacDrive and HFS+ for Windows so that I can read my mac formatted backup HDD’s. Alas! it was recognized! But when I started browsing the files, all of my folders are unclickable and all of them are 0 bytes in size. I then did some quick googling around of the problem and discovered that time machine is backing up the files in a very “special way” and only Mac computers can really browse those files > < I’m already out of options and I badly needed to backup my latest files before I send it in for repairs.

I was about to give up when I discovered that OSX has a UNIX based command line called “single-user mode” or “verbose mode”. Checked it on Apple’s official documentation and learned that I can access all of what’s inside my iMac by just using UNIX commands! There’s still hope! For those people who are unfamiliar and have zero knowledge on UNIX or don’t even know what UNIX is, just bear with me as I will not be super technical in explaining things. I’ll just list the steps in order and just “type” the commands that I used when you’re already inside single-user mode.

My iMac Just Died (5)
This is what my screen looks like when I rebooted. And yes, it’ll just stay on this screen and will not boot anymore. It doesn’t boot on safe mode either.

Let’s get started and save those files!

STEP 1: TURN OFF YOUR COMPUTER

A. Turn off your computer or hold the power button until it turns off.

STEP 2: ENTER SINGLE USER MODE

A. Turn on your computer and quickly press CMD (Apple Key) + S
B. If you successfully entered the keys mentioned above, the screen will go black and you will start to see a bunch of white texts on the screen.
C. It’ll load for a bit so just wait until you can start to type.

STEP 3: CHECK THE NAME OF YOUR MAIN BOOT DRIVE

A. Since you will be accessing your main hdd by just typing, you need to know its name. For others, I’m sure you already named your main hdd but for those who don’t, you can check the name of your main drive by typing ls /Volumes then hit return.
B. You will then see a “list” of all your available hdd’s inside your computer and most likely you will only have one. In my case, I didn’t rename my main drive and it’s called “Macintosh HD”.

STEP 4: PLUGIN ANY EXTERNAL STORAGE (HDD or FLASH DRIVE)

A. Prepare your external storage and plug it in your mac’s USB port.
B. When you enter single user mode, the default permissions of your HDD’s are set to READ-ONLY, meaning you’re not capable of copying any files and pasting it to any external drive.
C. To set it to READ-WRITE, we first need to “mount” it. Type the command sbin/mount -uw/ and hit return. You will be notified for errors if you mistype the command so don’t worry ;)
D. We then need to do a “file system check” which will scan our HDD’s for errors. Type the command sbin/fsck -fy then hit return.
E. Just wait for the command to finish since it will scan our drives. Once it’s done, it will notify you if your drive has errors that needs fixing. If it has any errors, just run the sbin/fsck -fy command again until you receive a message stating that your drive is OK.

STEP 5: CREATE A “SHAREPOINT” FOR OUR DRIVE

A. In OSX, plugging in an external drive will automatically mount that drive giving you direct access to it. In single-user mode, we need to manually mount it. You can verify this by typing ls /Volumes and you will notice that your external drive is not listed on the results.
B. So how can we access it then? We need to create some kind of a “hook” to our external drive. Think of it as some sort of a “gate” that we can use to access the contents of our drive.
C. Creating a sharepoint is easy, it’s actually just creating a directory. Type the command mkdir Volumes/your-sharepoint-name and hit return. So it’s like saying, “make a directory” inside “Volumes” and name it “your-sharepoint-name”. ie: mkdir Volumes/MyBackup.
D. Enter the command ls /Volumes and you will see that the sharepoint or directory you just created is already listed in the results! We will then use this to mount our drive in the next step.

STEP 6: IDENTIFY YOUR EXTERNAL DRIVE

A. Now that we already have a sharepoint or “hook” for our drive, we can then start to mount our drive. But before that, we first need to identify the name of our external drive.
B. Type the command ls /dev/disk* and hit return. You will then start to see all the drives with names like /dev/disk0 /dev/disk1s1 /dev/disk2s1 and so on… The problem here is, in single-user mode, your external drive name will not be displayed making it very hard to identify – meaning, if your external drive is named “Nico’s Backup” by default, that name will not be displayed in single-user mode and will be displayed as “diskxxx” or something.
C. Fortunately and most of the times, your external drive is always listed “last” on the list. So if the last item in the list for example is “disk2s1”, we will then use this name and mount it to the sharepoint or hook you created earlier. If you’re still unsure, proceed to optional step below.

OPTIONAL STEP: WHAT IF IT’S NOT THE DRIVE?

A. If you’re not sure if the last item on the list is really your external drive, you can do the following.
B. With your external drive hooked in your mac’s USB port, type the command ls /dev/disk* and hit return. This will list all the available drives in your machine (including the external ones).
C. List down all the drive names in the results (if you want). The drive names are usually named “diskxxx, disk0s1, etc…”.
D. Unplug your external drive. Once unplugged, type the command ls /dev/disk* again and hit return. List down (if you want) all the drive names again using the results.
E. Compare your list or use the logged results on the screen. The one missing on the list/results is your external drive name :)

STEP 7: MOUNT YOUR EXTERNAL DRIVE

A. Now that we know the name of our drive, we can now start to mount it! Type the command mount -t hfs /dev/your-external-drive-name /Volumes/your-sharepoint-name and hit return. You will notified for errors if ever you mistyped something in the command.
B. Yes! your external drive is now mounted. To verify it, type the command ls Volumes/your-sharepoint-name and hit return. So if your sharepoint name is “MyBackup”, just type ls Volumes/MyBackup and all of your external drive contents will then be displayed right in front of you :)

STEP 8: START SAVING THOSE FILES!

A. To start copying your files / folders into your externa HDD, run the the following commands.
B. For single files, type the command cp Volumes/your-main-drive-name/your-file-name Volumes/your-sharepoint-name and hit return.
C. For directories, type the command cp -r Volumes/your-main-drive-name/your-directory Volumes/your-sharepoint-name and hit return. Notice the “-r” which means “recursive” copying.
D. Note that you will be notified with an error if you happen to mistype the commands above. If you’re doing it right, nothing will happen and you’ll just have to wait for the copying process to finish ;)

Now that your files are all backed up. It’s now safe to turn your mac computer in for repairs :)

My iMac Just Died (7)
I basically mistyped the directory name here :P So don’t panic if you see this screen. It’s just saying that the directory in which you want to store your files is not present on your computer.
My iMac Just Died (8)
Screen shows all of my file directories ready to be copied into my external HDD.

So here’s what my desk looks like after I sent my 27” iMac for repairs. Had to re-decorate my desk to keep me motivated at work :) Apple store told me that the repairs could take up to 3 weeks > < Good thing I already transformed my gaming PC as my temporary development environment.

My iMac Just Died (9)
Multi purpose HULK. Works great as a headphones holder.
My iMac Just Died (10)
Haven’t reviewed this beast. He’s one of my favorite figures in my collection right now. On the right is my Audio Engine 5+ audiophile grade stereo speakers.
My iMac Just Died (11)
Desk looks much more spacious now. Kinda not used to it :P Already transformed my Windows gaming PC as my temporary development computer.
My iMac Just Died (12)
Hope I can get my iMac soon. Working on Windows is not as easy compared to working on a mac. My Windows machine is solely designed just for gaming.
Share

Let's Discuss!