Welcome to the QA Tech-Tips blog!

Some see things as they are, and ask "Why?"   I dream things that never were, and ask "Why Not".  
Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.  
Old Chinese Proverb

Sunday, July 26, 2009

Large Disk Support?

Originally published on 7/26/2009 as
QA Tech-Tip for July - large disk support?!

While perusing the Ext2 Installable File System (for Windows) web site, (http://www.fs-driver.org/), I ran into an interesting factoid.

This problem rears its ugly head again from time to time – I may have even mentioned this before – but it’s worth mentioning again: Support for "very large" (larger than 128 / 137 gigabytes), ATAPI disks is not necessarily enabled in either Windows 2000 – or XP! – even if you have the latest-and-greatest service packs installed. (http://www.fs-driver.org/troubleshoot.html - go to the bottom of the page)

Note: SATA drives, (serial ATA – the newest drive type), doesn’t have this problem because the way it handles access to the disk is completely different. If you have purchased a new computer within the last two or three years, especially if it’s a laptop/notebook, it probably has SATA drives, and you don’t need to worry about this – unless you plan to add older ATAPI, (also known as EIDE or PATA), drives to the system later on.

Also; Windows Vista, (and later versions of Windows), handle this correctly *if* the hardware supports LBA / LBA-48 properly. Virtually any computer new enough to have a Pentium III or better processor should support LBA / LBA-48. Older computers, given large hard drives, either "hang" (refuse to boot) or display something weird for the drive’s size, which is a dead-giveaway something is terribly wrong.

Linux (usually!) handles this cleanly – even if the original installation was done with "small" (less than 128 / 137 gigabytes), hard drives installed – because it keeps track of the actual, visible, space on the drive.

Earlier versions of Windows, however, do not handle this cleanly at all. To make things worse, Windows does *not* check to see if the drive’s size is a "supported" size, it just reads the ATAPI drive parameter block stored in the drive’s firmware – and reports whatever is returned as if everything is happy.

This causes a problem, as you might well guess.
  • The Windows NTFS file system is designed to support up to four terabytes of drive space per drive. (This has been true since Windows NT.)
  • Windows reads the ATAPI parameter block, gets the reported drive size, and returns it *without checking* to see if the drive is larger than can be used safely.
  • Windows *assumes* (bells should be ringing here!) that any reported drive size less than four TB is readable in its entirety, *without regard* to whether or not ATAPI LBA / LBA-48 support is enabled.
If LBA / LBA 48 support is not enabled, and if the disk is larger than 8 gigabytes (for LBA) or 137 gigabytes (for LBA 48), Windows will attempt to use space beyond the addressable space on the disk and it will "wrap-around" to the beginning of the disk; completely destroying the critical first few sections of the disk containing boot, partition, and MFT data – resulting in a crashed disk that is absolutely un-recoverable. (Ask me how I know it is *absolutely* un-recoverable!)

Checking for and correcting this problem involves editing the registry as described in Microsoft’s Knowledge Base articles KB305098 (for Windows 2000) and KB303013 (for Windows XP).

Viz.:
  • Please begin by updating to Windows 2000 Service Pack 3 (or higher) or Windows XP Service Pack 1 (or higher), if necessary.
  • Start regedit.exe.
  • Go to the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Atapi\Parameters and add, (or modify if it is already present), a registry key value:
    key value: EnableBigLba
    type: DWORD
    value: 1
  • Reboot your computer