According to Microsoft, Windows 7 must be installed on a primary partition. This error code means the installer hasn't found a primary partition on the target drive. The primary partition must be on the first hard drive in the boot order, and if you have more than one user partition (not counting the small drive table partition), you must install to the first user partition. Unfortunately MS doesn't seem to have a clear, comprehensive answer to the issue. I've gleaned the following from various forum responses.
For some reason the installer is date sensitive, so make sure the time and date are correct in the BIOS. Time your next install attempt so it will NOT go past midnight during the installation.
Check your BIOS settings to make sure the drive is listed as a "primary" drive (drive 0, not drive 1) rather than a secondary.
Some people have had problems with the Windows 7 installer on drives that have the Master Boot Record from previous installations. Try a FORMAT /MBR using the Windows 7 install CD. If this doesn't work,
- Use the partition command to remove the target partition from the drive to wipe this out
- Partition the now unused space and reformat (again!), and
- If the partition command or installer has an option to set a partition as primary (or something else), choose primary (disk 0) for the partition you want to use for Windows 7.
If all else fails, use your HP Software Recovery CD to do a complete repartition and reformat. You could use the Windows 7 partition command to do the same thing, but then you would lose the HP System Recovery partition.
However, if HP is marking the System Recovery partition as partition 0, it could be causing the problem. In that case, see if HP has an updated version of the CD that includes a fix for this, or do without it and turn it all over to Windows 7.