Inside the Dell PC Restore Partition

An Exploration by Dan Goodell
Introduction Appendixes: MediaDirect HPA Issues Manual Restore Vista Windows 7 Testimonials Donating DellUtility
Understanding the Dell MediaDirect Partition

Some Dell notebook computers include a special Dell MediaDirect feature. MediaDirect enables you to watch DVD movies, slideshows, or listen to music without having to boot the complete XP operating system. MediaDirect is installed in a special partition on the hard disk, but is hidden so you cannot see it when XP is booted normally. When the computer is off, pressing the MediaDirect button will boot the MediaDirect partition instead of XP.
Note to reader: A complete discussion of MediaDirect is beyond the scope of this document. This is about PC-Restore, and MediaDirect is discussed only to the extent of its impact on the PC-Restore system.

Introduction to the HPA

(Update: The HPA is used only for MediaDirect versions 1 and 2. With MediaDirect 3, Dell has switched to installing MediaDirect in a logical partition instead. The information that follows applies to MediaDirect 1 and 2.)

When Dell preinstalls MediaDirect before shipping a new computer, it is installed in a special part of the hard disk called the "Host-Protected Area" (HPA). The HPA is more deeply hidden than the other "hidden" partitions Dell uses (the DellUtility and the DellRestore partitions). Disk drive manufacturers began incorporating HPA technology around 1999 as part of the industry-wide ATA/ATAPI-4 Standard for hard disk drives. Computer manufacturers can use the HPA for various purposes, and Dell has chosen to use it for the MediaDirect application.

When any computer boots, one of the first tasks the BIOS performs is to survey attached devices and identify any hard disks. The disk controller, which is embedded on the disk drive unit itself, responds with information such as the total capacity of the disk. The BIOS, operating system, and assorted utilities can then use that information to access the disk and its data.

But here's the catch: what if the controller doesn't tell the truth? What if it reports a capacity smaller than the true size of the disk? That's exactly the principle behind the "Host-Protected Area". When HPA is enabled, the true size is kept secret by the disk drive itself. The computer, XP, and most utilities will think the hard disk is smaller than it actually is.

Some disk manufacturers have made available special tools to hide, resize, or unhide a HPA. Few third-party tools, however, have been designed to determine whether a HPA exists.

Although the Dsrfix program is not really a MediaDirect tool, it does reveal whether a HPA exists because it searches out for comparison the sizes of the user-addressable area vs. the native maximum area.

The HPA-Based MediaDirect Partition

As installed by Dell, MediaDirect is placed in a FAT32 partition at the end of the disk and the area is then closed off as a HPA. Figure 1 shows a representative example of a 100 GB disk, which would actually be shown as 93.13 GB after taking into account the binary-vs-decimal issue and the way XP calculates disk size. (Note to reader: the sizes of the partitions are illustrative only. Your partition sizes may vary.)

XP will not be aware of the HPA, and will think this disk is a total of 91.27 GB. When viewed in XP's Disk Management snap-in, the user will only see the area enclosed in red. The two Dell "hidden" partitions appear in Disk Management, but they will not have drive letters and will not appear in "My Computer". The disk's partition table will contain only three entries. The MD volume will not have any entry in the partition table. The only clue that a HPA exists is that the disk size will appear smaller than it should be--that is, assuming you know what the reported disk size should be.
Figure 1:
Factory-installed MediaDirect uses a hidden HPA. Note smaller 'disk size'.
To be MD-aware, the Dell MBR has been expanded to two sectors. The non-MD Dell MBR is designed to either boot the XP partition, or boot the DellRestore partition when Ctrl+F11 is pressed. This MBR is still used in LBA Sector 0. When MediaDirect is installed, additional MD-specific boot code is stored in LBA Sector 3. LBA-3 also contains a secret partition descriptor--the missing descriptor for the MD partition that is not in the real partition table.

When the MediaDirect button is pressed, the extra LBA-3 code instructs the disk controller to expose the HPA, it temporarily swaps the MD partition descriptor into slot #4 of the real partition table, sets that partition active, and proceeds to boot the now active partition. When the computer is powered off or rebooted, the HPA and partition table return to their normal states.
Figure 2:
When MediaDirect is booted, the HPA is exposed.
The HPA-based MediaDirect partition creates special maintenance issues for users. Since utilities are unaware the HPA exists, using Symantec Ghost or Acronis True Image to backup your hard disk will fail to include the MD partition. If you replace your hard disk, cloning/copying utilities will fail to copy the HPA. They will see and copy only the area in red in Figure 1.

The D7-Type MediaDirect Partition

When the user replaces the hard disk, MediaDirect will need to be installed anew because it cannot be copied from the old hard disk. Creating a HPA is not easy and is beyond the scope of what can be expected from the user. Accordingly, when MediaDirect is installed by the user it is not placed in a HPA. Instead, the installation CD places MediaDirect in a regular partition and then hides it ("disguises" is really a better term) by changing the type code in the partition table descriptor to D7. Note the similarity of this approach to the way Dell handles the DellUtility and DellRestore partitions. Unlike a HPA-based MD partition, this "D7-type" MD partition can be seen by utilities such as Partition Magic and XP's "Disk Management" snap-in.
Figure 3:
User-installed MediaDirect does not use the HPA.
This D7-type partition requires yet another new MBR to enable booting MediaDirect. When the MediaDirect button is pressed, this new MBR looks for D7 in the real partition table instead of looking for a HPA. It changes the descriptor from type D7 to 07 (unlike the FAT32 HPA-based MD partition, the D7-type MD partition is NTFS), sets it active, and boots it.

Ghost-10 and MediaDirect

In early 2006 Dell began shipping computers with a trial version of Symantec Ghost 10. When both Ghost 10 and MediaDirect are preinstalled by Dell, the partition layout shown in Figure 4 is used. Since Ghost 10 requires an extra partition for storing backups, the main XP partition is split into two partitions. Although a partition table can contain no more than four descriptors, remember that the HPA-based MD partition does not have a descriptor in the partition table.
Figure 4:
Layout when the factory installs 5 partitions.
As in Figure 2, when the MediaDirect button is pressed, the extra LBA-3 code instructs the disk controller to expose the HPA, it temporarily swaps the MD partition descriptor into slot #4 of the real partition table, sets that partition active, and proceeds to boot the active partition. Note that when the MD partition descriptor is swapped in, the original descriptor in slot #4 is temporarily swapped out. That means the disk space for that partition will temporarily have no descriptor in the partition table, so it would appear to utilities like XP's Disk Management as unallocated disk space.
Figure 5:
5-partition layout when MediaDirect is booted.

How To Repair the MediaDirect MBR

For HPA-based MediaDirect systems, the first sector of the two-part boot record is the same as the regular Dell MBR that is used for booting the DSR partition. That means that although Dsrfix was not specifically designed for MediaDirect, it may help in repairing the MD boot capability. Note that Dsrfix repairs LBA-0 only and does not repair LBA-3. If the MD partition won't boot because the MBR (LBA-0) was overwritten, Dsrfix can restore the ability to boot MediaDirect if LBA-3 is still intact. If the MD partition won't boot because LBA-3 was overwritten, Dsrfix won't fix LBA-3 (but it won't harm anything, either).

Dell has released a MediaDirect Repair Utility. The MBR in HPA-based MD systems can likewise be repaired with that utility.

As noted above, D7-type MediaDirect configurations require a different MBR. Dsrfix is not designed to recognize the D7 type code, so is incompatible with these installations. If Dsrfix is used to repair a D7-type system, it might restore DSR functionality, but it will also disable any ability to boot MD.    Do not use Dsrfix to try and repair a D7-type MediaDirect system!

The Dell MediaDirect Repair Utility will repair the MBR of D7-type MediaDirect systems.

Beware: HPA Problems When Upgrading Hard Disk

Some people will eventually want to upgrade their hard disk to a new disk with larger capacity. Users should be warned about a unique problem that may occur in certain circumstances. If you try to replace your hard disk with a larger disk, if you try to clone the contents of your original disk to the new disk, and if your original disk contains HPA-based MediaDirect, then you may discover your new disk's capacity becomes truncated to the size of the original disk.

For example, say you wish to replace your 60 GB disk with a new 120 GB disk. To avoid reinstalling everything, you decide to use something like Acronis True Image or Symantec Ghost to clone the contents of the 60 GB disk to the 120 GB disk. When you try to boot the new disk, however, it blue-screens or fails to boot, and a check of the BIOS settings shows the BIOS thinks your new disk is around the same size as the old disk! No amount of recloning, reformatting, repartitioning, or rejumpering will get the BIOS to recognize the full size of the disk.

This section describes this phenomenon.

Additional Reading
Back to Top
author: Dan Goodell