7

My CMOS setup correctly recognizes the geometry of the drive, (but does not support LBA). And FDISK in DOS 6.22 only recognizes 504MB. FDISK even shows the size of the primary partition as roughly 1GB out of a possible 504MB.

My problem is that while DIR shows ~500MB used and ~500MB free, it gives "Sector not found" and other errors when trying to write basically anything more (since I seem to have reached the end of the readable 504MB.

Is it possible to use a hard drive with more than 1024 cylinders when using a BIOS that doesn't support LBA?

Would an IDE controller card be able to bypass this limit?

10
  • This question explains the limitations, but your situation is surprising — if the setup recognises the drive, I would expect DOS to be OK up to 8GB. What geometry does the BIOS setup report? Jan 18, 2019 at 22:18
  • @StephenKitt That's a little weird. I've just replaced it with a 2GB drive, so it shows a CHS of 3898/16/63, but it has a "Custom Drive Information" which allows you to type in values, but you can't type in values greater than 2099. Even weirder, it starts with the auto value, and lets me change it by 1 at a time, so I can choose high byte values between 20 and the detected 38 if I decrement by 1. I can't go back up. Jan 18, 2019 at 22:29
  • 1
    It is a common misconception that whether or not LBA is enabled determines the maximum size of hard drive. It's actually BIOS translation that allows passing the 528MB limit. Any BIOS that supports LBA also supports translation, which leads to this confusion. LBA in the BIOS setup only relates to the BIOS to hard drive access method. DOS accesses the hard drive using INT 13h through the BIOS whether or not LBA is used to talk to the hard drive. Apr 5 at 17:37
  • @AlexCannon: I found a VM bios that does LBA but not translation. I'm slightly annoyed.
    – Joshua
    Apr 12 at 19:50

2 Answers 2

13

It can be done using a third-party "disk manager", such as OnTrack Disk Manager and EZ-Drive. At the end of the DOS era, these came bundled with many hard disks.

https://en.wikipedia.org/wiki/Logical_block_addressing#Enhanced_BIOS

Some downloads. Kroll OnTrack have allowed this to be shared freely! https://www.philscomputerlab.com/ontrack-disk-manager.html

Info: https://en.wikipedia.org/wiki/Disk_Manager

An alternative is to use IBM PC DOS 7.1 instead. This is the last ever member of the MS-DOS family. It includes native built-in FAT32 and LBA drive support. IBM made it available as a free download -- I describe this here: https://liam-on-linux.livejournal.com/59703.html

You will need to supply the rest of PC DOS 7.01 (also known as PC DOS 2000) to make a complete OS, but that is widely available; for example it came free with Microsoft VirtualPC, which itself is a free download now.

5
  • It appears FreeDOS also supports LBA and FAT32. Can it be used similar to PC DOS 7.1? May 24, 2021 at 11:13
  • I have not got much experience with FreeDOS -- I prefer the "real thing" -- but in theory, yes. May 25, 2021 at 22:33
  • I think you are mistaken regarding the bit about PC DOS 7.1 and LBA support. Confusing LBA (an IDE hard drive access method) with BIOS int 13h, BIOS int 13h with translating CHS geometry, and extended 64-bit BIOS int 13h is a common confusion. The BIOS in question supports only legacy int 13h with no translation support, creating the 528MB limit. DOS access hard drives through the BIOS and does not support drivers for disk access. The way to fix this is with a software patch like you mentioned that hijacks int 13h to simulate an updated BIOS for DOS. Apr 4 at 2:20
  • @AlexCannon If you do not believe me, then here are the author's list of changes: sites.google.com/site/pcdosretro/doshist Note especially the following: « PC DOS 7.1 (1999) greater than 2GB hard disk support (LBA and FAT32: partition types 0Bh, 0Ch, 0Eh, 0Fh) BPB and DPB extended for FAT32 » Apr 9 at 16:15
  • @Liam Proven That's referring to FAT32 filesystem support, and the W95 FAT32 (LBA) partition type 0xc. The LBA partition types hide the partition from older versions of DOS that don't support BIOS extended INT 13h, and instruct newer DOS versions to use extended INT 13h, the BIOS LBA 64-bit linear addressing method, when accessing the disk. No version of DOS supports going around the BIOS to access storage devices. The BIOS in question has a 528MB limit. Apr 10 at 15:40
17

MS-DOS 6.22 only uses CHS (cylinder/head/sector) addressing to access disks, so it doesn't really matter if the BIOS supports LBA addressing. The CHS BIOS access method is also known as INT 13h, not to be confused with extended INT 13h which uses 64-bit addressing. The CHS BIOS interfaces MS-DOS uses for disk access supports drives up to just under 8 GiB, so this also about the limit for MS-DOS. (A bug in MS-DOS means that it crashes if a drive has 256 heads, so its limit is a bit smaller than the BIOS limit but still almost 8GB.)

The limit you've encountered is due to the intersection of the BIOS and IDE limits on CHS addressing being much less than either individually. The BIOS supports addressing up to 1024 cylinders, 256 heads and 63 sectors, while IDE supports up to 65536 cylinders, 16 heads and 255 sectors. Taking the minima of these three pairs (1024 × 16 × 63) gives you the 504 MiB limit.

To get around the 504 MiB limit many BIOSes supported CHS translation, where they converted BIOS CHS addresses to IDE CHS addresses using some sort of transformation. Apparently though your BIOS doesn't support this, otherwise the drive probably would've worked. You should check to see if your BIOS has some sort of "large" drive support you can enable.

If you're not booting off the hard drive then I think there were drivers for MS-DOS that performed CHS translation. According an old Microsoft KB article (KB126855) I found "SpeedStor from Storage Dimensions, EZ-Drive from Micro House, and Disk Manager from OnTrack Computer Systems" are possibilities. An IDE controller won't work unless it has its own boot ROM, one that can perform CHS translation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.