If I read your set up correctly, you have 2 hard drives... one set as master, and one set to slave... correct? The 1st thing I would do is remove the slave drive. I have had problems in the past, when trying to install a new OS, that it would cause some problems, especially if the slave drive also has an OS installed on it. Once your OS is installed, you should be able to plug the slave drive back in.
Something else to think about...
I had a similar problem with a laptop recently, and I found that the hard drive had a hidden partition that was causing all of the issues. I removed all of the partitions and reformatted and then did a complete reinstall of the OS. Everything when perfect after I did this