I erased the disc and reinstalled from the DVD the Mac came with. Everything was fine until I tried to install the updates and it stopped from there. It's the osx 10.4.
Safari and finder won't open unless I click on system preference in the dock which then shows the apple logo, etc on top.
Thank you Neville Hillyer. Was able to install all the updates after repairing the hard disk and permissions and also after erasing everything and reinstalling it again. I installed the updates one by one instead of in a group and it worked.