Where did you get Windows 7? If you burned it yourself, confirm ISO integrity and burn another to DVD using ImgBurn at 4x speed. Or write ISO to flash stick using
Universal USB Installer with Windows 7 in dropdown menu, then boot stick under USB or HD's.
Try setting HD first to boot in BIOS setup, then start DVD using HP's ESC one-time BIOS Boot Menu key.
If this fails, trying removing all but 2gb RAM to try install, unplug all peripherals.
Next check for newer BIOS update, install from old OS. If no newer BIOS then reset the CMOS:
Clear CMOS - 3 Ways to Clear the CMOS - Reset BIOS
While in BIOS setup set SATA controller to AHCI if available.
You can also move HD to another machine, install Windows 7, then SysPrep the HD to remove all drivers to move it back to problem machine:
SysPrep to move HD to another computer