For the last couple of years, I've always tried to keep my operating system and installed components on a separate partition from my data. This way if I had to reinstall the operating system, I could just format and reinstall on the system partition, leaving the data unharmed.
Now, if you are installing from an OS disk (say, a Linux CD or a Windows disc), usually their installers allow you to select what partition to install to, leaving the others untouched. But, for a number of years now, computers do not come with OS reinstall discs (if you are using Windows). Instead, they come with "recovery partitions". This has both good and bad aspects: you don't have to worry about discs getting damaged or losing them, but you also have to make sure your hard drive doesn't get physically damaged.
The other annoying aspects of recovery partition is they don't just reinstall the operating system. They also reinstall all of the bundled software the PC manufacture installs (sometimes called 'bloatware') in order to make the cost of the computer cheaper (check out PC Decrapifier for a nice way to deal with this software). Still, it's better then not being able to reinstall the OS at all. Now, I've used my XP recovery partition a few times and always left my data partition untouched. Since getting my new computer, I had yet to separate the partitions as I haven't had time. I used Vista's built-in partition tool to do this (I had used some third party tools in the past). Vista's tool is decent, but it has problems, if you are having trouble using it I suggest this link. So after spending a few hours preparing everything I partitioned. As I was about to transfer my data over to the other partition it suddenly occurred to me: what if the new recovery partition I was using didn't discriminate against partitions? That is, what if it decided to ignore my partition and erase the entire hard drive (minus itself)? Well that wouldn't be good. After doing some googling I couldn't find a straight answer. I was really curious. And I was bored. So I booted into the recovery partition. I'd only intended to go enough through the process to see if there was an option or anything which indicated what partition it would install on. Unfortunately, one click too many, started the process and I couldn't cancel it. I hadn't moved my data yet. Oh dear.
Fortunately, the laptop is still new and there really wasn't anything on it I couldn't do without losing. Quite ironic how my attempted security precaution ended up making me lose my data! Not that I'm saying it's a bad precaution. BUT if you do decide to use it, it shouldn't be your only precaution, you should have other data backups in place. And, you should confirm that your specific recovery partition won't destroy other partitions. Hopefully with a less direct method then it took me :). If you are using Linux (with naturally keeps data on another partition), this shouldn't be a problem, and I believe (though I am not certain) OS X would also allow you to select a partition. I actually only did a recovery on OS 9.0 before and I only had one partition at the time. So I think it's a good idea, but not perfect.
A day or so later and things are back the way they should be. Hopefully I won't have to do it again, but it was a good experience, though one I hope others won't have to repeat. I probably could have come up with a better way to test, what might be another way to test your recovery partition without using it? Someone once told me if an asteroid destroyed your house and you couldn't get your data back you weren't prepared enough. Hopefully you have a few copies of things that are important :). Cloud storage in the future might help with this as well.
Take care all!