80

Rufus allows for the creation of a bootable MS-DOS flash drive. It does this out of the box as an option without needing to specify an image or ISO.

Rufus main interface

However, documentation on the tool is virtually non-existent as it is, and I can't find anything that specifies what version of DOS the program uses for this purpose. Does anyone know?

Braiam
  • 4,709
  • 3
  • 26
  • 57
Hashim Aziz
  • 11,898
  • 35
  • 98
  • 166
  • 2
    Out of curiosity, why do you need to know that? – Ooker Jul 09 '17 at 17:49
  • 5
    @Ooker - A mixture of curiosity and the reasons given in my comment on the accepted answer. I mainly needed to be sure that it wasn't already DOS 6.22 and that I wasn't therefore wasting my time finding out how to create a bootable USB from 6.22. – Hashim Aziz Jul 09 '17 at 17:50
  • 3
    Nearly every body else who does not get in license conflicts uses FreeDOS for those kind of boot disks. – eckes Jul 09 '17 at 19:07

3 Answers3

206

Rufus developer here.

As correctly pointed by @magicandre1981 the version of MS-DOS provided by Rufus is the MS-DOS from Windows Millenium Edition, "uncrippled" to enable boot (I didn't invent this patch, but picked it up from the HP USB and other tools).

Also, and this is the important part, Rufus does NOT embed the MS-DOS files within the application, but picks them up from the Windows system it is running from, because, since the MS-DOS binaries are proprietary and copyrighted by Microsoft, it is illegal for anybody else but Microsoft to distribute MS-DOS binaries, be it in a zip file or an application (as a matter of fact, it appears that HP got into legal problems with Microsoft when they tried to produce a version of their HPUSBFW utility that embedded the Windows 98 MS-DOS files, and Microsoft quickly got them to stop doing that).

So, up to Windows 10, we relied on the fact that the MS-DOS files (from Windows ME) were included in the DLL (diskcopy.dll) that Windows uses to create DOS bootable floppy disks (which actually contains a complete bootable floppy FAT image), and picked the files from there, which we can legally do.

However, with the introduction of Windows 10, Microsoft dropped the ability to create bootable floppies (since nobody using Windows 10 is expected to boot from floppy) and removed diskcopy.dll. This means that we don't have a legal way to create MS-DOS bootable USB flash drives any more, and the end result is that:

  • If you use Rufus on Windows XP to Windows 8.1: you have the ability to create bootable USBs with either FreeDOS or MS-DOS (WinME edition).
  • If you use Rufus on Windows 10 or later: you have the ability to create bootable USBs with FreeDOS only.

In practice, I have yet to encounter a tangible report from someone indicating that FreeDOS does not work where MS-DOS does, which is why I don't consider the loss of MS-DOS support in Windows 10 a big loss. Plus, as opposed to using MS-DOS, which is closed source and which Microsoft has stopped supporting a long time ago, FreeDOS is Open Source and actively supported, so you're usually much better off using FreeDOS.

isanae
  • 145
  • 2
  • 9
Akeo
  • 6,461
  • 4
  • 29
  • 32
  • 7
    It would be good to explicitly mention that this version of DOS from Windows ME is stamped as MS-DOS 8.0. Those from Windows 95a and 95OSR/98/98SE were respectively MS-DOS 7.0 and 7.1. A few people will refer to an MS-DOS 7.11, but I'm not sure what if anything it added to 7.1 – underscore_d Jul 10 '17 at 14:19
  • 3
    MS-DOS 7.10 adds FAT32 support, @underscore_d. That's the big difference between 7.10 and 7.00. Note, also, that there's no such thing as "DOS 7.1". MS's version numbers are always X.YY. The copies of DOS 7.1 circulating out on the web are something that some individual put together, taking a copy of the DOS version supplied with 95OSR2/98/98SE and hacking the COMMAND.COM with a text editor to make it report version 7.1. And, of course, just for completeness, DOS 8.00 is the one shipped with WinME that removed real-mode support so DOS boots into protected mode, with HIMEM integrated. – Cody Gray - on strike Jul 12 '17 at 15:24
  • @CodyGray Well, of course by 7.1, I meant 7.10; I wasn't specifically thinking of any third-party release that labelled itself without the trailing 0. Thanks for the extra details! – underscore_d Jul 12 '17 at 15:26
  • @CodyGray - Regarding FAT32 support, does this mean that versions of MS-DOS before 7.10 won't run on a FAT32-formatted bootable USB? Or does FAT32 support only apply to the harddrives and peripherals recognised once within the operating system? – Hashim Aziz Jul 12 '17 at 16:23
  • 1
    @Hashim I am quite confident you cannot directly boot versions of DOS prior to 7.10 on a FAT32 drive. Tools like UnetBootIn use boot loaders to load a floppy image (FAT12) and boot from that. – trlkly Jul 12 '17 at 17:39
  • 2
    Correct. No FAT32 boot partition prior to MS-DOS 7.10. Or *any* FAT32 partition, for that matter! You also won't be able to access large hard disks, as these older versions of DOS don't know anything about LBA ([logical block addressing](https://en.wikipedia.org/wiki/Logical_block_addressing)) and they use old ROM BIOS interrupt calls for disk I/O, instead of the newer "INT 13h Extensions". Other trivia: you need MS-DOS 4.00 (officially, 3.3 unofficially with certain limitations) to support FAT16 (previously, only FAT12 was supported). @Hashim – Cody Gray - on strike Jul 12 '17 at 18:41
  • 1
    FreeDOS does have FAT32 support, though, and it can run all the way back on an 8086, I believe. So that's pretty cool, and goes to Akeo's point in the last paragraph. I'm not an expert on DOS compatibility, though, so I can't speak to that hanging question, either. I don't personally use FreeDOS, since I only run DOS on my vintage machines, and I like to keep those authentic. – Cody Gray - on strike Jul 12 '17 at 18:43
  • So I should only be able to run MS-DOS 6.22 on a FAT16 USB? That's odd. In the last few days, I moved on from using single boot bootable media creators like Rufus to using multiboot ones like WinSetupFromUSB and YUMI, and I managed to get the same ISO of DOS 6.22 running on both fine. The only thing I've been having trouble with as far as DOS compatibility is concerned is that, unlike with creating a bootable for a single OS, copying the DOS utilities to the root folder isn't enough to allow DOS to find them when booted, and I'm not really sure where they go. DOS itself seems to runs fine tho. – Hashim Aziz Jul 12 '17 at 18:54
  • Should have added that both programs formatted the USB as FAT32. – Hashim Aziz Jul 12 '17 at 18:55
  • 1
    As I said earlier, those tools use a bootloader to load a floppy image file from the disk. (Bootable CDs have a floppy image in them.) The bootloader can read FAT32, but DOS can't. To boot DOS, the bootloader loads the floppy disk image into memory and treats it like a floppy drive, then boots from the disk image. DOS can't read the FAT32 disk, but it can read the virtual floppy. @Hashim – trlkly Jul 13 '17 at 17:20
39

He extracts the version from the Windows file diskcopy.dll

/* Extract the MS-DOS files contained in the FAT12 1.4MB floppy
   image included as resource "BINFILE" in diskcopy.dll */
static BOOL ExtractMSDOS(const char* path)

looking at other comments in dos.c that are the DOS files from WinME (DOS 8.0), he does the same patching as shown here:

* COMMAND.COM and IO.SYS from diskcopy.dll are from the WinME crippled version  
* that removed real mode DOS => they must be patched:  
* IO.SYS            000003AA          75 -> EB 
* COMMAND.COM       00006510          75 -> EB 
nc4pk
  • 9,037
  • 14
  • 59
  • 71
magicandre1981
  • 97,301
  • 30
  • 179
  • 245
  • Haha, beaten to it by 20 seconds. +1 on the detective work, looking into the source code didn't even occur to me. I've had a look at the Wikipedia page on real mode, but I'm still a little unclear. In practical terms, what does real mode do, and does this patch restore all of its functionality? – Hashim Aziz Jul 09 '17 at 06:09
  • Just for some interesting background, I've also come across an issue where the/a developer talks about this: https://github.com/pbatard/rufus/issues/545 – Hashim Aziz Jul 09 '17 at 06:15
  • 11
    real mode is a mode in [x86 cpus](https://en.wikipedia.org/wiki/Real_mode) with unlimited direct software access to all addressable memory, I/O addresses and peripheral hardware. Real mode provides no support for memory protection, multitasking, or code privilege levels. But this is required for real DOS usage, but caused stability issues in Win95 and Win98. With this removal WinME was more stable – magicandre1981 Jul 09 '17 at 06:15
  • ok, I still use windows 8 on my main laptop and here the file is still included. So this option is only offered on older versions. – magicandre1981 Jul 09 '17 at 06:16
  • 3
    Of course, real mode is also limited to the 8086's/8088's 20-bit address bus, so you can only address 1 MiB of memory. The 80286 lifted that restriction by expanding to a 24-bit address bus and adding protected mode, allowing the CPU to address 16 MiB of memory (which was a huge amount of RAM in 1982, more than most PCs had *fixed storage*). Protected mode 286 code wasn't all that common in practice (I'm looking at you, OS/2 and Xenix), and while the 80386 introduced 32-bit protected mode in 1985, it took another decade before protected mode 32-bit software became reasonably common on PCs. – user Jul 13 '17 at 09:31
10

I decided to test it myself. I created a bootable USB running MS-DOS using Rufus and then booted into it on my laptop. Once in MS-DOS, I ran the ver command to determine its version, which returned Windows Millennium, aka Windows ME.

I'm guessing that this means the version of MS-DOS used by Rufus is pulled from Windows ME, rather than being one of the earlier, standalone versions. How this ME-integrated version differs from the earlier versions I'm not entirely sure.

Hashim Aziz
  • 11,898
  • 35
  • 98
  • 166