Not sure what the problem is but it is not a virus because macs don't have any viruses (currently) and (b) you said you tried to reinstall the system. May be some hardware problem.
Try pushing the mouse key down when you reboot to eject the dvd.
Boot from you installer dvd and run disk utility on you boot drive to repair/verify the drive (not repair permissions).
Boot from your second installer dvd with the D key pressed after the boot chime to run Apple Hardware Test.