First you have to create a recovery drive from an existing working Windows 8/ 8.1 Computer with a USB Drive.
1. In the working Windows 8, filter by Settings and click the "Create a recovery drive" search result. In Windows 8.1 there is no need to filter the results. Type recovery and click or tap the "Create a recovery drive" search result.
2. A User Account Control prompt pops up, asking whether you allow the Recovery Media Creator to make changes to your computer. Click Yes and the Recovery Media Centre is started.
3. You are shown information about the Recovery Media Creator and what it does. Also, there's an option that says "Copy the recovery partition from the PC to the recovery drive".
Remember, if you have a computer that was sold with Windows 8 or Windows 8.1 preinstalled, it may have a special recovery partition, with custom recovery tools created by its manufacturer. If that is the case for your PC, you will be able to check this option and have that partition copied to the recovery drive you are about to create. If you don't want to copy this partition and you want to create a drive only with the recovery tools available for Windows 8 and Windows 8.1, do not check this option.
4. Click Next.
5. You are then later asked to select the USB Drive on which you want to save your recovery files to. It must have at least 256MB in size. (Backup your files before performing this)
6. Select the drive you want to use and click Next.
7. The selected drive is formatted and all the system recovery utilities are copied on it. The process will take a minute or two, depending on the drive you selected.
8. Once the process finishes, you can use the recovery usb to boot into the HP Pavilion and perform a startup repair by clicking "Troubleshoot" at the startup screen and then "Advance Options" followed with "Start-Up Repair". Wait for your computer to restart and the Start-up Repair starts up automatically. You are asked to choose an account to continue. Select a user account that's set as an administrator. Start-up Repair starts to diagnose your computer or device and, if it finds problems that it can solve, it automatically repairs them. If your problems were repaired, you are informed about this and you can can restart your computer or device.
If the problems were not repaired, you are informed and you are given the option to access the Advanced options screen where you can find other troubleshooting tools or Shut down your computer.