If you have been a long time Mac user, there is a good chance that you have used the tool Migration Assistant at some point or another. If you haven’t, the general premise is that it takes your data (be it from an old Mac, or a backup), and transfers it to your new Mac. Working in repair, I have to back up customer data frequently, and after wiping it off of the machine, restore it once the repair has been completed. The way that I do this primarily is: pull the drive out of the machine and plug into a known good computer and back it up to my server in a file called a disk image or .dmg.

Up until 10.9, you could create a test account, mount the disk image and restore the data through Migration Assistant, but in 10.9 Migration Assistant now runs as the root user of the computer and as a result logs you out of your newly created account, thus un-mounting any disk images that may have been mounted. There have been a few work arounds that we have used here that make it work, through different terminal scripts and apps made by people online. Well today I found a new tool that makes it all so much quicker, and all it requires is typing a basic command into terminal.

sudo hdiutil attach /Path/To/Image.dmg

What this does is it mounts the disk image to the root user of the computer, which is not logged out when using the Migration Assistant tool. For the path/to/image.dmg part, the easiest way to replace that with the correct path is to locate the file then click and drag it right into the Terminal window.