How to install MSDOS from floppy to harddrive?

Disclaimer: It's been at least two decades since I last did this, so I may have forgotten some details.

If you've got the system booted from a MSDOS floppy, the way to install the same boot-system onto the local harddrive is as follows:

sys a: c:

(presuming that the floppy is a: and the harddrive is c:)

sys is a shell builtin, along with dir, del, cd, and the other basics. It is worth noting that using the sys command will make the drive only bootable with MSDOS, and I think I remember that you also have to copy over command.com manually:

copy a:\command.com c:

command.com is the main component of msdos, and it therefore holds the shell builtins. On top of that there are three system files: autoexec.bat, system.ini, and config.sys. I can't remember which of those (if any) are required (config.sys, probably), but to be safe you can copy those over as well, using the same method as for command.com.

You might also want to find some msdos install floppies/images to get the useful utilities over. I belive 5.0 or later was what had "all" of the utilities I ever needed.


EDIT

The comments to this answer is indeed correct: MSDOS.SYS and IO.SYS are also needed. Running the sys command above may or may not take care of copying these over; if not you'll have to do it manually.


  • Make a system floppy disk by the good old command: FORMAT A: /S command or boot from whatever has the MS-DOS system files and can boot from it
  • Make sure command.com is also on it, if not, manually copy it
  • Boot from FDD and make sure the drive you want to put the system on is correctly detected and then use sys a: c: command
  • For usage in VM environment, you can get a buildable DOS ISO from sites like http://www.allbootdisks.com/download/iso.html . Use the same command to make your C:\ bootable.

so that I can boot from HDD instead of Floppy.

Note that installing MS-DOS may be more work than what you are seeking to do. (Some of the other answers simply say how to make MS-DOS bootable, accomplishing this stated goal of booting from the hard drive.)

However, another part of the actual question was:

would like to install it on the current PC

Installing MS-DOS will go through the results of making MS-DOS bootable, and will also place the majority of the operating system to the hard drive. For instance, it will get MS-DOS Help installed.

Overview/Intro

Some of this guide is rather cursory. For example, I mention using "FDISK". I don't specify exactly what keystrokes to use. One reason is that different versions of MS-DOS do have some differences. Much of this answer is applicable with many versions of DOS (including MS-DOS and even others, although some of the details here are rather specific to MS-DOS).

Another reason why some steps are described rather generically is that a person can spend quite a bit of time on some steps (like adjusting memory, including using different drivers). Some of the steps taken may work wonderfully on some computers, and break on others. Some steps, like optimizing memory usage, may be technically superior, but not worth a person's time (if they have enough free "conventional memory" to do what they want, more free "conventional memory" might not really be very useful.)

The last third goes beyond the initial question, by recommending some follow-up steps.

If you have questions about a specific process (or want additional steps about a specific task), I recommend considering whether the creation of a new (specific) question would be sensible. If something seems unclear/wrong about what I wrote, comments are invited.

Partition

Most commonly, MS-DOS gets installed to the first bootable partition. That is called C:.

If you're already booting DOS (from a floppy disk) and you already have a C:, you can generally skip this section.

You might need to make that partition first, before going through the typical SETUP process. This is commonly done with a program called FDISK. UNDERSTAND THAT THIS COMMAND IS RATHER DESTRUCTIVE! If you don't have a partition called C: yet, try running FDISK. (Actually, the "third party" program called XFDisk may be easier to use.) If you want to use Microsoft's solution, your best bet is the FDISK bundled with the Q263044 update. Otherwise, the simple rule is that the later versions are better (because they are more likely to work with larger hard drives).

When making the partition, it will need to be smaller than 2GB. (2GB is 2,147,483,648, but MS-DOS is limited to 2,147,450,880 bytes, which is 32,768 bytes smaller.) This is a limitation of MS-DOS. (Windows NT 4.0 could support FAT16 which was nearly 16GB large.)

If you're using third party software to make the partition, you may be asked about a partition "type" identifier. If you're using a disk from from 32 MB through 504 MB (528,482,304 bytes) then you're probably best off using partition type 6. If your disk is more than 504MB (but smaller than 2GB), newer DOS versions may favor using type E (which, if specified in hex, might appear as 0E or 0x0E).

Filesystem Volume

Once the partition is created, you may wish to create the filesystem volume. (I believe this can get done from within the MS-DOS setup, but just in case your version of MS-DOS doesn't do that from within the SETUP program, you may wish to do that manually.)

Note that formatting a disk/partition is DESTRUCTIVE to data on the disk, so don't do this if you already have data on a working, formatted disk/partition!

If MS-DOS SETUP doesn't provide you with this option, you can create the do that with:

format C:

or, if you want the FORMAT command to run SYS for you as well, most/recent versions of MS-DOS permit you to use:

format C: /S

Actual Installation

Before proceeding, you may wish to back up files that may be overwritten/modified. This might especially include \AUTOEXEC.BAT and \CONFIG.SYS (and, if you've had Win9x files on the system, maybe \MSDOS.SYS which often has is marked as a "hidden file" due to an "attribute" that is set).

Once the partition is created and formatted, to install MS-DOS, you run SETUP.EXE from the MS-DOS installation disks. (Optionally, successfully booting from the official installation disks will end up running SETUP.EXE for you. If that happens undesirably, pressing F3 will let you quit the SETUP.EXE program.) After MS-DOS is installed, this will permit you to boot from the hard drive instead of booting from the floppy disk.

Tasks performed by SETUP can be performed manually without using the SETUP.EXE software. This is true of most, and quite possibly all, of SETUP.EXE's tasks, with reasonably minimal efforts. The basic effect of installing will typically do these things:

  • "SYS" the drive, which installs the boot loader (similar to running FDISK /MBR), and copy the primary boot files (most commonly named IO.SYS and MSDOS.SYS) to the specified partition.
  • Copy other files
  • Extract other files, by running EXPAND on several *.??_ files
  • Provides a basic \CONFIG.SYS file.
  • Probably also provide a basic \AUTOEXEC.BAT file
  • If you're using MS-DOS 6, it may also ask about installing some Microsoft Windows software. (The software can also be installed later. Offhand, I believe SETUP /G is used for that, but you can use SETUP /? to verify that.)

Upgrade

If you installed MS-DOS 6.0, 6.2, or 6.21, I recommend following up by installing the freely distributed MS-DOS 6.x to 6.22 STEPUP upgrade, which comes with its own SETUP.EXE

Especially do this if you plan on tinkering with disk compression, as 6.22's DrvSpace included some reliability improvements.

Disable GUI Auto-Load

If you're using MS-DOS 7 bundled with Win95 or Win98, you can edit a text configuration file which is usually named \MSDOS.SYS

In particular, adding "BOOTGUI=0" to the [Options] section will cause Windows to not auto-load the GUI. Then, if you wanted to auto-load the GUI, it could be done (by running win) from the bottom of your AUTOEXEC.BAT (which, with customization, you could do in only some cases). The only real downside to doing that (which I remember encountering) is that Safe Mode won't auto-load the GUI, which is rather non-tragic.

I'm listing this process before some later steps. That's not necessarily because this step is more important/universal. Rather, the reason is that if this step is going to be done, then doing it now (before many steps described later) is likely sensible.

More Follow-up

You may also want to replace some additional files

Once everything is installed, I suggest some common changes:

  • Replace MS-DOS's drivers with newer drivers for MS-DOS.
    • Especially change the mouse driver, to CuteMouse, since that uses much less "conventional" memory.
    • Also look into changing the CD-ROM Driver. OAKCDROM.SYS may be very replaceable (e.g., with the TEAC drivers or VIDE drivers, or others)
    • Using SETVER is almost never worthwhile. (It simply allows manual override with some software that performs some checks of versions. Such checks are rather useless since SETVER can override them.)
    • Some of the drivers included with MS-DOS are not enabled by default, and are not worth using. For instance, RAMDRIVE.SYS is inferior to the third party TDSK, and ANSI.SYS has multiple options of "third party" replacements that are superior.

I'm listing those changes are being particularly useful to know about. CuteMouse is much better than many mouse drivers, and those superior ATAPI CD-ROM drivers are much better than many other CD-ROM drivers. Simply relying on those drivers can increase available conventional memory for many systems, with few or no drawbacks (only improvements!)

You can install other drivers too, like replacing MSCDEX.EXE with some other/better options. However, some solutions may work better on some systems than others, so I won't offer such recommendations here (as if they were universal solutions). You could also look into MS-DOS 6.x's ability to support multiple boot configurations (run QBASIC/QHELP for online help about the "menu" commands in \CONFIG.SYS). I'm also a fan of CONFIX.SYS

4DOS

I also recommend installing 4DOS. You can install it to C:\4DOS\ and it won't conflict with DOS. I suggest adding these lines to the \CONFIG.SYS file:

SHELL=C:\4DOS\4DOS.Com /P SET COMPSPEC=C:\4DOS\4DOS.Com

(If you screw that up, you may fail to boot. So be prepared to recover if that goes unsmoothly. With MS-DOS 6, holding F8 or F5 or Ctrl may be helpful. With earlier versions of MS-DOS, recovery would likely involve booting from another disk.)

A few people dislike 4DOS, because of extremely rare scenarios where compatibility may be imperfect, but most people love it for being highly compatible and providing lots of nice features (including some ability to work better with DOS's various segments of memory).

Memory Tinkering

MS-DOS 6's MemMaker.exe can perform some good optimization, although there are times when it is inferior to some simple manual optimization.

There are some different strategies, including:

  • Load XMS by using XMSMMGR (a file from the newer MS-DOS versions bundled with Win9x)
  • Alternatively, load XMS by using DEVICE=\DOS\HIMEM.SYS (in the \CONFIG.SYS)
  • Load EMS, by first loading XMS (by using DEVICE=\DOS\HIMEM.SYS and DEVICE=\DOS\EMM386.EXE RAM (in the CONFIG.SYS)
    • Additional parameters might be nice. For instance, V would offer "VERBOSE" output (with at least some versions of EMM386)
    • Some systems could get even more memory with: DEVICE=\DOS\EMM386.EXE RAM HIGHSCAN
    • EMM386 places the CPU into Protected Mode, which caused some compatibility challenges
    • Some other parameters, like ALTBOOT and memory exclusion ranges, have different effects on different systems. Feel free to tinker (experiment)
  • Add dos=high,umb to \CONFIG.SYS
    • Win9x may support "noauto" which disables some behaviors like automatically using up memory by loading IFSHLP.SYS and DBLBUFF.SYS and SETVER.EXE
    • Some versions of MS-DOS may need this placed before EMM386. According to ComputerHope, this is best to place after the XMS driver (HIMEM.SYS).
  • Newer third party software could provide notable improvement. e.g., UMBPCI worked on many systems and provided more useful memory (and if it worked at all, then it likely resulted in less software compatibility issues). There are other solutions too, which may be used instead or in addition, which may provide some additional superior results (possibly with some cost of compatibility-- what works best on one computer might work less well, and even not work acceptably at all, on another system).
    • UMBPCI's website: section on HIRAM describes how, by using some third party software, you can get away with effectively using DEVICEHIGH=\DOS\HIMEM.SYS to load HIMEM High. (The usefulness might be somewhat minimal, but this may offer a particularly perverse pleasure to those of us who remember being aggravated by the belief that this one single file was the only one we couldn't manage to load HIGH if desired.)

Unless you're using the "auto" parameter from Win9x, you may also get quite a bit of help by using DEVICEHIGH= instead of DEVICE=

That results in moving drivers to the UMBs (traditionally provided by EMM386), although the UMBs can fill up. Different systems have different amounts of UMBs, and different systems may use different drivers (which use different amounts of memory), so some experimentation may be needed to find the optimal results. Unless you are using XMSMMGR (which has an incompatibility with MEM), try running MEM/C (or MEM/C|more)

LASTDRIVE=Z may use up more memory, and often be worthwhile.

Win98's %windir%\CONFIG.TXT is available online, and provides some documentation of Win98's implementation, which is rather similar to MS-DOS 6's CONFIG.SYS options.

4DOS has some options that can use up memory, including being able to use up UMBs rather than Conventional memory. So, if you're using 4DOS, command line parameters (to 4DOS.Com) and/or 4DOS.Ini configuration lines can have an impact. 4DOS is designed to load 4DOS's help if you run HELP or press F1 (instead of MS-DOS's help, which is still available by using QBASIC/QHELP)

Sound

Next, I suggest focusing on adding support for any other hardware you care about. For instance, if you're wishing to play games, make sure that sound is working. This might involve installing some more drivers. This might involve setting an environment variable, like ULTRASND (for the superior "Gravis UltraSound") or BLASTER (for the "Sound Blaster" by "Creative Labs", and compatible cards).

Hopefully the environment variables are set for you, as part of the process of installing the drivers for the sound card.

The Sound Blaster 16 sound drivers offer minimal improvement, and may take up more memory than needed. If you're short on memory, consider telling software you have a Sound Blaster Pro, and going without drivers.