Mountain Lion, Upgrading, and Fusion Drive

This week, I finally embarked on the upgrade to Mountain Lion from the venerable Snow Leopard that has been serving me faithfully for many years. The feature that pushed me over the edge of upgrading was Fusion Drive.

I have had both an SSD and HDD on my machine for a while, and love the benefits of the faster SSD. However, managing the symlinks to different bits of data back and forth between the two disks was annoying, and not as finely tuned as as I would prefer. The nice thing about Apple’s Fusion Drive method is that the OS automatically moves things where it makes most sense for them to be. System files, and more often accessed files migrate themselves to the faster SSD.

Troubles Installing on a MacPro(3,1)

Mac Pro

There have been many people who have made instructions for how to enable Fusion Drive on older machines. Mine is a 2008 MacPro (3,1). There happened to be a problem that many owners of this MacPro encountered when trying to install Mountain Lion. Each time I tried, I found my USB bus was dead upon booting to the installer. No, the machine wasn’t frozen, but without the Mouse and Keyboard, it was impossible to proceed with the installation. Fortunately, after some searching, I found this thread that culminated in the revelation that the people who were affected were those using an 802.11G wireless card which apparently is NOT compatible with Mountain Lion. After removing the card, I was able to use my keyboard and mouse, and proceed with the installation!

Enabling FusionDrive via CoreStorage/diskutil

To enable Fusion Drive, it takes a couple simple command in the terminal. I followed the example of Patrick Stein found here.

First, I listed the disks on my system in order to see their identifiers (disk0, disk1…). This is done with the following command:

diskutil list

Next, I created the “CoreStorage” logical volume. This is done with the following command:

diskutil cs create <NameOfNewDisk> disk0 disk1

Here, you would replace <NameOfNewDisk> with whatever name you wish to give the volume, and then identify the proper disks by index.

This process will result in a unique identifier for the new volume such as, “C3EF49E5-C10F-4379-B74E-EFD8810C1272.” Next, I used this number to create a partition on the drive. The command looks like the following:

diskutil coreStorage createVolume C3EF49E5-C10F-4379-B74E-EFD8810C1272 jhfs+ <NameOfNewVolume> <SizeOfNewVolume>

Of course, you will replace the large number with the identifier of your CoreStorage volume, and the <NameOfNewVolume> with the name you wish it to have, and <SizeOfNewVolume> with the size of the total drive. For me, this was 1123g.

After using that last command, the drive showed up on the desktop and was ready to use. I then proceeded with the Mountain Lion install. Everything worked like a charm!

Password Reset

A little bit ago, I was confronted with a problem whose solution I think is worth sharing. My mother-in-law forgot what password she had put on her new (used) MacBook. Normally this isn’t an issue because you can always pop-in the installer disc and reset the password. Unfortunately, there was nary an installer disc to be found.

Fortunately, there is a trick for just such an occasion.

First of all, make sure you know your short username. This is the name you see on your home folder in the finder.

Once that is retrieved, boot into single user mode. This is accomplished by holding the command key and “s” while booting. Single user mode puts the computer into a command line interface as the “root” user, or administrator that can make any changes – no questions asked.

But first, we have to make the filesystem writeable, since it is mounted in a read-only state initially. use the following command:

mount -uw /
Now that the filesystem is writeable, meaning that you can make changes to it, it is time to reset the password. Password retrieval is not feasible as it is encrypted, but you can overwrite it using a built in utility called passwdpasswd will create the new password and store it in the correct place with the proper encryption. To use it, simply type in the command followed by the short user name mentioned earlier.

passwd username
This will prompt you for a password which you will then need to type in twice for verification. Once you have done that, you can safely restart and use your new password! To restart, type the command:

shutdown -r now
Well, I hope this helps someone else out (and that it is only used for good purposes!).

Never Type This As Root

I was working on a shell script this morning to make my life easier on some trivial task. The last few lines looked a little like this.

somedir=/mnt/tmp
mv $somedir/*.txt ~
rm -rf $somdir/*

Obviously I meant to remove all the files in the directory, however a typo in the variable name led to the deletion of /. I caught it before it got to the home folder, but bin and dev were gone resulting in a broken system that needed to be reinstalled.

Never delete * as root unless you are sure you know what you are doing….

© 2007-2015 Michael Caldwell