Replacing hard drive in Macbook late 2009 what do I do about osx?
You can use the drivers CD present in the MacBook box at the time of acquisition. Following the steps you can instal an old version and then update to the last one. Otherwise there should be the possibility of start a recovery and directly download (using a WiFi connection) the last versione of the OS.

An other option is to use Time Machine, if and only if, you have previously made a backup of the entire system before the swap of HD.