Error loading operating system message appear when Windows XP restarts during installation.

This issue is caused by any of the below reasons.

1. The computer’s BIOS do not support the computer hard disk drive’s size or settings.
2. Computer Hard disk drive is not properly setup in CMOS.
3. Issue with drive’s partitions.

Solve the computer’s BIOS do not support the computer hard disk drive’s size or settings.
Look at the bios and see if the hard drive is detected. To resolve this issue, update the computer motherboard’s BIOS.

Computer Hard disk drive is not properly setup in CMOS
Verify that the computer’s hard disk drive is properly setup in CMOS setup.

Once in CMOS, verify the below hard disk drive settings.
1. Verify the hard disk drive is detected.
2. Try changing the “Access mode” on the hard disk drive to “Large” or “LBA”. This setting may vary depending on the type of BIOS.

Issue with drive’s partitions
This issue can be cause if the disk drives are not properly setup or have been changed by another program, such as a utility that comes with a Linux distribution. To resolve this issue, delete and recreate all the partitions before running the Windows XP setup.

You can find more here