you do not need to fdisk or format the hard drive before running the XP installation CD, you can set up and format the partitions during installation.
I would suspect that you have hardware problems, you could try testing the memory with memtest86 and the hard drive with the manufacturers...