Windows XP and MS-DOS


Hard as it is to believe, there are times when it makes sense to run plain old MS-DOS. Games are usually not the reasonmost games that were designed back in the DOS days aren't able to cope with the blazing speed of today's processors. However, some people still have a need to use specialized hardware that works only under DOS, such as industrial control and hardware programming systems. The software for these devices often won't work when run from an XP Command Prompt window, because Windows won't give it the direct access to hardware that it needs. So, for occasional use, you may want to run MS-DOS to perform specialized tasks.

NOTE

In this section, I'm going to talk about ways to boot your computer under DOS, so that Windows isn't running at all. You might be able to run your MS-DOS program in an emulator, that is, a program that mimics a PC running DOS. This may let you run games and old DOS software without going to the trouble of booting up DOS itself, but probably won't help you with old hardware issues, unless you can extend the emulator, (The open-source DOSBOX emulator could be a candidate for extension.) For a discussion of emulators, see the end of this chapter.


If your computer is set up to multi-boot to Windows 95 or 98, it's easy to get to plain MS-DOS. You can press F8 while one of these versions is booting and select the "Command Prompt" mode. Alternately, with Windows 95 or 98 running, you can click Start, Shutdown, Exit to MS-DOS.

If Windows 95 or 98 aren't available, you'll have to install a version of DOS on your computer. The procedure you'll need to follow depends on what version of DOS you want to install. If you have a boot diskette from a version of Windows 95 or 98, its version of DOS supports FAT32 partitions. In this case, you can install it on a new partition or on an existing FAT32 partition, even if it's the partition from which XP boots. Use either of the two procedures that follow this section.

NOTE

You must install DOS in a partition on the first physical drive (Drive 0) in your system. It must be installed in a Primary (not logical) partition.


If you have only DOS 5 through 6.22, you'll need to install it on a FAT16 partition, because these older DOS versions can't read the FAT32 format. It's best if this is a small partition set up expressly for this purpose. You can't install Windows XP on a FAT16 partition. Other OSes will be able to see this partition, and copy files to and from it, so the partition only needs to be big enough to hold DOS, the DOS applications you need, and the data files. 40MB is probably enough, although your application may need more, and remember that DOS can't handle partitions larger than 2048MB. Use only the first of the two installation procedures that follow this section.

CAUTION

Windows XP can't format a FAT16 partition. To format the partition you'll need to use the FORMAT program that comes with DOS. If you create the partition with the DOS FDISK program, be very careful not to delete any existing partitions. In particular, if you've already installed XP, be extremely careful if you use MS-DOS Setup diskettes to install DOS. The Setup program will overwrite the partition information for the first drive it finds, and could blow your Windows XP partition out of the water. Your best bet is to use the setup program's Install to Floppy Disk option, and then copy the program and system files to the hard drive later.


Create a bootable DOS disk partition by following one of the two following procedures. The procedure depends on whether the partition is the one from which Windows boots or not.

Installing MS-DOS on a Non-Boot Partition

To set up a FAT16 partition (for any version of DOS) or a FAT32 partition (for the Win95/98 versions of DOS) that no other operating system boots from, follow this procedure:

1.

Shut down Windows, and boot up from a bootable DOS floppy disk.

2.

Find out what drive letters are available, from C: on up, by typing dir c:, dir d: and so on. If you're installing into a brand new partition, the response you're looking for is "Invalid media type reading drive X"; that's your new, unformatted partition. If you're installing DOS onto an existing formatted partition, check the drives' contents to determine which drives they correspond to in Windows, and determine which is the one to use for the DOS installation. It should not be the boot drive for any other operating system.

If no hard drive letters are defined, you will need to use FDISK to allocate a partition. This procedure is beyond the scope of this book. Be very careful not to delete your XP partition. After creating the partition, reboot and repeat this step.

NOTE

Remember, the DOS boot partition must be on the first physical drivedrive 0in your computer.

3.

To format and install the DOS boot files on a brand new partition, type the command FORMAT X: /S where X is the drive letter you chose to use for DOS. To install the DOS boot files on an existing formatted partition, just type the command SYS X:

4.

Copy all of the files from the DOS floppy to X:\DOS

5.

Reboot Windows and log on as a Computer Administrator.

6.

Determine the drive letter onto which the DOS files were installed. This might not be the same drive letter as under MS-DOS, because DOS couldn't see your FAT32 and NTFS partitions.

7.

Use Notepad to type the following text into a new file:

 L 100 n 0 1 N C:\BOOTSECT.DOS R BX 0 R CX 200 W Q 

except, in the first line, instead of n type the number corresponding to the drive letter that you found for the DOS partition. Use 2 for C:, 3 for D:, and so on. For example, if the DOS partition is D:, the line should be "L 100 3 0 1". (The number is entered in hexadecimal, so drive J: is 9, K: is 0A, L: is 0B, and so on.)

8.

Save the file with the name bootblock.txt. Then, start an NT command prompt window, change directories to the location of this text file, and type the command

 debug <bootblock.txt 

9.

Right-click My Computer, select Properties, and select the Advanced tab. Under Startup and Recovery click Settings, and click Edit.

10.

Add this line to the end of boot.ini:

 C:\BOOTSECT.DOS=MS-DOS 

11.

Save boot.ini. Set Time to Display List of Operating Systems to a reasonable number like 10.

You should now be able to restart your computer and select MS-DOS. Once it's running, set up an autoexec.bat file and a config.sys file. The config.sys file should have at least the following:

 device=X:\DOS\himem.sys device=X:\DOS\emm386.exe files=99 

with additional commands to load a CD-ROM device driver, if necessary.

Autoexec.bat should have at least

 @echo off path X:\DOS prompt $p$g smartdrv 

with additional commands to load a mouse driver, and the CD-ROM extensions mscdex.exe, if needed.

Installing MS-DOS on the Windows XP Boot Partition

If your only option is to install MS-DOS on a FAT32 partition from which Windows XP boots, be sure you have a Windows XP installation CD and that you can successfully boot from it. You must use the DOS version from Windows 95 OSR2 or 98. Follow these steps:

1.

Perform steps 1 through 4 in the procedure in the previous section. In this case, though, you'll be copying DOS to the partition from which Windows boots. The sys command will overwrite the Windows Master Boot record (and the boot manager) with the MS-DOS boot program.

2.

Reboot your computer from the Windows XP Setup CD-ROM.

3.

Select the Repair option, and then the Manual repair option. You want only to perform the Verify Boot Files step; there is no need to have the repair process inspect other files or the Windows boot environment. This will reinstall the Windows XP boot manager.

4.

Reboot Windows and log on as a Computer Administrator.

5.

Perform steps 9 through the end of the procedure in the previous section.



Special Edition Using Microsoft Windows XP Professional
Special Edition Using Microsoft Windows XP Professional (3rd Edition)
ISBN: 0789732807
EAN: 2147483647
Year: 2003
Pages: 450

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net