Compaq EXTDISK.SYS

This is a follow-up to a previous post about the curious driver in Microsoft OS/2 1.21. After initially writing the article, additional information came to light, explaining why the code was there.

EXTDISK.SYS loaded in Compaq DOS 3.31 rev D (1988)

In summer 1988, Compaq released the Deskpro 386/25, the most powerful PC available at the time with a price tag over $10,000. At the time, Compaq did not offer dedicated server systems, but the Deskpro 386/25 was clearly meant to be usable as a file server. To that end, Compaq offered an expansion unit that could house up to two 300MB ESDI drives. The expansion unit was effectively an ESDI expander, attached to a disk controller in the main unit through a custom cable. The Deskpro 386/25 plus expansion unit could utilize two plus two 300MB drives, for a total of 1.2GB of storage (this was mid-1988).

Now comes the interesting part. Because Compaq used Western Digital ESDI controllers that looked like a regular PC/AT disk (or an IDE drive) to the system, Compaq made it possible to have one or two drives in the main unit with a disk controller responding at the 1F0h I/O port range, while the expansion unit responded at the “alternate” 170h address range long supported by PC/AT compatible disk controllers. To software, the ESDI controllers looked the same as old PC/AT controllers for ST-506 drives, and the same as newer IDE drives (which were already used by Compaq in 1988).

The initial support for four drives had two key components. The Compaq SETUP utility stored the drive type of the 3rd/4th drive in CMOS locations 1Bh/1Ch (conveniently right after 19h/1Ah used for the 1st/2nd drive). And for DOS, Compaq supplied a custom driver called EXTDISK.SYS.

The EXTDISK.SYS driver provided the low-level hardware for the secondary controller, and extended the INT 13h disk service to support BIOS drive 82h/83h. At least in the early (that is, late 1980s) Compaq systems, the system BIOS only supported drives 80h/81h and had no support for the secondary controller whatsoever.

Compaq FASTART utility (1988) running on a system with 4 hard disks

Compaq supplied custom FDISK and FORMAT utilities capable of working with EXTDISK.SYS.

Compaq DOS 3.31 FDISK with four hard disks

The secondary controller support in MS OS/2 1.21 is clearly derived from EXTDISK.SYS and likely shared some code. That explains both why the MS OS/2 1.21 disk driver looks the way it does, and why IBM’s disk driver has no such support.

On the DOS side, only Compaq supplied EXTDISK.SYS, and only Compaq users would try to load it. But on the OS/2 side, the EXTDISK.SYS equivalent support was built into the generic disk driver, and everyone got to use it, whether they had a Compaq system or not (because the driver makes no attempt to check that it is running on a Compaq machine).

Just like the MS OS/2 1.21 driver, EXTDISK.SYS is almost a standard driver for a secondary AT style disk controller. A key difference is that it tries to use an interrupt control register at I/O port 1171h in order to determine the IRQ used by the controller. If port 1171h does not respond in an acceptable manner, EXTDISK.SYS defaults to using IRQ 14 for the secondary controller (which is the same IRQ used by the primary controller).

It is apparent that in 1988, there was no true default IRQ for the secondary controller. The choices Compaq offered were IRQ 11, 12, 14, or 15. The IRQ was software configurable, but a DIP switch on the disk controller was used to set the default IRQ. Compaq defaulted to IRQ 14, but as early as 1989, Novell’s NetWare 3.0 disk driver defaulted to IRQ 15 for the secondary controller.

Compaq clearly kept this interrupt configuration scheme in later systems. It was supported by the Compaq Portable 386. It was also supported by the EISA based Compaq IDA controller used in the Systempro. And it was used by many newer Compaq systems.

Why EXTDISK.SYS Was Needed

Some of the details of Compaq’s EXTDISK.SYS implementation are far less than obvious, especially how it interacts with the system BIOS and DOS.

As mentioned above, the Deskpro 386/25 system BIOS has no real support for more than two disks (on the primary AT style controller). The only “support” the BIOS has is storing the drive type for 3rd and 4rd hard disk in CMOS locations 1Bh/1Ch. The system BIOS will never report that more than two drives are present through INT 13h.

This fact seemed rather strange until I tried booting DOS versions older than 5.0 on a system (well, in a VM) with four drives supported by the system BIOS. And as it turns out, DOS (including Compaq’s own DOS 3.31) just hangs early during boot because up to and including DOS 4.01, IBMBIO.COM/IO.SYS only handled up to two hard disks! Unfortunately the code in DOS assumes that the INT 13h service will never report more than two drives… and if it does, bad things happen. While that may seem outrageous, even at the time when DOS 4.0 was released, there simply were no PCs with BIOS support for more than two drives! Compaq was the first in 1988.

In light of that fact, even if Compaq could fix their own OEM DOS version that came with the Deskpro 386/25, it makes sense that they did not want to prevent customers from booting all previous DOS versions. Hence the system BIOS only reported at most two drives through INT 13h/08h.

When EXTDISK.SYS was loaded, it extended INT 13h to support drives 82h and 83h and dynamically added the requisite drive letters to DOS. When called with INT 13h/08h for drive 82h, EXTDISK.SYS reported how many drives were attached to the secondary controller.

Some newer Compaq systems fully supported additional hard disks in the BIOS, but did not report them by default (keeping the original behavior of the Deskpro 386/25). INT 15h/E4h had to be used to change the BIOS behavior. IO.SYS in MS-DOS 5.0 and later calls this service on Compaq systems before it enumerates hard disks.

NetWare

For NetWare 2.x, Compaq offered a custom disk drivers called CPQDSK and NVCPQDSK; these were almost identical except the latter didn’t perform a read to verify each write.

NetWare 386 (1989) came with ISADISK.DSK driver that already had built-in support for Compaq’s secondary controller. By default, Novell used the familiar 170h I/O base and IRQ 15.

NetWare 386 (1989) running with four AT compatible hard disks

Unlike EXTDISK.SYS, Novell’s driver made no attempt to access port 1171h and obtain the IRQ setting that way; it was simply up to the server administrator to configure the IRQ correctly. However, Novell’s ISADISK.DSK did rely on CMOS locations 1Bh/1Ch to obtain drive geometry, and therefore generally could not work in non-Compaq systems.

Later Novell disk drivers supported other methods of obtaining drive geometry. In NetWare 3.11 (1991), ISADISK.DSK could read special NetWare Ready or CCM (Common Configuration Method) sectors from the disk and acquire drive geometry that way. The alternative IDE.DSK driver could use the IDENTIFY DRIVE command and query the drive itself. These methods did not require any system BIOS support at all and could be used with not just two but up to four disk controllers (or IDE channels), which (apart from the primary controller) did not have to be known to the system BIOS at all.

Conclusion

Based on research of extant Compaq and Novell documentation, it is fairly certain that in 1988, Compaq established the use of a secondary AT style disk controller to support additional two hard disks (for a total of up to four). At the time, Compaq used ESDI drives for the secondary controller but the scheme worked with IDE drives just as well.

Prior to version 5.0, DOS was completely unable to support more than two hard disks (note: hard disks, not partitions), and could in fact hang early during boot up when the system BIOS presented “too many” drives.

In 1991, Novell extended the AT style storage support with additional two controllers, for a total of four disk controllers and up to eight drives. At that time, these would have typically been IDE drives.

This entry was posted in Bugs, Compaq, DOS, PC history, Storage. Bookmark the permalink.

18 Responses to Compaq EXTDISK.SYS

  1. MiaM says:

    Interesting!

    Were there ever any patches released for earlier DOS versions?

    I assume that not that many would had attempted to use a DOS version lower than 5.0 in a vintage computing situation on a computer that can easily use multiple 16-bit IDE/ATA interfaces, since that would most likely be at least a 286 and unless it happens to only have max 640k you’d probably want DOS 5 to be able to use DOS=HIGH.

    Also given that DOS 4 has a bad reputation and except for the Compaq branded 3.31 any DOS older than that only supports 30M partition sizes, which few if any would likely want if they for some reason have more than two hard disks on a vintage computer.

    Bonus: How well was this understood/documented at the time? Could it even had been the case that the max two disks issue was a reason for it generally being a bit difficult to configure a random bought-used SCSI controller to cooperate with an MFM controller back in the days?

    Also, since any SCSI controller can have 7 disks, did they only present the first or first two disks via INT 13h and have the user load a driver for the additional disks?

    Relevant side track: Did this also affect early network booting? Or did all those early net boot solutions emulate floppy images as boot disks?

    Irrelevant side track: Were there ever any netboot solutions for DOS systems that would somehow load IO.SYS and MSDOS.SYS over the network and then insert a driver that hooks on the INT21h file I/O API and thus be able to boot DOS without ever actually using INT13h (the raw sector BIOS API)?

  2. SweetLow says:

    >In 1991, Novell extended the AT style storage support with additional two controllers, for a total of four disk controllers and up to eight drives.

    Microsoft in Windows 95 (and above) supports only two standard controllers (Primary and Secondary, of course) explicitly. And the most interesting is the fact that ESDI_506.PDR is responsible for noting IOS about using of these controllers (by filling the system wide IOS IDA_esdi_p_in_use and IDA_esdi_s_in_use), but specifically IOS is protecting according ATA registers ports from Ring-3 applications AFAIK.

  3. Fernando says:

    MiaM
    You have to understand the times.
    At this time this configuration was very, very expensive, if a company would pay for this it would be put in a server so many people could access it, NetWare or OS/2.
    At the time there were a very big gap between PC’s and “Workstations” if you need more than 2 disks, they would tell you to buy a Sun or RS/6000, or something like that or in the case of PC’s use NetWare, OS/2, or some kind of UNIX. (In the company were I worked for the first time with Unix they saw PC’s like toys, even didn’t respect SCO OpenServer/Xenix even when they worked with this everyday).
    If you have a PC with DOS it was much more frequent to see a SyQuest or a Bernoulli Drive, at the time was normal to have removable drives (like floppy’s) and have different disks with your different files.
    You wrote: “I assume that not that many would had attempted to use a DOS version lower than 5.0 in a vintage computing situation”, the minimum standard probably would be DOS 3.3, almost all you software will work with that, so depends what will you do, You want to run one of the last games of DOS, you probably want every byte available of that 640K memory. If you want to run dBase 3 or Windows 3.0, you could run DOS 3.3 no problem.
    Also in time the problem in DOS was not having more than 2 hard disks, the problem was hard disks bigger than what DOS supported and that was resolved with multiple partitions via DOS or some kind of driver like Disk Manager.

  4. Josh Rodd says:

    I configured a PS/2 Model 80 with PS/2 SCSI Adapter in 86Box (pre-1990 BIOS).

    Works fine with 2 drives in PC DOS 3.30. If you configure 3 drives, PC DOS 3.30 doesn’t see any drives at all. Works fine in “DOS 7.00” (Windows 95 boot disk).

    If you configure an ESDI adapter and 2 disks on the SCSI adapter, well, PC DOS 3.30 can’t handle that either.

    Configuring ASPI4B.SYS plus ASPIDISK.SYS did work. I guess this does something similar to what EXTDISK.SYS does.

    However, PC DOS 3.30 would still boot – it didn’t crash; it just couldn’t see the drives.

    I wasn’t able to get two ESDI adapters to work at all, despite the @ADF file having an option for “Alternate” I/O addresses; I wanted to see what the BIOS and DOS would do with it set up for at least 3 drives. However, this looks like it might be an 86Box quirk. (I don’t have two ESDI adapters to test on real hardware in any case.)

    Does anyone know if the IBM ESDI adapters (which were released at the same time the PS/2 was, around 1987) had BIOS that worked with two adapters or not?

  5. MiaM says:

    @Fernando:
    A use case that I think is forgotten is hobbyists using “junk” at the time even an 8088 PC still had a decent value, but there would be a market where old MFM disks at about 20M were way way more affordable than any newer/larger disks, and thus a hobbyist might had wanted to use four 20M disk. Thinking about it, a standard IBM AT case could fit four 5.25″ half height disks like ST-225 or similar. (Don’t know about mounting holes for two half height drives in the AT case).

    For vintage computing a possible but perhaps not that likely use case would be to have multiple disks for multiple OS:es, in order to avoid the 528M limit (and whatever the next limit was, 8G?).

    @Josh:
    Thanks for testing that!

    I haven’t had a look at the source code for 86box, but Captain Obvious tells that it’s likely not that hard to read the source code to tell how 86box does if you tell it to have two ESDI adapters, even though it might not always be as easy to change the code.

    (In general in my small experience it tends to be a struggle to compile open source projects if it uses a lot of libraries as you might not have exactly the same version that the devs use, and/or your distribution (if on Linux) might put things in different places and whatnot. For testing purposes it might be possible to disable certain features, like for example testing out minor changes might not need working sound or whatnot).

  6. Josh Rodd says:

    86Box’s implementation of the ESDI adapter doesn’t cope with multiple cards, but it does have an implementation of a DBA-ESDI “adapter” and with a bit of fiddling I could probably get both to work… and then try to stuff 3 drives in and see what the BIOS does.

    86Box can easily implement hardware and the BIOS is just the real BIOS, bugs and all. (The 86Box PS/2 ESDI implementation is basically the same code as the MFM and ATA implementations, i.e., ST-506, except with the weird DMA stuff added on.)

  7. Richard Wells says:

    AT clone cases made it easy to have 4 half height hard drives. The right panel had 3 half height drives bays open to the outside. The internal bay could take 2 half height drives. Okay, the expectation was 2 floppy drives, a tape drive, and two hard drives but that didn’t have to be the case.

    There were also external parallel port hard drives and lots of other ways to shoehorn extra drives. I think my 486 Win 3 machine had 4 SCSI hard drives at its peak and still had no problem booting. Some of the drivers were not from MS.

  8. MiaM says:

    Side track:
    Could the classic IBM AT WD MFM hard disk controller be used with a separate floppy card, or was it necessary to use the floppy controller on the MFM hard disk controller?

    If it was possible to use a separate floppy card, then you could even use the IBM expansion box for 8-bit ISA cards with a floppy controller and floppy drives in that box, together with an AT class computer. Would look a bit weird.

    More reasonable if you run out of physical space for drives would be to use an adapter between 34-pin IDC and DC-37 (37-pin D-sub) and house the floppy drives in an external enclosure. (Since you can have a decently long cable for floppies you could even use this as a way to get rid of some of the noise from fans and hard drives).

    @Richard: Were any of those parallel port drives bootable? I.E. were there ever any type of adapter bios that you could install? I assume that in particular for parallel port drives this wasn’t the case (otherwise the reason for using the parallel port rather than a dedicated port is kind of moot)

  9. Yuhong Bao says:

    I wonder how they managed to support more than 1024 cylinders in the Compaq BIOS.

  10. Josh Rodd says:

    @MiaM, The PC diskette adapter uses DMA 2, IRQ 6, I/o 3F0h, and supported 4 drives via the Drive Select mechanism. Most contemporary diskette drives allowed setting DS0 through DS3 via jumpers, but IBM decided to ship with a two-position cable with a twist in it so that all drives needed to be set as DS1.

    The AT’s diskette adapter was similar, except it was “neutered” and could only support 2 drives; I am not clear on the mechanism of how or why this happened. (Were the bit fields in the I/O ports used for something else?) It did have the ability to choose a different address range (370h), but whatever driver wanted to do this would have to contend with still sharing the same IRQ and DMA lines. The AT BIOS certainly doesn’t do this. I recall some SCSI card that had a floppy controller that did support a secondary floppy controller, although I have no idea why they did this.

    Parallel-port “backpack” or whatever type of drives weren’t bootable – the BIOS doesn’t know anything about them.

    @Wells, yes, the AT certainly had room for more drives… contemporary drives would have quickly run out of power, though. An ST-225 needs 26.4W on the +12V rail on spin up, and the motherboard already drew about 30W… so that right there limits you to two drives. Full-height drives drew even more power on spinup.

    Machines designed to have lots of drives tended to have a staggered setup so that they wouldn’t spin up all at the same time.

    Realistically, someone who was spending tens of thousands of dollars on drives when the PC/AT was released wouldn’t have been using a PC… a few years later, someone doing that would have been using SCSI and an external enclosure designed for it.

  11. Richard Wells says:

    @Miam: A second floppy controller could be added to the AT. That was rather the default for the Compaticard. I don’t see any method to disable the fixed disk controller’s floppy controller so a secondary controller probably won’t be bootable.

    For parallel port drives, most were not bootable. I believe there was some form of ROM boot for some of the models aimed at the laptop market. If the laptop lacks an internal floppy drive but still uses the external hard drive, the driver has to go somewhere. Not something I had used.

  12. MiaM says:

    @Josh:
    The weird thing is that the bios on any 286 or higher only supports two drives even if you use a PC/XT controller. Not that this makes that much sense, but for anyone who only had a 360k drive and wanted to use a hard disk controller without a built in floppy controller it would be meaningful to use an old PC/XT floppy controller if that’s what they had at hand / could buy at a good price.

    Re having multiple drives: I’m thinking about hobbyists in the late 80’s or so, who collected whatever they could find.

  13. Josh Rodd says:

    Yeah, the PC/AT’s diskette adapter didn’t support more than 2 drives. Hardly anybody really ever had more than 2 drives and 1 drive became the norm for PC/ATs, which almost all shipped with hard drives. (I’ve never been able to find one of the 5160-068s in the “wild”, the one that came with 256k of memory and no hard drive.)

    All PC/ATs came with the same fixed disk and diskette adapter. There was no reason to be stuffing peripherals from an XT in what was a $5,700 machine. Even hobbyists rarely saw a reason for more than 2 drives. It just didn’t make much sense.

    The early configuration you would have seen was a 1.2MB drive with a 360k drive in order to write disks readable by an XT or PC… that need evaporated pretty quickly, and in the latter years of the AT you’d see a 1.44M drive paired with a 1.2 in order to interchange data with a PS/2. People who were interchanging a lot of data would be more likely to invest in a networking setup. (Diskettes were unbelievably slow and prone to failures.)

    4-drive support on the original PC is one of those things like the cassette port or composite monitor output that was engineered into it, but hardly ever used.

  14. MiaM says:

    @Josh:
    Again, thinking about hobbyists later on. My first 286 mainbboard cost $60, and in particular I had an RLL hard disk controller without a floppy controller. Sure, later on I used a multi I/O card for everything except IDE, but at some point in time I likely used a floppy controller form an XT.

    I never used 1.2M drives. 360k was useful to interchange disks with other PC:s and then I stated using 3.5″ disks directly.

    I’ve at least seen people have three drives, 360k, 1.2M and 1.44M, to be compatible with all types. Probably uncommon but would had been a thing.

    Also: Even for someone having an original IBM AT at the time they were somewhat expensive, say in the late 80’s, you might had wanted to upgrade to another hard disk controller and sell off the one you had (with or without your disks), and might had ended up needing a separate floppy controller card.

    When the computers entered the second hand market among hobbyists, parts were trader between owners and some computers ended up with configurations you’d never been able to buy new from IBM or others, but that would had made sense for the then current owner.

    As a side track: It’s interesting how different parts of the computer industry either accommodated, ignored or even worked against second or rather third hand owners who were “tinkerers”. I’d say that Microsoft and IBM ended up in the “ignore” group while Apple with the Mac models that on purpose were as hard to possible to expand ended up in the “worked against” group, while Apple at the same time with the Apple II ended up in the “accommodated” group.

  15. Josh Rodd says:

    The PC/AT’s power supply simply couldn’t support more than 3 drives, so IBM didn’t support more than 3 drives. RLL controllers weren’t common at that point in time; drives were MFM, and stayed that way until the late 80s when ESDI and then SCSI were the higher-end options. (MFM stayed pretty entrenched on the low end.)

    1.2M drives seemed like a great thing at the time – faster, and a lot more space than DD drives. Now you only need 17 diskettes to back up your new PC/AT, as opposed to the pile of 28 diskettes to back up an XT.

    Nobody would have been buying or selling the fixed disk and diskette adapter from an AT. Every AT came with one, and nobody wanted two of them. I can’t really imagine many people needing to “upgrade” from one unless they were going to move up to something majorly more expensive like SCSI or ESDI… and then they’d still want it to attach their diskette drive(s).

    “Tinkerers” who want to fiddle with second-hand stuff aren’t going to drive the marketplace.

    Incidentally, on the PS/2, IBM went back to accomodating lots of diskette drives – if that’s what you really wanted, with the 5.25″ diskette drive option. You could have both an internal drive (on the mod 60/65/80) and an external drive.

  16. Richard Wells says:

    I read in Mar 25, 1986 PC Magazine page 191 that FDISK marked the boot partition in some way that only a single drive was installed. Therefore, a second hard drive that was added could not be seen by FDISK and never partitioned or formatted to be turned into D drive. The recommendation was to cable the new drive as C and FDISK and format it while the older drive was installed as D. It would seem to hamper the chances of scrounging up old drives to fill drive bays.

    Can anyone confirm that? I tried checking for it but I couldn’t find anything.

    Two hard drives and two floppy drives was a common enough install on a 5170. Seagate rates several of the ST-412 drives as needing a peak startup power of 55 watts. Two of them would be no problem with the 192 watt power supply IBM used, especially since IBM used good quality supplies that could be pushed further than others with similar ratings.

  17. MiaM says:

    @Josh:
    All parts of a PC, although clones and not IBM branded, have been sold since more or less forever, and thus there would also had been a marked for used parts. I.E. tinkerers/hobbyists didn’t drive the market for brand new IBM branded hardware, but it drove parts of the market both for clone parts and used IBM branded parts.

    IIRC I paid the equivalent of 20 EUR for a used IBM AT MFM+floppy controller in the early 1990’s for my then 286 PC. I think I paid something similar for my 20M “type 13” (IIRC) full height hard disk.

    Re power supply: I haven’t had a look at the specs, but if the PSU would handle two full height hard disks then it seems reasonable for it to be able to handle four half height drives.

    For someone who had a “fancy” PC in the late 80’s or early 90’s it might seem weird that people tinkered with older lower spec PC parts, but we have to remember that before Windows 3 really took off there weren’t much reason to have anything better than an 8088 with say a 10-20M hard disk unless you ran some special programs that really needed processor performance, like CAD, certain calculations and whatnot. Either a hobbyist tinkering with Turbo Pascal or whatnot, or in a business setting someone doing book keeping, word processing and whatnot, would be fine using an 8088.

  18. Bits Passats says:

    Unrelated to this article

    I assume you don’t check comments on older articles, and you have no way of communication other than comments.

    There’s some errors in your ISA bus origins article that must be addressed.

    Please contact me for the details

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.