The ATA standards have gone a long way toward eliminating incompatibilities and problems with interfacing SATA and PATA drives to systems. The ATA specifications define the signals on the cables and connectors, the functions and timings of these signals, the cable specifications, the supported commands, the features, and so on. The following section lists some of the elements and functions the ATA specifications define.
One of the best features of the ATA interface is the enhanced command set. The ATA command interface was modeled after the WD1003 controller IBM used in the original AT system. All ATA drives must support the original WD command set (eight commands) with no exceptions, which is why ATA drives are so easy to install in systems today. All IBM-compatible systems have built-in ROM BIOS support for the WD1003, so they essentially support ATA as well.
In addition to supporting all the WD1003 commands, the ATA specification added numerous other commands to enhance performance and capabilities. These commands are an optional part of the ATA interface, but several of them are used in most drives available today and are important to the performance and use of ATA drives in general.
Perhaps the most important is the IDENTIFY DEVICE command. This command causes the drive to transmit a 512-byte block of data that provides all details about the drive. Through this command, any program (including the system BIOS) can find out exactly which type of drive is connected, including the drive manufacturer, model number, operating parameters, and even serial number of the drive. Many modern BIOSs use this information to automatically receive and enter the drive’s parameters into Complementary Metal Oxide Semiconductor (CMOS) memory, eliminating the need for the user to enter these parameters manually during system configuration. This arrangement helps prevent mistakes that can later lead to data loss when the user no longer remembers what parameters he used during setup.
The Identify Device data can tell you many things about your drive, including the following:
- Whether the drive has rotating media (and if so, how fast), or whether it is a solid-state drive (SSD) instead
- Whether the TRIM command is supported (or not) on SSDs
- Number of logical block addresses available using LBA mode
- Number of physical cylinders, heads, and sectors available in P-CHS mode
- Number of logical cylinders, heads, and sectors in the current translation L-CHS mode
- Transfer modes (and speeds) supported
- Manufacturer and model number
- Internal firmware revision
- Serial number
- Buffer type/size, indicating sector buffering or caching capabilities
- What security functions are available, and much, much more
Several freely available programs such as HWiNFO (www.hwinfo.com) or CrystalDiskInfo (www.crystalmark.info) can execute this command, then translate and report the information onscreen.
Many other enhanced commands are available, including room for a given drive manufacturer to implement what are called vendor-unique commands. Certain vendors often use these commands for features unique to that vendor. Often, vendor-unique commands control features such as low-level formatting and defect management. This is why low-level format or initialization programs can be so specific to a particular manufacturer’s ATA drives and why many manufacturers make their own LLF programs available.
ATA Security Mode
Support for drive passwords (called ATA Security Mode) was added to the ATA-3 specification in 1995. The proposal adopted in the ATA specification was originally from IBM, which had developed this capability and had already begun incorporating it into ThinkPad systems and IBM 2.5-inch drives. Because it was then incorporated into the official ATA-3 standard (finally published in 1997), most other drive and system manufacturers have also adopted this, especially for laptop systems and 2.5-inch and smaller drives. Note that these passwords are very secure. If you lose or forget them, they usually cannot be recovered, and you will never be able to access the data on the drive.
More recently, ATA security has been augmented by drives that support internal encryption/decryption using the Advanced Encryption Standard (AES). Drives supporting AES automatically encrypt all data that is written and automatically decrypt the data when it is read. When combined with a password set via ATA Security mode commands, the data on the drive will be unrecoverable even if the HDD password is bypassed or the media (that is, platters or flash memory chips) are removed from the drive and read directly. When AES encryption is employed on a drive with a strong HDD password, without knowing the HDD password there is essentially no way to recover the data. This type of security is recommended for laptops that can easily be lost or stolen.
Drive security passwords are set via the BIOS Setup, but not all systems support this feature. Most laptops support drive security, but many desktops do not. If supported, two types of drive passwords can be set, called user and master. The user password locks and unlocks the drive, whereas the master password is used only to unlock. You can set a user password only, or you can set user+master, but you cannot set a master password alone.
When a user password is set (with no master), or when both user+master passwords are set, access to the drive is prevented (even if the drive is moved to a different system), unless the user (or master) password is entered upon system startup.
The master password is designed to be an alternative or backup password for system administrators as a master unlock. With both master and user passwords set, the user is told the user password but not the master password. Subsequently, the user can change the user password as desired; however, a system administrator can still gain access by using the master password.
If a user or user+master password is set, the disk must be unlocked at boot time via a BIOS-generated password prompt. The appearance of the prompt varies from system to system. For example, in ThinkPad systems, an icon consisting of a cylinder with a number above it (indicating the drive number) next to a padlock appears onscreen. If the drive password prompt appears, you must enter it; otherwise, you will be denied access to the drive, and the system will not boot.
As with many security features, a workaround might be possible if you forget your password. In this case, at least one company can either restore the drive to operation (with all the data lost) or restore the drive and the data. That company is Nortek. (See www.nortek.on.ca for more information.) The password-removal procedure is relatively expensive (more than the cost of a new drive in most cases), and you must provide proof of ownership when you send in the drive. As you can see, password restoring is worthwhile only if you absolutely need the data back. Note that even this will not work if the drive employs internal AES encryption. In that case, without the password, the data simply cannot be recovered.
Passwords are not preset on a new drive, but they might be preset if you are buying a used drive or if the people or company you purchased the drive or system from entered them. This is a common ploy when selling drives or systems (especially laptops) on eBay—for example, the seller might set supervisor or drive passwords and hold them until payment is received. Or he might be selling a used (possibly stolen) product “as is,” for which he doesn’t have the passwords, which renders them useless to the purchaser. Be sure that you do not purchase a used laptop or drive unless you are certain that no supervisor or drive passwords are set.
Most systems also support other power-on or supervisor passwords in the BIOS Setup. In most systems, when you set a supervisor password, it automatically sets the drive password to the same value. In most cases, if a supervisor password is set and it matches the drive user or master password, when you enter the supervisor password, the BIOS automatically enters the drive password at the same time. This means that even though a drive password is set, you might not even know it because the drive password is entered automatically at the same time that you enter the supervisor password; therefore, you won’t see a separate prompt for the drive password. However, if the drive is later separated from the system, it will not work on another system or be readable until you enter the correct drive password. Without the services of a company such as Nortek, you can remove a drive password only if you know the password to begin with.
Host Protected Area
Most PCs sold on the market today include some form of automated product recovery or restoration feature that allows a user to easily restore the operating system and other software on the system to the state it was in when the system was new. Originally, this was accomplished via one or more product-recovery discs containing automated scripts that reinstalled all the software that came preinstalled on the system when it was new.
Unfortunately, the discs could be lost or damaged, they were often problematic to use, and including them by default cost manufacturers a lot of money. This prompted PC manufacturers to move the recovery software to a hidden partition of the boot hard drive. However, this does waste some space on the drive—usually several gigabytes. With 60GB or larger drives, this amounts to 5% or less of the total space. Still, even the hidden partition was less than satisfactory because the partition could easily be damaged or overwritten by partitioning software or other utilities, so there was no way to make it secure.
In 1996, Gateway proposed a change to the ATA-4 standard under development that would allow the HPA to be reserved on a drive. This change was ratified, and the HPA feature set was incorporated into the ATA-4 specification that was finally published in 1998. A separate BIOS firmware interface specification called Protected Area Run Time Interface Extension Services (PARTIES) was initiated in 1999 that defined services an operating system could use to access the HPA. The PARTIES standard was completed and published in 2001 as “NCITS 346-2001, Protected Area Run Time Interface Extension Services.”
The HPA works by using the optional ATA SET MAX ADDRESS command to make the drive appear to the system as slightly smaller. Anything from the new max address (the newly reported end of the drive) to the true end of the drive is considered the HPA and is accessible only using PARTIES commands. This is more secure than a hidden partition because any data past the end of the drive simply cannot be seen by a normal application or even a partitioning utility. Still, if you want to remove the HPA, you can use some options in the BIOS Setup or separate commands to reset the max address, thus exposing the HPA. At that point, you can run something such as Parted Magic or Partition Commander to resize the adjacent partition to include the extra space that was formerly hidden and unavailable.
Starting in 2003, some systems using Phoenix BIOS have included recovery software and diagnostics in the HPA. Most if not all current drives support the HPA command set; however, because of the complexity in dealing with the hidden area, I have seen most manufacturers back away from using the HPA and revert to a more standard (and easier to deal with) hidden partition instead.
For more information on the HPA and what might be stored there, see the Chapter 5 section, “Preboot Environment,” p. 287.
ATAPI is a standard designed to provide the commands necessary for devices such as optical drives, removable media drives such as SuperDisk and Zip, and tape drives that plug into an ordinary SATA or PATA (IDE) connector. Although ATAPI optical drives use the hard disk interface, they don’t necessarily look like ordinary hard disks. To the contrary, from a software point of view, they are a completely different kind of animal. They most closely resemble a SCSI device. All modern ATA optical drives support the ATAPI protocols, and generally the terms are synonymous. In other words, an ATAPI optical drive is an ATA optical drive, and vice versa.