Jump to content
United States - English

Installing or Replacing a Hard Drive

Give us feedback

This document:
  • » Was helpful
  • » Was not helpful
  • » Does not apply

Support details

This document provides step-by-step instructions and links to a video on how to remove and add a hard drive on HP and Compaq desktop PCs.
It may help to print this article for easy reference before starting the hardware change.
NOTE: HP cannot be held liable for damage resulting from improper installation of software and/or parts, or the installation of parts and/or software that were not supplied by HP.
NOTE: The images in this document may not be exactly the same as the PC you are using.
Before you begin
Before you begin, check the following items:
  • If installing an additional drive, make sure that your PC has at least one additional drive bay. Many HP and Compaq desktop PCs only have one drive bay and it is already in use. For these PCs the only option is to upgrade the hard drive.
  • Make sure the motherboard in the PC can support the type of drive that you want to install. The most compatible drives are IDE, followed by Utra-IDE (EIDE), and then Serial ATA (SATA).
  • If you want to add an additional hard drive to the PC, you probably should upgrade the power supply as well. Especially if additional components like memory or a CD or DVD drive were also added.
  • If adding an IDE drive to a PC that already contains an IDE hard drive, you may need an IDE cable that has three connectors. Some HP and Compaq PCs use IDE cables that contain only two connectors, one for the motherboard connection and one for the back of one drive.
  • If you are replacing a drive, get a recovery disc set for your exact model of PC.
  • If you are installing new drive, you will need recovery discs to format the new hard drive.
  • Get a Phillips screwdriver and a medium flat-blade screwdriver.
  • HP strongly recommends the use of an anti-static wrist strap and a conductive foam pad when working on the computer.
  • Find a clear, flat, stable work surface over a non-carpeted floor.
Installation overview video
This video is provided as a supplement to the instructions in this document to gain a familiarity with what can be involved in perfroming this procedure. Read the other sections before attempting to add or replace hardware.
NOTE: Your case will probably be different than the case example used in the video.
NOTE: For best quality on dial-up connections, wait until the video has fully loaded before viewing.
View by clicking the Play control under the video screen.

Click the Pause control to stop the video.

Go to the beginning of the video by clicking the Rewind control.

Silence or enable audio by clicking the Audio control. (Audio in English)
NOTE: Flash Player from Macromedia is required to view this video. If needed, visit the Macromedia website (in English) to download and install Flash.
Step 1: Opening the case
Use the following steps to open the case:
WARNING: The edges of metal panels can cut skin. Be careful not to slide skin along any interior metal edge of the computer.
CAUTION: This product contains components that can be damaged by electrostatic discharge (ESD). To reduce the chance of ESD damage, work over a noncarpeted floor, use a static dissipative work surface (such as a conductive foam pad), and wear an ESD wrist strap connected to a grounded surface.
  1. Unplug all cables except for the power. Write down each cable location if you do not already know where it connects.
  2. Unplug the power cable and with the power cable removed press the Power button on the front of the PC.
  3. Remove the screws on the rear of the PC.
  4. Slide both side panels off from the rear of the PC.
  5. On some cases, it may be necessary to remove the front of the PC so that you can remove the drive cage. If so, press in on the tabs that retain the front cover, there should three to four on each side of the cover and gently pull forward. It helps to have a friend help with this process. Carefully detach any cables that may also be attached to the front cover.
Step 2: Disconnecting the cables
  • If you are replacing a drive, use this section to find and unplug the IDE/Serial ATA or power cables.
  • If you are adding an additional drive and the empty bay is part of a removable drive cage, use this section to find and unplug the cable to make the drive cage removal easier.
  • If you are adding an additional drive into an empty drive bay on the chassis, skip this section and go to Step 5 .
  1. Find the hard drive. The hard drive usually sits under the CD and DVD drives and has a thin flat ribbon cable.
  2. Disconnect the IDE or Serial ATA cable and the power cable from the back of the drive. remember where each cable goes.
    IDESerial ATA
CAUTION: Serial ATA data cables may include a latch (underneath the plug for select models only). Press the latch and pull the plug to remove the data cable from the drive. Failure to unlatch the connector may damage the hard drive.
Step 3: Removing the drive cage
On many HP and Compaq PCs, drives are attached to drive cages. Often, the installation and removal instruction for the cages are located next to the drive cage or on the side panel. The following images are some examples of the types of drive cages that come on HP and Compaq PCs. For more detailed information information about a particular chassis, refer to the Hardware and Servicing guide or User Guide for your particular model of PC.
CAUTION: Many Media Center PCs come with a swing out drive bay (shown below). The plastic covering for the memory card reader must be removed and the cord to the front panel lights must be unplugged before the drive bay can be removed.
Drive cage examples
Step 4: Removing the drive
  • If the drive is attached to the chassis or drive cage with screws, remove the screws and slide the drive out.
  • If the drive is retained by a plastic latching system, lift the latch to slide the drive out.
    Set the old drive aside. If the drive is to be re-used, place it in an ESD safe container for storage.
Step 5: Installing a new drive
Use the following steps to install a new hard drive into the PC:
  1. If you are installing an IDE hard drive, Make sure the jumpers on the drive are set to Cable Select or CS.
    Not sure which pins represent Cable Select? Refer to the labeling on the drive itself, looking for CS. If the drive is not labeled, refer to drive documentation.
    Serial ATA drives do not require jumpers
  2. Slide the new drive into the open bay until the screw holes align with the holes in the chassis or drive cage. If the drive attaches to the chassis using a plastic latch you will need to insert the screws into the drive and screw them down before sliding the drive into place.
    Chassis screwsSliding guide for a latch system
  3. If a drive cage was removed, reattach the drive cage and secure it in place.
  4. If you are installing a Serial ATA drive, connect the Serial ATA cable into the first open Sata slot on the motherboard, Sata1 first or Sata2 second. Connect the other end of the Serial ATA cable into the back of the hard drive.
    If you are installing a IDE drive, connect the end of the IDE cable into the IDE interface connector on the back of the drive as follows:
    NOTE: If the motherboard and hard drives are capable of Ultra-IDE, make sure that use an Ultra-IDE cable. A regular IDE cable will work, but the data transfer rates will not be as good.
    • If there is only one hard drive in the PC, connect the ribbon cable using the last connector (Master).
    • If there are now two hard drives in the PC, connect the first drive using the last connector on the cable (Master) and connect the second drive using the middle connector (Slave).
    1 - Slave connector (or second drive)
    2 - Master connector (first drive)
    If the IDE cable was removed from the motherboard, connect the other end of the IDE cable into the motherboard (into the Primary IDE slot). This can be difficult because space is limited. Be very careful to not dislodge the other cables and make sure that it fits snugly into its connector. Use a flashlight to make this easier.
  5. Connect the power cable into the back of the drive. Be careful to not dislocate any other cables.
  6. Make sure that all of the connectors are fully seated. A loose cable can cause many different types of boot errors.
Step 6: Replacing the cover(s)
  1. If the front cover was removed earlier, connect any cables that go to the front cover, align the tabs on the front cover to the holes in the front of the chassis and snap the front cover into place.
  2. Replace a side panel by matching the side panel tabs with the tab openings in the case.
  3. Insert the side panel and slide it forward.
  4. Fasten the screws to secure the side panel. Repeat for the other panel.
Step 7: Configure the new hard drive
  1. Turn on the PC. When the blue HP logo screen appears, press F1 to enter the BIOS.
  2. Make sure the new drive shows up under its proper location (primary or secondary). If not, exit BIOS, turn off the computer, open the case and make sure the IDE and power cables are firmly and correctly connected. Make sure the new hard drive switch is set according to the manufacturer’s recommendation. Once the settings are confirmed, close the case and repeat #1.
    CAUTION: The following steps will erase your hard drive. If you are installing a hard drive that already contains data you are done with installation. Restart the computer to begin using it. If you are adding a blank hard drive, go to #3 to continue configuration.
  3. If the hard drive was a replacement hard drive, insert the first recovery disk or a startup disc into the first optical drive, restart the PC, and follow the instructions that appear to recover the PC. Do not use the rest of these steps. You are done.
    If a second hard drive was added, use the following steps depending on the versions of Windows you have:
    Windows XP
    If the disk does not show up in Windows with usable space, use the following steps to format the drive and make it usable:
    1. In Windows XP, click Start , right-click My Computer , and select Manage .
    2. Select Disk Management from the left side.
    3. Right click the icon from the new drive in the right side and select Format .
    4. Follow the on-screen instructions.
    Windows 98 or ME
    If the disk is not already prepared, partition the drive and format it to FAT32 using the FDisk utility. For details on how to do prepare the drive, refer to the HP support article Using the FDISK Utility .