3

I would like to experiment with DOS and would like to create a bootable partition on my hard drive (SDA) SATA device.

I created a 1G FAT32 formatted partition on my SATA hard drive (SDA) and tried to make a FreeDos partition on it. I downloaded the FreeDos CD-ROM. When I boot to the CD-Rom it does not see either of my two SDA or SDB devices :(

I also made a bootable MS DOS 6.21 USB and tried to copy it to the hard drive using the "sys" command. It can see the SATA (SDA) drive but when I attempt to copy the system to it, I get an error "wrong OS version".

All the information I have found says DOS can only boot to HDA1 (IDE). Must it be a IDE device or can it be a (SD) SATA device?

I have copies of MS DOS, FreeDos, RxDos, and MxDos.
Would any of these be able to boot to a SDA device?
Would any of these be able to boot to something other than the first partition?

Another way to ask this question is "How can I make a bootable DOS partition on a SATA (SD) hard drive device" (it's a laptop with no floppy).


update

After formatting to Fat16 as suggested below (thx Spektre), FreeDos recognized my DOS partition and loaded. I am currently trying to configure Grub2 to boot to it and will update once I get it figured out. Grub2 instructions also says it can boot to another drive if it remaps the drive designation using the "map" command.

  • I note you are using the Linux abbreviations (hda, sda). Do you have hardware with a real SCSI controller? Does this SCSI controller have an onboard BIOS? Or are these just SATA harddisks instead of IDE? – dirkt Aug 27 '18 at 12:03
  • How is the SD card being attached to your PC? Does it have an SD card slot, or are you using an SD card to HD adapter device? – Richard Downer Aug 27 '18 at 12:06
  • @dirkt/Richard Downer - I clarified my answer, I see it was a bit confusing... – jwzumwalt Aug 27 '18 at 12:06
  • 3
    FreeDos supports IDE & SATA in legacy mode (use the BIOS to select). Possibly there are drivers for AHCI SATA somewhere, I don't know. If you just want to experiment with DOS, another option is to use dosbox/dosemu, and give it access to a partition and/or file that simulates a partition; then the guest OS will handle AHCI SATA. This should also work with the other DOSses you have. – dirkt Aug 27 '18 at 12:21
  • 1
    FAT32 + MS DOS 6.21 will not work ... you need FAT16 for MS DOS older than 7.0. – Spektre Aug 27 '18 at 15:06
3

All the information I have found says DOS can only boot to HDA1 (IDE). Must it be a IDE device or can it be a (SD) SATA device?

There are two things to consider: whether the computer can boot from a device (which depends on its firmware), and whether DOS can access the device (which depends on “legacy” BIOS support in the shape of interrupt 0x13 services, ignoring the enhanced disk drive services which Windows can use, and the disk layout). On older PCs, DOS worked fine with MFM, RLL, IDE, EIDE, SCSI, SATA etc. drives, as long as the controller included an option ROM to provide the necessary support when the motherboard BIOS didn’t include it.

So the trick is to configure the system’s firmware so that it provides the services DOS needs, and then set the disk up so that the computer can boot from it and DOS can access it.

On modern systems using SATA, a boot environment compatible with DOS requires two specific items in the firmware: “legacy-mode” SATA support, and a Compatibility Support Module. Both of these are starting to disappear; some new PCs can no longer boot DOS on their own (notably, systems certified connected standby don’t include a CSM). On systems with a CSM, you need to go into your firmware setup, select legacy mode SATA support, and enable the CSM if necessary (the option to do this depends on your specific firmware; there might not even be an option, some systems load the CSM automatically if they find an MBR-partitioned disk). Note that changing the SATA mode may have adverse effect on Windows installations, and enabling the CSM will disable Secure Boot.

Then comes the disk format. You’ll need to use MBR-style formatting, not GUID partition tables. If you have an empty disk, the best way to proceed is to boot DOS and let it set the disk up; this will ensure that it uses the disk layout it expects, and writes all the information it needs to the partition table. If you need to repartition, use fdisk under Linux, with the -c=dos option; read the manpage carefully, and instead of creating a DOS partition, move partitions around to leave free space at the start of the disk, then use DOS fdisk to create a DOS partition in the free space.

  • Do you have a source for your "by 2020, no new PC will be able to boot DOS on its own" claim? – Ross Ridge Aug 27 '18 at 15:05
  • The article doesn't really support its conclusions. Intel may be able remove the CSM from the motherboards it makes, but can't force other vendors to do so. The author seems both misinterpreting statement "Intel is planning to deprecate legacy compatibility by 2020" from the UEFI Plugfest slide, and endowing Intel with powers it doesn't have. Deprecating CSM is a long away from Intel somehow forcing its partners to remove CSM. – Ross Ridge Aug 27 '18 at 15:27
  • 3
    @Ross it’s already underway, with help from Microsoft; systems certified for Windows 8 with connected standby are not allowed to include a CSM, and I’ve seen other systems with no CSM. – Stephen Kitt Aug 27 '18 at 15:35
  • 2
    @RossRidge It is inevaitable. Yes, it isbn't centralized and mandatory, but seaking in slowly. Much like ISA faded out. Sure, you can still get new motherboards with ISA, but it's gone almost everywhere but specialy niche vendors - similar CSM will vanish ofer the next years - just not on a fixd date. It doesn't realy make a difference to put the turning point on 2020 or 2022 or so. – Raffzahn Aug 27 '18 at 15:38
  • 1
    @Ross OK, I’ve dropped the 2020 claim. I’ll revisit this in a couple of years’ time if necessary. – Stephen Kitt Aug 27 '18 at 16:08
2

"How can I make a bootable DOS partition on a SATA (SD) hard drive device" (it's a laptop with no floppy).

First of, SDx is just a naming convention under Linux, made to purposefully hide hardware details. It can be as well a USB drive, as it can be some IDE or many other ways of connection. The naming is not related to SATA, but meant originally SCSI-Drive (in contrast to IDE which where called originally HDx).

From an OS perspective, at least as long it's using BIOS routines, SATA looks exactly like any other drive. It only differs when the OSes own drivers take over.

For booting the real connection used is important, and to be defined in your computer's BIOS setup. Here a drive can be selected (or a sequence thereof). It's fine to put up an SATA drive here for booting.

Like in the good old days of floppies, the BIOS will try to read the first sector and start any program found. One speciality is if there's a partition block, then it'll look thru the list of (up to four) primary partitions and try to load from the first one marked bootable.

It gets even more complex, as there is a newer version, called GUID partition table. The later might be something the boot loader of the various DOSes you try does not understand - GUID is only in use since the mid/late 2000s. If your drive goes past 2 TiB, it most certainly has a GUID partitioning scheme.

GUID partitioning do feature a pseudo MBR table for compatibility, which marks the whole drive as used and unavailable. In combination with older OS this might result in not 'seeing' the drive.

To raise chances for older OS to boot, partition the HD either as one drive (like a floppy) or using an MBR. here also just put in a single partition, possibly with less than 32 MiB size, as depending on the age or the DOS used, it may not go well with some of the newer extensions.

Having done so should make it possible to install an old DOS.

Then again, under Linux, it might as well be less work to install a virtual machine, using a disk image from that DOS.

  • 2
    “SATA looks exactly like any other drive” — only in legacy mode; in AHCI mode, SATA drives can’t be accessed using the 0x13 services. – Stephen Kitt Aug 27 '18 at 14:34
  • 2
    “Like in the good old days of floppies, the BIOS will try to read the first sector and start any programm found.” — this is also no longer the case; UEFI boot enforces (and provides) a boot manager. The boot sector is only used by the CSM, and that’s going away. (Without a CSM, DOS can no longer be booted directly; it needs a UEFI-compatible chain-loader.) – Stephen Kitt Aug 27 '18 at 14:40
  • 1
    @StephenKitt My motherboard supports accessing SATA drives in AHCI using INT 13h. It has to since it doesn't support UEFI. I don't have much experience with modern UEFI systems, but it's not necessarily the case that they don't also support this when using the CSM. – Ross Ridge Aug 27 '18 at 15:31
  • 1
    "If your drive goes past 2 GiB, it most certainly has a GUID partitioning scheme." -- I think you mean 2TiB... – Radovan Garabík Aug 27 '18 at 15:44
  • 2
    @Ross can it boot DOS from an AHCI-driven drive? (Put another way, have you verified your first statement, or are you concluding that from your second?) What the BIOS can boot from and what it supports via 0x13 isn’t necessarily identical — even my 15-year-old P4P800, with no UEFI, can boot from more devices than it exposes via 0x13, and those devices are only visible to operating systems with the appropriate device drivers. – Stephen Kitt Aug 27 '18 at 15:52

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.