What version of MS-DOS does Rufus use to make bootable USBs?

75

19

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?

Hashim

Posted 2017-07-09T05:40:39.460

Reputation: 6 967

2Out of curiosity, why do you need to know that? – Ooker – 2017-07-09T17:49:09.037

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 – 2017-07-09T17:50:30.947

3Nearly every body else who does not get in license conflicts uses FreeDOS for those kind of boot disks. – eckes – 2017-07-09T19:07:05.010

Answers

198

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.

Akeo

Posted 2017-07-09T05:40:39.460

Reputation: 3 236

4

Hey mate. I appreciate you weighing in, and thanks for a great tool. Would you mind shedding some light over here: https://superuser.com/questions/1228065/how-do-i-create-a-bootable-flash-drive-running-ms-dos-6-22. I can't seem to get Rufus to install MS-DOS 6.22 from an ISO, and from what you're saying, this doesn't seem to be a legal issue. I need DOS 6.22 because I can't risk using an alternative given that the utility I'll be running is incredibly niche and has the potential to break expensive things if not 100% right, so I'd really appreciate your help over there.

– Hashim – 2017-07-09T17:40:56.127

2I was unable to use FreeDOS to flash my BIOS on my laptop, but was able to use a Windows 98 boot disk. That said, all I had to do was go out and find a boot disk image online. It's not as if sends out DMCA notices over it. – trlkly – 2017-07-09T21:01:56.603

7It 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 – 2017-07-10T14:19:33.370

3MS-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 – 2017-07-12T15:24:21.037

@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 – 2017-07-12T15:26:29.550

@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 – 2017-07-12T16:23:38.383

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 – 2017-07-12T17:39:29.433

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) 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 – 2017-07-12T18:41:54.363

1FreeDOS 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 – 2017-07-12T18:43:21.207

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 – 2017-07-12T18:54:07.707

Should have added that both programs formatted the USB as FAT32. – Hashim – 2017-07-12T18:55:26.137

1As 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 – 2017-07-13T17:20:25.223

37

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 

magicandre1981

Posted 2017-07-09T05:40:39.460

Reputation: 86 560

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 – 2017-07-09T06:09:30.317

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 – 2017-07-09T06:15:15.043

11

real mode is a mode in x86 cpus 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 – 2017-07-09T06:15:22.830

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 – 2017-07-09T06:16:43.010

3Of 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. – a CVn – 2017-07-13T09:31:19.343

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

Posted 2017-07-09T05:40:39.460

Reputation: 6 967

4

see my answer. He gets the DOS image from Windows file

– magicandre1981 – 2017-07-09T06:08:57.303