Monday, May 16, 2011

Make sure your Mac always has these folders

I realized Friday, when I was finishing my Leopard image for the Ad Layout designers, that there weren't any messages in the console! No system logs or anything.. I also noticed weird files showing up at the root of the system volume, some with no names (must have been spaces) and some named like '%B0%B1' and other weird naming structures. They looked like temp files of some sort, but they weren't plain text.

I use the awesome Carbon Copy Cloner to create my Mac images after they are configured - I save them as disk images for later imaging to an empty partition on the destination Mac. I had been working on this particular configuration off and on for a couple of months - taking an image after substantial work so as not to lose it. (Good thing, too, since I needed to roll out my build Mac quickly one day two weeks ago and grab another one to work on. :)

I must have something mis-configured in my CCC settings.. so I installed a fresh copy of Leopard and immediately imaged it, then blasted that image back. Same symptoms - I've definitely got something wrong.

I'm slightly obsessive about having a clean system, although I try not to break anything with my cleaning! In this case, I took the suggestion from this Knowledge Base article about what additional folders I could exclude from my new image, and added a custom entry after communicating with CCC's developer at this forum post. The first three lines are the suggestion, and the fourth is my addition:

- Library/Caches
- /Library/Logs
- /private/var/log
- /private/var/folders


It turns out that the folders 'log' and 'folders' weren't being copied at all, which makes sense. However these are located in a locked down area of the system, where you need to issue commands with sudo - OSX couldn't create the folders! Thus no system logs, and no folder for certain temp files and caches, including a system font cache.

So I adjusted my entries to copy over the folders but not the contents, and my Mac image is much happier (and I am too!). The new entries look like this:

- Library/Caches
- /Library/Logs
- /private/var/log/*
- /private/var/folders/*


chris