Boot off the XP disc. Instead of trying to install windows, use the R option to enter the repair console. The default admin password is blank, so just hit enter when prompted.
At the command line type: chkdsk /r
That will scan your hard drive for errors and try to repair them.
i have dell inspiron 1000 laptop and when i keep it on for 2-6 minutes it shut down automatically.