Several weeks ago I thought I’d install NetWare 3.12 in a virtual machine using the BusLogic SCSI controller emulation. While configuring a 1.5 GB virtual drive, I thought I should be safe and not run into any trouble with a “too big” disk.
But I was wrong. The NetWare 3.12 installer created the DOS partition and launched the NetWare OS, but trying to create a NetWare partition resulted in the following error:
This error is naturally not specific to virtualization and happens on real systems as well. But why? The geometry of a SCSI disk is entirely fictional, so why is it a problem?
The core problem is that when IBM released the PC/XT in March 1983, the new machine introduced a hard disk BIOS service (INT 13h) which was very tightly modeled on the existing floppy-centric INT 13h service, and used strictly cylinders, heads, and sector numbers to address hard disk sectors. That may have made sense at the time, but in retrospect, it was a terrible mistake.
Even at the time, not all hard disks used cylinder/head/sector (CHS) addressing, although the ones IBM used in the PC/XT did. For example SCSI drives always used LBA (Logical Block Addressing). And on the other end of the stack, MS-DOS also treated every disk (floppy or hard) as a linear sequence of sectors. The low-level DOS disk code performed the translation but DOS itself only worked with LBA.
But IBM did what it did and the damage was done. When PC SCSI host adapters first appeared, they were forced by the BIOS INT 13h interface to make up some kind of CHS geometry. Adaptec (and BusLogic) used a geometry with 64 heads and 32 sectors per track, which fit well within the BIOS limits of 255 heads and 63 sectors per track, and had the pleasant property that one cylinder was exactly one megabyte.
But of course once SCSI disk sizes went past 1 GB (and that did not take long), the BIOS 1024 cylinder limit struck. Adaptec (and BusLogic) chose to use a geometry with 128 heads and 32 sectors per track (2 MB per cylinder) for disks up to 2 GB, and the maximum BIOS geometry (255 heads, 63 sectors per track) for larger disks.
Given that a SCSI disk does not have any inherent “physical” geometry, the CHS geometry presented by a HBA BIOS is made up. However, once it is used with a given disk, it leaves a mark in the disk’s partition tables. And that is a problem because if the geometry used to partition/format the disk does not match the geometry used to access it, there is a high likelihood the disk will not be accessible, and in the worst case, a severe data loss can result.
It is almost certain that the problem with NetWare is that the BusLogic driver (shipped with NetWare 3.12) makes up a CHS geometry different from what the BIOS did. That is, for a 1.5 GB disk, the BIOS by default chooses a X/128/32 geometry, while the NetWare driver uses X/64/32. It may be possible to reconfigure the HBA to use the old X/64/32 geometry, with the caveat that the disk won’t be fully accessible through the BIOS (only the first gigabyte will be).
How to Get Out?
When working with virtual machines, there are two simple solutions. Either use a smaller virtual disk with, say, 900 or 950 MB; then the BIOS and the NetWare BusLogic driver will agree on the geometry. Or set up a separate small-ish IDE disk to hold the DOS boot partition; then DOS/BIOS does not need to access the larger SCSI disk at all and any possible geometry mismatch does not matter.
The most tempting and complete solution, i.e. strangling the person(s) responsible for the mess, is unfortunately no good without the ability to travel back in time to 1982 or 1983.