HDAT2 FAQ (Frequently Asked Questions)

  1. I received a 40 GB drive in replacement for a 20 GB model in PC.
    The drive reports a capacity of 20 GB. How can I get full capacity?
  2. How to bypass a Security and/or DCO frozen state?
  3. Can I remove non-existent bad sectors from the file table FAT?
  4. Connecting ATA/IDE Hard Drives
  5. What are the differences between master/slave and cable select?
  6. Host Protected Area (HPA) vs. 28/48-bit LBA mode
  7. Change of DCO Modify item is always aborted (abort command)
  8. What is Spread Spectrum Clocking (SSC)?
  10. Can I cut down size of hard drive?
  11. How can I determine supported media format of CD/DVD drive?
  12. Portable computer with Windows Vista has problem with power consumption.
  13. Host Protected Area (HPA) from BIOS.
  14. The Hidden Protected Area (hidden partition).
  15. I cannot remove Host Protected Area (HPA) on Dell notebook (Media Direct HPA).
  16. I cannot read SMART for USB/FireWire hard drives.
  17. Western Digital WD5000KS does not spin-up (firmware bug).
  18. How to non-destructively convert dynamic disks to basic disks.
  19. Hard disk does not spin up - PUIS (Power Up In Standby).
  20. Windows support for logical units larger than 2 TB.
  21. GUID partition table (GPT) disks.
  22. Physical/Logical sector size 512 bytes or 4096 bytes (8*512 = 4 KB).
  23. Error Page Fault when the program starts.
  24. How create DOS bootable USB drive?

Q1: I received a 40 GB drive in replacement for a 20 GB model in PC. The drive reports a capacity of 20 GB. How can I get full capacity?

A1: If you see in 'Device List' menu at your disk drive a notice '!SET MAX: HPA IS ACTIVE', use 1. method, otherwise use 2. method.

In program HDAT2 select your disk drive and press Enter to show 'Main Menu'.

1. method:

In 'Device List' menu at your disk drive you see notice '!SET MAX: HPA IS ACTIVE'.
Select 'SET MAX (HPA) Menu', then select 'Set Max Address' and press Enter. By default the native capacity of disk drive is preset and you can just press a key 'S' to setup original capacity of hard drive and remove HPA area.
If the command is aborted, try change 'LBA mode' from 28 to 48 or vice versa (if disk supports 48-bit LBA mode).

After this you can also disable support of HPA feature:
Device Configuration Overlay Menu - Modify - Host Protected Area feature
set REMOVE action and press a key 'S'.

2. method:

Select 'Device Configuration Menu', then select 'Restore' and press Enter. If you don't see any error message, in 'Device List' menu press a key 'D' to make new detection of devices or simple make restart of PC's and check capacity of your hard drive.
If you see any error message or in 'Device List' menu at your disk you see a notice '!DCO: FROZEN', then it is possible that BIOS was sent a command DCO Freeze and all subsequent DCO commands will be aborted now. How to try bypass this state see answer nr. 2.

Q2: How to bypass a Security and/or DCO frozen state?

A2: a) The SECURITY FREEZE command is being set in the boot process. This will prevent any further SECURITY related commands being sent until the hard drive is power cycled. It is most likely your BIOS doing this. Look in your BIOS configuration/setup, but some BIOS's do not have an option to turn this off, so you may be required to find different PC/BIOS.

b) Try to connect the drive to another controller channel (maybe the last one) or another position on the channel. Some BIOS's do not send the Freeze Lock command to all channel master/slave positions.

c) Hot-plug method with data cable: When the computer is off unplug the data cable from this hard drive. Power on PC, boot into DOS and then plug the data cable of the hard drive back in. I hope that the program will find this disk.

d) Hot-plug method with power cable: it is tested, but use this method at your own risk!
1. Boot from HDAT2 boot medium.
2. Remove the SATA power cable from the drive. Wait around 30 seconds until the disk is off.
3. Carefully reconnect the SATA power cable and wait around 30 seconds until the disk is on.
4. Run the HDAT2 program and the security/DCO should not be in frozen state.

Q3: Can I remove non-existent bad sectors from the file table FAT?

A3: Yes, with file-system version program HDAT2FS or HDAT2 you can test FAT12/16/32.

  • select your drive and press Enter to run Menu
  • select 'File Level Tests Menu' and press Enter
  • select 'Read File System from MBR' and press Enter
  • for item 'All' press 'C' to check detected items
  • go to 'Table' item and 2-times press Enter to run Utility menu
  • press 'T' to setup test for file table FAT
  • if you want to update file table press 'W' for update
  • press Enter to run

This procedure will first compare both FAT copies and second tests all FAT entries for bad sectors. If program will find 'bad sector' entry, then all sectors in this cluster will be tested. If all these sectors are not bad program will remove this record of bad sectors.

Q4: Connecting ATA/IDE Hard Drives

A4: ATA/IDE devices use a ribbon cable to connect to each other. Ribbon cables have all of the wires laid flat next to each other instead of bunched or wrapped together in a bundle. IDE ribbon cables have either 40 or 80 wires. There is a connector at each end of the cable and another one about two-thirds of the distance from the motherboard connector. This cable cannot exceed 18 inches in total length (12 inches from first to second connector, and six inches from second to third) to maintain signal integrity.

40-wire Cables

On the slower older 40-wire ATA cables, the Slave device, usually a CD-ROM or CD-ROM recorder/burner still goes on the END, but you need to set the jumpers as Slave. This is true even if you don't have a hard drive in the Master position. The Master for 40-wire cables goes on the Middle connector.

If you want to use the cable select with the older drive on a 40-wire cable, you will have to consult the maker of the drive for the instructions.

80-wire Cables

On the ATA66/100/133 standard 80-wire cable, the Master hard drive or your boot hard drive goes on the END of the cable. This is true whether you use the Master/Slave style or the Cable Select style.

The 40-pin 80-conductor cable is orientation specific. The cable connectors are color-coded: blue for the host connector, black and gray for the primary and secondary disk drives. The blue connector should be installed into the Primary IDE connector.

The blue connector attaches to the motherboard.
The black connector attaches to the primary, or master, drive.
The gray connector attaches to the secondary, or slave, drive.

Along one side of the cable is a stripe. This stripe tells you that the wire on that side is attached to Pin 1 of each connector. Wire 20 is not connected to anything. In fact, there is no pin at that position. This position is used to ensure that the cable is attached to the drive in the correct position. Another way that manufacturers use to make sure that the cable is not reversed is by using a cable key. The cable key is a small plastic square on top of the connector on the ribbon cable that fits into a notch on the connector of the device. This allows the cable to attach in only one position.

Q5: What are the differences between master/slave and cable select?

A5: Two different protocols can be used for jumper ATA devices, including hard disk drives. One is the master-slave relationship. With this protocol, one device is jumpered as master and the other is jumpered as slave. The second protocol is cable select. With this protocol, both devices are jumpered as cable select and their position on the cable dictates which is the master and which is the slave. The end device is master while the device on the middle of the cable is slave. You can use either of these protocols but you cannot mix them on the same data cable.

Computers that use cable-select determine the master and slave drives by selecting or deselecting pin 28, CSEL, on the interface bus. Master and slave drives are determined by their physical position on the cable.

Configuration Using Cable Select

Cable Select is defined in the ATA-2 and ATA-3 specifications and is part of the ATA PnP standard and Microsoft's PC97 standard.

The standard 40-wire ATA ribbon cable and the 80-wire cable give different drive behavior when using Cable Select. If using the standard 40-wire cable, the Master goes in the middle connector and the Slave goes in the end connector. If using the 80-wire cable, attach the blue end connector to the system board or host controller, the gray middle connector to the Slave, and the black end connector to the Master.

All newer ATA hard drives can be jumpered as Cable Select (CS or CSEL). This is an alternate way to indicate which drive is master and which drive is slave (instead of jumper one drive as master and one drive as slave). Cable Select jumper requires a special IDE cable with wire 28 not connected to one of the drive connectors, which would configure the drive attached to that connector as the slave drive.

In order to use Cable Select jumper, several conditions must be met. Both drives on a channel must support CSEL, both drives must be jumpered as CSEL, a CSEL cable must be used, and the host interface connector must support CSEL. For the host interface to support Cable Select, wire 28 must be grounded.

Although the Cable Select specification may simplify things in the future, there will probably be lots of confusion, especially on legacy systems, as this starts to be introduced. One problem will be in selecting the correct cable. Supposedly, the cables used for Cable Select will be clearly marked, with each connector labeled as Device 0 (or Master) or Device 1 (or Slave). If not clearly marked, it may not be easy to identify a CSEL cable visually. wire 28 can be checked for continuity.

A Cable Select cable can be constructed in various ways. Pin 28 may be not connected to the connector at the end of the cable or to the connector in the middle of the cable. Another design would have the host interface connector in the middle and the two drives would plug into each end of the cable, with the connector at one of the ends not connected to pin 28.

If both drives are set for CSEL and the host interface supports CSEL, but a regular cable is used, both drives will be seen as master.

A Cable Select cable can be used with master/slave drive jumper.

Another problem will be with host interfaces on legacy motherboards and controller cards. If pin 28 is not grounded on the host interface, drives connected to either connector on the CSEL cable will be seen as slave. It will be common to find that pin 28 is open or high on many older IDE interfaces. This can be checked with a voltmeter.

Q6: Host Protected Area (HPA) vs. 28/48-bit LBA mode

A6: There is a problem of incompatibility on some hard drives (e.g. Seagate and/or in an external Maxtor One Touch) when you are using 48-bit command for removing Host Protected Area (HPA) created with 28-bit command.
48-bit command cannot remove HPA created with 28-bit command and vice-versa. Following solution is for disk supports 48-bit LBA mode only and if you have HPA greater than 127 GB.


"Some vendor-specific external drive enclosures (Maxtor) are known to use HPA to limit the capacity of unknown replacement hard drives installed into the enclosure. When this occurs, the drive may appear to be limited in size (e.g. 128 GB). In this case, one must use software utilities that use READ NATIVE MAX ADDRESS and SET MAX ADDRESS to change the drive's reported size back to its native size."


1. Power-on PC, boot and start HDAT2.
2. In 'SET MAX (HPA) Menu' select 'Set Max Address'. Change 'LBA mode' from 48 to 28-bit LBA mode and press 'S' key to set maximal address for 28-bit LBA mode (127 GB).
3. Power-off PC (Important !), power-on PC, boot and start HDAT2.
4. In 'SET MAX (HPA) Menu' select 'Set Max Address'. Leave the selected 48-bit 'LBA mode' (or change 'LBA mode' from 28 to 48-bit LBA mode) and then press 'S' key to set maximal address for 48-bit LBA mode.
5. After restart you should get the full (native) capacity of hard drive.

Q7: Change of DCO Modify item is always aborted (abort command)

A7: Some hard drives (Maxtor) allow to modify DCO always, the other hard drives (Seagate) allow to modify DCO one times only.

Example of the restrictions on changing of bits:

If a user attempts to change maximum LBA address (SET or RESTORE) after establishing a protected area with SET MAX address, the device will abort that command.

If the user attempts to disable Security feature when the device is enabled and the Security feature is set, the device will abort that command.

If you always got an error message (aborted command) when you want to change any item in DCO Modify menu, you should first run a 'Restore' item to restore default settings and then you can go to Modify menu.

Q8: What is Spread Spectrum Clocking (SSC)?

A8: Spread Spectrum Clocking is a way to lower electromagnetic interference or EMI. This is important for storage solutions that are required to pass FCC and other agency certifications. Today, some Serial ATA disk drives implement SSC, some allow you to turn this feature on/off, and some do not implement SSC; it is anticipated that all will implement this feature in the near future.

The technique of modulating the operating frequency of a circuit slightly to spread its radiated emissions over a range of frequencies rather than just one tone. This reduction in the maximum emission for a given frequency helps meet FCC requirements.

Newer Serial ATA (3Gbps SATA) interface disc drives may employ a standard technology called Spread Spectrum Clocking (SSC) which helps to reduce electronic emissions (EMI) in large, multi-drive systems. Single drive environments do not need SSC to meet EMI requirements.

3Gbps means doubled interface speeds, which also means greater signal noise and electromagnetic emissions. As in the processor settings in many motherboard's BIOS, spread spectrum clocking can reduce emissions to meet regulations.

In a single-drive environment, it's not necessary, but when you've got two or more drives, and they're all running at 3Gbps, that's when you've got a lot of electrical noise going on, and the spread spectrum feature is recommended. This is more for safety than reducing data errors, which most drives' ECC code will correct automatically.

A small number of SATA host products do not support this SSC standard feature. Similarly, RAID controllers may need to enable SSC on drive configurations with SSC disabled by default to reduce EMI.

Disable SSC: Host products that do not support SSC cannot detect the presence of the disc drive. Therefore, in order to disable SSC the drive must be attached to another host platform that does support SSC so that the feature can be disabled. Once SSC is turned off, the drive can be returned to the original host system.

Enable SSC: If the drive has SSC turned off by default and SSC is required for a large multi-drive environment, the target system is usually supported by the SSC software. RAID controllers, however, can pose a barrier to communicating with the SATA at the low hardware level required to make the SSC change. If your RAID controller is not supported then a more standard SATA system may be needed to toggle SSC on the drive. Once SSC is turned on, the drive can be returned to the original RAID controller.

There are many accounts on the Internet about problems arising from HBAs (Host Bus Adapter) not supporting SSC as required. Disk drive vendors that tried turning on SSC have had to provide consumers special programs or jumpers to turn SSC off so they will work in non-compliant systems.

SeriTek controller/Hitachi hard disks

Due to this problem, users believe that SATA 3Gb/s HDD's are not compatible with SATA 1.5Gb/s controllers. This is inaccurate as the technology is definitely backwards compatible.


A9: NCQ: NCQ (Native Command Queuing) debuted in many 1.5Gbps drives as a refinement of earlier CQ schemes used in SCSI drives. When a supporting controller sends NCQ-enabled commands to a drive, the drive will intelligently prioritize up to 32 of those commands before performing the reads/writes. Because the controller triggers CQ, the user can enable/disable it in the OS, as from Windows XP's Device Manager. That applications that take advantage of the multithreading features of dual-core and/or Hyper-Threaded processors should complement NCQ for faster throughput.
Explains Native Command Queuing (NCQ) Seagate

eSATA: More of a cable and connector redesign than a fundamental change, eSATA means data cables with better shielding and connectors that are harder to accidentally dislodge or break. The external drive's power is still supplied separately. eSATA headers are rectangular instead of L-shaped, so eSATA cables won't work inside most PCs. The working group came up with eSATA to address the fact that users were already connecting SATA drives externally because the interface outpaces USB 2.0 and FireWire 800Mbps. Shielding that was adequate for use inside a computer case, wasn't good enough outside the box.

xSATA: This option allows the use of much longer external data cables of up to 8 meters in length.

Q10: Can I cut down size of hard drive?

A10: Yes. In 'Device List' menu select your disk drive. Select 'SET MAX (HPA) Menu', then select 'Set Max Address' and press Enter. Now you can choose your required size of hard drive. It should be smaller as native (maximal) size of drive, of course. See also question nr. 1.
Q11: How can I determine supported media format of CD/DVD drive?

A11: In 'Device List' menu select your CD/DVD drive. Select 'Device Information Menu', then select 'Get Configuration' and press Enter. Now you will see list of supported profiles of your drive.
Q12: Portable computer with Windows Vista has problem with power consumption.

A12: Power consumption may be slightly more than expected on a portable Windows Vista-based computer that uses a SATA hard disk that does not support Host-Initiated Link Power Management.
This problem may occur if the SATA hard disk does not support HIPM. In this case, Windows Vista may not use DIPM for power management. Therefore, the Windows Vista power management feature is less able to efficiently manage power consumption.

Q13: Host Protected Area (HPA) from BIOS.

A13: Some motherboards has incorporated the HPA feature in the BIOS. This feature allows information contained in the first partition of the Hard Drive to be copied to a hidden HPA partition on the same drive where it is immune from attack.
If the HPA is removed from the HD the area of use will be available at the end of the drive as 'Unallocated'.
E.g. Gigabyte's Xpress Recovery.

Q14: The Hidden Protected Area (hidden partition).

A14: The Hidden Protected Area is a special area (hidden partition) (usually a few gigabytes in size) located at the end of a hard disk. It is preinstalled on the hard disks of some PC's (e.g. IBM). It is normally hidden to the software running on this PC. It includes all the software and data needed to recover the preloaded state of the PC. This HPA also includes some diagnostic tools and a backup tool. Some vendors are using the HPA instead of providing rescue media.
It is referred to as the Predesktop Area in the BIOS Setup Utility. That hidden partition is not an HPA.

Q15: I cannot remove Host Protected Area (HPA) on Dell notebook (Media Direct HPA).

A15: With the program HDAT2 you did the first half of the fix but missed the second part.
The Dell MBR (Master Boot Record at sector 0) calls special code in LBA sector 3 to re-enable the HPA anytime you boot from the hard disk. After you unhide the HPA, in order for it to stay unhidden you need to either get rid of the Dell MBR (so LBA-3 does not get called) or you need to disable LBA-3 (wipe LBA sector 3). (search on Google for 'dell hpa mediadirect')

Q16: I cannot read SMART for USB/FireWire hard drives.

A16: It all depends on the chip your USB/FireWire enclosures with drive have. The protocol USB-IDE bridge between the USB and ATA protocols should support SMART data and correctly send SMART data over those interfaces. If you cannot see the SMART menu, your drive cannot send SMART data.
Supported bridge chips: Cypress, JMicron and Oxford.
E.g. Western Digital Passport is using Cypress AT2+ USB/ATA interface.

Q17: Western Digital WD5000KS does not spin-up (firmware bug).

A17: Taken over from Google Notebook.
If any controller or software you have enables the "Power-up in Standby" feature on these drives, you cannot disable it. In fact, once that mode is enabled, the drive reports conflicting information.
Western Digital said on the phone the KS line of drives are not a high-enough priority for them to fix the firmware.

Q18: How to non-destructively convert dynamic disks to basic disks.

A18: Read this instruction disk_probe.pdf.

Q19: Hard disk does not spin up - PUIS (Power Up In Standby).

A19: The optional Power-Up In Standby (PUIS) feature set allows devices to be powered-up into the Standby power management state to minimize current at power-up and to allow the host to sequence the spin-up of devices.

This optional feature set may be enabled or disabled via the SET FEATURES command or may be enabled by use of a jumper, or both. When enabled by a jumper, this feature set shall not be disabled via the SET FEATURES command.

Once this feature is enabled in a device, the device shall not disable the feature as a result of processing a power-on reset, a hardware reset, or a software reset.

If the device implements this SET FEATURES subcommand and power-up into Standby is enabled, the device shall remain in Standby until the SET FEATURES subcommand is received.

If the device does not implement the SET FEATURES subcommand to spin-up the device after power-up and PUIS is enabled, the device shall spin-up upon receipt of the first command that requires the device to access the media, except the IDENTIFY DEVICE command or the IDENTIFY PACKET DEVICE command.

Solution for HDAT2 program: if you have a hard disk with enabled PUIS (cannot spin up and BIOS cannot recognize this drive) run program with parameter /W Wake/Spin-up the drive:


Without the parameter /W, when PUIS is detected on the disk, the program asks you to turn off PUIS.

List of parameters: HDAT2 /? or HDAT2 /h.

Q20: Windows support for logical units larger than 2 TB.

A20: Disk devices with more than 2 TB of disk space must be converted to GPT format for all of the disk space to be usable. If the device uses MBR format, the disk space beyond 2 TB will be unusable.
Q21: GUID partition table (GPT) disks.

A21: A GPT disk uses the GUID partition table (GPT) disk partitioning system. A GPT disk offers these benefits:
  • Allows up to 128 primary partitions. (MBR disks can support up to four primary partitions and an infinite number of partitions inside an extended partition.)
  • Allows a much larger volume size - greater than 2 TB, which is the limit for MBR disks.
  • Provides greater reliability due to replication and cyclical redundancy check (CRC) protection of the partition table.
  • Can be used as a storage volume on all x64-based platforms, including platforms running Microsoft Windows XP Professional x64 Edition. Windows Server 2003 SP1 also enables support for GPT in x86 versions of the Windows Server 2003 family.
  • Notes:
    Unlike Windows support for the Intel Itanium platform, Windows x64 Edition and Windows Server 2003 SP1 operating systems support the use of GPT drives only as data volumes. Because the x64 and x86 architectures do not provide support for an EFI boot partition, you cannot use a GPT drive to boot an x64-based computer or an x86-based computer with a legacy BIOS. Therefore, computers running these operating systems must be equipped with more than one physical driver to allow the use of the GPT disk format.

    On Intel Itanium platforms, Windows supports the use of GPT drives as boot drives or data volumes.

    You can convert only empty, unpartitioned disks (raw drives or empty MBR drives) to the GPT format. To convert a volume that contains data, you must first manually delete the partition.
    GPT is part of the EFI specification.

    Extensible Firmware Interface (EFI) describes an interface between the operating system and the platform firmware.

    Unified Extensible Firmware Interface (UEFI) http://www.uefi.org/
    UEFI computers require at least three GPT partitions:
    1. An EFI system partition (ESP) to store the boot applications and other related information (EFI drivers). Windows does not assign a driver letter to the ESP. This partition should not be used for any user or application data files.
    2. A Microsoft reserved (MSR) partition, which must be located between the ESP and the Windows operating system partitions.
    3. A Windows system partition.

    Q22: Physical/Logical sector size 512 bytes or 4096 bytes (8*512 = 4 KB).

    A22: Starting in December 2009, hard disk manufacturers began introducing disks that use 4096-byte sectors rather than the more common 512-byte sectors. Although this change is masked by firmware that breaks the 4096-byte physical sectors into 512-byte logical sectors for the benefit of the operating system, the use of larger physical sectors has implications for disk layout and system performance.

    (e.g. "Advanced Format Technology" from Western Digital)

    The physical medium is organized in 4 KB sectors but the firmware on the drive will present it as if the drive is composed of 512 byte sectors thus making the drive behave as before, so if the driver asks the hard drive to read 64 sectors from LBA 2048, the firmware will translate it and read 8 4 KB sectors from hardware sector 256. As a result, the hard drive now has two sector sizes - the physical one which the physical media is actually organized in, and the logical one which the firmware presents to the outside world.

    Some of the existing BIOSs and/or drivers can't cope with drives which report 4 KB physical sector size. To work around this, some drive models lie that its physical sector size is 512 bytes when the actual configuration is 4 KB without offsetting.

    Therefore, the information about sector size from ATA IDENTIFY DEVICE command returns an incorrect value (e.g. WD, Samsung).

    Q23: Error Page Fault when the program starts.

    A23: If you start the program HDAT2, you can get the following error:

    Page Fault cr2=00400000 at eip=419; flags=3206 Eax=00000300 ebx=00330021 ecx=000000a6 edx=bfeb00bf esi=00000000 edi=00000000 Ebp=00000001 esp=00003ffa cs=87 ds=bf es=b7 fs=0 gs=0 ss=a7 error=0006

    In this case you have to use another DPMI server HDPMI32.EXE.

    If you are using a distribution version from HDAT2 web just type HDAT2x instead of HDAT2. It will load the DPMI server HDPMI32, run HDAT2 and then unload HDPMI32 server from memory.

    If you are using another version or only single EXE file on e.g. USB device, you have to download the HDPMI32.EXE file, copy this file to your boot medium and run these commands:

    hdpmi32 -r
    hdpmi32 -u

    To get help run 'hdpmi32 -?'.

    License: HDPMI is part of the HX DOS extender runtime, which is freeware. It may be used for any purpose.

    Q24: How create DOS bootable USB drive?

    A24: See Create_DOS_USB.pdf