Install Snow Leopard (Mac OS X 10.6) from USB and restore only user files from Time Machine

Install Mac OS X 10.6 from a USB memory stick.

Here’s a tutorial on how to install Mac OS X from a USB stick.

Restore only user data from Time Machine

So now comes the restoring. I wanted a clean install – the last installation was pretty messed up.

Now is the time to say that I have a Time Machine for backing up stuff. I didn’t want to restore any system stuff, neither I wanted to restore users and their settings. I just wanted to restore ~/Desktop, ~/Documents, ~/Downloads, ~/MyFiles.

This came out to be VERY HARD.

When installing the OS, the installer asks for a Time Machine, but I said NO, cause I was afraid that it would restore more than I wanted it to.

After the installation was complete I launched Time Machine and tried to go back. I had the snapshots but couldn’t restore them because the owner of the files no longer existed.

With a lot of manual copying I managed to move the data back to my harddrive. Now I had to fix the permissions. Using Mac OS X for that could prove to be impossible.

The console

Going to the console helped a lot.

First to change the owner of a directory:

$ sudo chown -R mstoynov Desktop/
$ sudo chown -R mstoynov Documents/
$ sudo chown -R mstoynov Downloads/
$ sudo chown -R mstoynov MyFiles/

Some of the operations may fail with:

chown: Desktop/web/UC.class: Operation not permitted

The problem most probably resides in some flags being set up. Most probably uchg.

To see whether any files have uchg anywhere in a directory, I did:

$ ls -lOR Desktop/ | grep uchg
-rwxrwxr-x  1 502   staff  uchg   4228 29 Мар  2003 GrandeProjecto.jpx
-rwxrwxr-x  1 502   staff  uchg   1676 18 Авг  2003 GrandeProjecto.jpx.local
-rwxrwxr-x  1 502   staff  uchg    832 29 Мар  2003 GrandeProjecto.jpx.local~

To fix the uchg flag, I did:

sudo chflags -R nouchg Desktop/

Then again chown is required.

That’s it. Now my data is once more mine.

Chown the data on the time machine

The same problem with permissions exists in the time machine. There fixing them is not so easy – to many symlinks and too many directories owned by root. Also I don’t know whether I should remove uchg from anywhere. So fixing all that is not that simple. If I figure it out – I’ll share the knowledge.

Install Snow Leopard (Mac OS X 10.6) from a USB

Mac OS X 10.6 image is 6.3 GB. Using a normal DVD does not work.

Since I’m lazy to go out and buy a dual-layer dvd (8.5 GB max), I decided to use a USB flash to install the new OS.

This is a good guide on how to do that: http://www.maciverse.com/install-os-x-snow-leopard-from-usb-flash-drive.html.

The only problem is that I didn’t actually use a USB stick, but this:

Kingston MicroSD HC 8GB. It comes with 2 different SD adapters, and what is very cool – a very tiny USB adapter. It’s the smallest USB I’ve ever seen.

I bought this for my phone, but came out to be very handy. By the way I highly recommend this Kingston memory.

So the problem with this memory is that it took roughly 2 hours for the Mac OS X 10.6 image to burn (I can’t say burn in this case, right?), while in the tutorial they say it took them only 20 minutes. The memory went pretty hot also – it was working hard for a couple of hours.

I wanted a clean install so I erased the hdd first.

Everything else went like a charm.