How to install MSDOS from floppy to harddrive?

8,027

Solution 1

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.

Solution 2

  • 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.

Solution 3

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.

Share:
8,027

Related videos on Youtube

Tomáš Zato - Reinstate Monica
Author by

Tomáš Zato - Reinstate Monica

It might be easier to hire new management than to get a new community of volunteers. - James jenkins If you play League of Legends, check my repository: http://darker.github.io/auto-client/ I no longer play and I am actively looking for someone to maintain the project. It helped thousands of people, literally.

Updated on September 18, 2022

Comments

  • Tomáš Zato - Reinstate Monica
    Tomáš Zato - Reinstate Monica over 1 year

    I have a bootable MSDos system. I would like to install it on the current PC so that I can boot from HDD instead of Floppy. How can I do that?

    I am doing this in virtualbox, but a general solution would be nice.

    • Admin
      Admin almost 8 years
      Well, first off, MS-DOS doesn't support SATA, so you'd need to make sure you are using legacy emulation for DOS to even see the hard disk. Not sure what VirtualBox calls it exactly.
    • Admin
      Admin almost 8 years
    • Admin
      Admin almost 8 years
      This question made me wonder if it would be on-topic on the new retrocomputing.stackexchange.com. I'm still not sure. :)
    • Admin
      Admin almost 8 years
      @pipe my answer is based on knowledge gained during my pre-teen interests 20 years ago, so I'd say that it's pretty retro.
    • Admin
      Admin almost 8 years
      @Jarmund Sure, but his computer isn't.
    • Admin
      Admin almost 8 years
      @MichaelKjörling Last time I checked, MS-DOS did not have drivers for any type of hard disk. It would rely on the drivers provided by the BIOS, which means you could use it on any hard disk supported by your BIOS.
    • Admin
      Admin almost 8 years
      @kasperd: Or drivers that shipped with your hard disk. This of course posed a chicken-and-egg problem in that you'd need that driver to boot from that hard disk. The MS-DOS/BIOS solution was to scan the region above C000:0000 to F000:0000 for Option ROMs, which effectively extended the BIOS.
    • Admin
      Admin almost 8 years
      Well, first of all, you'd have to find a working floppy drive and MS-DOS install disk. Seems like a non-trivial task to me.
    • Admin
      Admin almost 8 years
      @HopelessN00b My dad has many backups of boot dos floppys. And I do too. Before I learned to use Linux, this was the only way to access dead system on computers for me.
    • Admin
      Admin almost 8 years
      @MSalters I have upgraded some machines with additional harddisk controllers where such an extension for the BIOS was on the controller. But that would be a driver specific for the controller not the disk itself. I have seen cases where the BIOS did not support the full size of the disk, but you could load a driver with support for the full size as long as the driver was located at the start of the disk. But all of this was happening before DOS was loaded, and DOS could not see any difference between that and the driver in the BIOS itself.
  • Tonny
    Tonny almost 8 years
    System.ini is a WIndows file. The other 2 are not strictly needed. For a basic bootable system just command.com is enough.
  • user
    user almost 8 years
    @Tonny Actually, for a bootable MS-DOS system, you need four parts: the boot sector must be properly installed, and MSDOS.SYS, IO.SYS and COMMAND.COM must reside in the root directory of the media or partition. Early versions of MS-DOS required that (IIRC) IO.SYS was in a fixed location on the disk, but later versions relaxed that requirement such that even a disk that hadn't been formatted with reserved space for the boot files could be made bootable without reformatting. COMMAND.COM cannot live alone, nor was it ever meant to.
  • user
    user almost 8 years
    CP/M actually made this distinction more clear, by clearly separating the OS into BIOS (Basic Input/Output System, handles interactions between hardware and software), BDOS (Basic Disk Operating System, handles simple file operations and so on) and CCP (Console Command Processor, handles command input, parsing and execution). In this model, MSDOS.SYS and IO.SYS provide the BDOS, and COMMAND.COM provides the CCP. IBM PC-DOS used different names (IBMBIO.COM and IBMDOS.SYS, I think) but the principle was exactly the same (it was essentially the same code base).
  • Tonny
    Tonny almost 8 years
    @MichaelKjörling You're right. But the SYS command will take care of the bootsector, msdos.sys and io.sys. Only thing to copy manually is command.com if I recall correctly. (It's been a while... could be SYS will copy command.com as well.)
  • user
    user almost 8 years
    @Tonny You can use pcjs.org to try this out, if you can find an appropriate image to boot it from. At least in Windows 95, SYS transferred IO.SYS, DRVSPACE.BIN (not strictly needed unless you have DriveSpace volumes), a stub MSDOS.SYS, and COMMAND.COM.
  • Tonny
    Tonny almost 8 years
    @MichaelKjörling I just tried it myself with a DOS6.22 image from www.allbootdisks.com/download/iso.html loaded in VirtualBox. Drvspac.bin and command.com both got copied by the SYS command.
  • Stephen Kitt
    Stephen Kitt almost 8 years
    I haven't checked with other versions, but at least in version 6.22, SYS is an external command; it's stored in SYS.COM on disk 1.
  • pts
    pts almost 8 years
    If you have booted from floppy already, DO NOT RUN format a: /s, because it would destroy your boot floppy.
  • TMN
    TMN almost 8 years
    ISTR that to have a complete MS-DOS install, once you make the drive bootable you also have to copy over the (BIN?) directory. This contains all the utilities like FORMAT, CHKDSK, etc.
  • Stephen Kitt
    Stephen Kitt almost 8 years
    @TMN yes; on a typical MS-DOS floppy though these will all be at the root of the floppy, and possibly compressed (at least with version 6, and IIRC version 5 too).
  • JDługosz
    JDługosz almost 8 years
    It varies by version what files are present and needed. In practice (if memory serves) do sys on the freshly formatted disk and then copy all the files over. Since you copy all the files, that includes the ones that must be present even to boot.
  • kasperd
    kasperd almost 8 years
    @MichaelKjörling The names are not MSDOS.SYS and IO.SYS on all builds. I have seen builds where those two files would have different names and end with .COM rather than .SYS. But since you need to use the SYS command to install the files correctly, one doesn't need to know the exact names of the files anyway.
  • kasperd
    kasperd almost 8 years
    @Tonny Whether the SYS command will copy COMMAND.COM depends on which version of DOS you are using (and perhaps on which command line flags). Maybe SYS /? will say something useful.
  • Braiam
    Braiam almost 8 years
    aren't boot and boot.ini needed too?
  • SeanC
    SeanC almost 8 years
    If you have a blank drive to start with, then a FORMAT C: /S would take care of initializing the drive, and copying over all the system files needed for boot.
  • Overmind
    Overmind almost 8 years
    Yes, of course one should not format it's original boot diskette.
  • user
    user almost 8 years
    @Braiam No, boot.ini is a Windows NT construct; not even Windows 9x has any boot.ini. (I do know that Windows NT 4.0 had boot.ini, and because of its purpose I suspect it debuted with the very first NT 3.1.) On MS-DOS, config.sys serves a similar (but not identical) purpose.