What exactly did you install and how did you install it?
Did you reformat the disc?
Only sp2? Both XP with SP2 on a single DVD? Some other ?
Did you use the original system disks or retail version?
After installing the operating system, did you reinstall all the drivers? Both the Dell system disc and Windows OS should have drivers to install after the operating system.
When you say sometimes it works, do you mean its hit or miss and you are doing nothing different the times it works?
What are the exact error messages you get?