Storage

Configure IT Quick: Use FreeDOS as a replacement for MS-DOS

Use FreeDOS to implement and extend much of the functionality from MS-DOS


While you're rolling out your new Windows XP SP1 systems to your users, you might run into an instance where you need an old trusty DOS machine to handle a specific task. IBM and Microsoft long ago abandoned DOS, so where should you turn? FreeDOS is your answer. FreeDOS is an open source clone of MS-DOS that can implement and extend much of the functionality from MS-DOS.

System requirements
When I discuss utilities, I generally like to outline the RAM, disk space, and processor requirements and detail what software prerequisites there are for the topic I'm discussing. I'll bet it's been a while since you heard something like this: FreeDOS requires a PC/XT with 640 KB of RAM.

For the demonstration in this article, I'll be using FreeDOS in a Virtual PC partition on a system with a 1.6-GHz Pentium 4 processor. Additionally, I have tested FreeDOS on other systems running VMWare 4, and it works equally as well under that product.

How is it different from MS-DOS?
While FreeDOS aims to clone the full functionality of MS-DOS, there are some differences between the two programs. Volunteer contributors to the project write each of the utilities included with FreeDOS—for example, edlin and copy. This means that the functionality of the FreeDOS version of a traditional MS-DOS utility may not exactly match that of the MS-DOS version. You don't need to worry about it, though.

The coding standards for the project specify that any programs written must be compatible with MS-DOS 6.22. However, the base kernel for FreeDOS is MS-DOS 3.3. The developers chose that relatively ancient version of DOS because they believed that releases after that didn't add enough functionality to the actual kernel to warrant anything more.

Getting started with FreeDOS
FreeDOS is available for download from the project's Web site. At the time of this writing, there was a problem with the download from the site, so I downloaded it from a mirror site instead. The downloaded file is a 39-MB CD-ROM ISO image that contains the application. To get started, burn this image onto a CD.

The first boot
One of the first things that you will notice is that FreeDOS—like a whole lot of other open source projects—is perpetually in beta. The release that I am using for this example is version 8H1 beta.

The main menu in FreeDOS, shown in Figure A, has five options. The first option—option 0—allows you to just boot from the system drive. The second and third options allow you to boot to a DOS prompt. The difference is this: Option 1 boots with a standard kernel that just supports the FAT file system, while option 2 boots with an experimental DOS kernel that supports the FAT32 file system. The final two options—A and Q—allow you to either boot from the floppy drive or to just skip booting from the CD-ROM and boot from the next BIOS-dictated device. If you don't choose anything after 20 seconds, the system will just boot from the first available hard drive. For this example, I will boot the system using option 1.

Figure A
Here is the first FreeDOS boot menu.


After selecting this option, you will be presented with the menu shown in Figure B. This menu asks how you would like to handle the CD-ROM driver. If you choose option 1 or 2, the system will be booted using the standard El Torito driver from the CD. Option 3 will disable CD-ROM support, and options 4 and 5 require that you put the appropriate drivers on a floppy to use to boot the system. For this example, I will use option 1 because I don't need XMS.

Figure B
FreeDOS offers several system boot options.


Next, you have three options that you can choose from for running FreeDOS, as seen in Figure C. The first option provides you with a way to install FreeDOS onto the local hard drive. Option 2 allows you to simply run it from the CD-ROM, while option 3 provides you with the ability to create a FreeDOS boot disk.

Figure C
FreeDOS has three boot options.


Creating a boot disk
For the first example, I will create a FreeDOS boot disk. Since I am booting from the CD-ROM drive, it is assigned the drive letter A:. Therefore, the floppy drive is assigned as B:. To continue, choose option 3, and you will be presented with the screen shown below in Figure D.

Figure D
Here are the boot floppy creation notes.


To continue the boot disk creation process, press [Enter]. The floppy disk will be formatted and the FreeDOS system files will be written to it. When the process has finished, you will be brought back to the menu shown in Figure C. If you press R to reboot the system, you will be able to boot from the floppy disk that you just created. If your system is not allowing you to boot from the floppy at this point, check your BIOS settings to make sure that the floppy device is in the correct place in the boot order. After you boot, you will be able to perform most DOS commands.

Installing DOS on a hard drive
You also have the option to install FreeDOS as the operating system of choice on a hard drive. From the menu in Figure C, choose the first option. The first screen of the hard drive installation asks for which language support you would like to use. The choices are English, Spanish, and Dutch. I'll use English—option 0—for this example.

Immediately after choosing this option, you are provided with an information screen indicating that you can use FDISK to partition your hard drive before installation. If you need to run FDISK, you'll need to reboot the machine and follow the instructions in the next section to proceed. You can also choose to run FDISK during the FreeDOS installation.

The first question you are asked is if you want a Full or Mini installation of FreeDOS. Press F for Full or M for Mini. A Mini installation will install enough files for the system to boot, while a Full install provides you with all of the supporting utilities as well.

Next, you'll select the language for your system. Primarily, this choice will define your keyboard layout.

FreeDOS's next action is to begin partition management operations. FreeDOS includes the standard FDISK, as well as a more graphical, intuitive partition-management utility called Ranish. I will use FDISK to manage my partitions by pressing F.

Information about disk partitioning 
FDISK can be run by booting to a command prompt from the FreeDOS CD (option 2 from the menu in Figure C) or by choosing the F option from the installation menu. If you decide to run FDISK manually, run FDISK.EXE from \FREEDOS\FDOS\BIN if you need to. For this example, I will need to do this since my disk is 4 GB and FAT has a limit of 2 GB.

FreeDOS's FDISK is similar to the version that comes with MS-DOS, so if you've ever used MS-DOS FDISK, you'll have a good idea about what's in store. The first screen in FDISK allows you to create and delete partitions, as well as to define what will be the active partition and to view the partition table. To create a new partition, choose option 1.

On the next screen, select Create A Primary DOS Partition, which is the first option from the menu. FDISK will then ask if you want to use the maximum amount of space available for the new partition. Because FreeDOS has the same basic FAT limitations of MS-DOS, the largest you can create is a 2,055-MB partition. If you want to use the rest of the disk, you must create an extended DOS partition.

When you're finished using FDISK, you must reboot your system. Don't just press [Ctrl][Alt][Del]. Exit FDISK using the menu choices provided. FDISK will prompt you to reboot when it exits.

Before you can use the partition, you need to format it. To do so, reboot to the FreeDOS CD and choose option 2 from the second menu to boot to the CD. From there, change to the \FREEDOS\FDOS\BIN directory, type FORMAT C: , and press [Enter]. When asked if it is okay to proceed, choose Yes. You can also format the drive as a part of the installation process by choosing either Quick Format or Total Format.

After formatting, you must choose the partition to which you would like to install FreeDOS by selecting it with the arrow keys and pressing [Enter]. You will be presented with a number of information screens, after which you will be asked to provide an installation location. The default location for FreeDOS is C:\DOS, and unless you have a reason to change it, go ahead and accept the default.

After you select a location, you will be asked whether you wish to install a number of packages, including a DOS version of emacs (an editor), a GUI, source code, and more. On each of these screens, you can choose either Yes or No. After you make the desired selections, FreeDOS is installed. You will be prompted to continue the installation after each selection has been installed.

Make the drive bootable
Finally, you need to take one more step to make sure that you'll be able to boot from this drive. From the installation CD-ROM, change to the \FREEDOS\INSTALL\BOOTDISK\FLOPPY directory, type sys c:, and press [Enter] to transfer the system files to the hard drive.

When this is done, remove the CD-ROM and any floppy disks and reboot your system. After you boot, you will be presented with a FreeDOS prompt, as shown in Figure E, at which you can use many of the DOS programs that you used to use.

Figure E
This screen shows the FreeDOS prompt.


Not your father's DOS
After years and years of Windows use, you've now installed a DOS system. You will find a number of differences between the old MS-DOS and FreeDOS. First, many people have ported UNIX utilities such as emacs and vi to FreeDOS. During the installation, many of these packages were offered to you for installation. And, while FreeDOS attempts to mimic DOS in many ways, it adds certain features, such as the Ranish disk partition utility, which improve on the old DOS utilities.

But beyond all of its differences, FreeDOS offers the same thing that MS-DOS always did—a fast, small operating system that you can use to quickly get yourself out of problems. Best of all, as the name implies, FreeDOS is free.

Editor's Picks