Step 1
Make an installer drive on a USB stick or a USB harddrive. Use a GUID partition, Extended Mac OS X Journaling. Download Yosemite installer on App Store.
createinstallmedia
does not work on Snow Leopards.
Instead, use Option 2 of this article. I forgot the copying the .dmg at the top level of the drive and I got an instalation error.
Step 2
Back up current OS with Carbon Copy Cloner version 3 (I used 30-day-trial and it worked fine). My mac kept on crashing and it was because it was indexing the new harddrive while it was cloning. Make sure to turn off indexing on the Spotlight settings.
Step 3
Erase current OS disk. Boot to the newly created boot drive by pressing Option
key while the computer is starting up. Go to utilities and erase the old OS to an empty Mac OS Extended Journaling.