现在一些网友开始安装WinNT/2K甚至是XP了。可是,当他们启动了这些操作系统以后,发现许多DOS程序都无法运行了,而纯DOS也无法启动了。这是怎么回事呢?
大家知道,WinNT/2K/XP中有个叫“命令提示符”的东东,表面看上去类似于Win3.x/9x中的MS-DOS窗口。然而,它们是完全不同的。Win3.x/9x是运行于MS-DOS下的大型保护模式的界面增强程序,而WinNT/2K/XP则是基于OS/2、NT构件的独立操作系统,因此,它们之间有着本质的不同。同理,Win3.x/9x中所提供的MS-DOS是真正的DOS,而WinNT/2K/XP中的“命令提示符”仅仅是个“DOS虚拟机”。既然是虚拟的,效果自然没有真正的好。因此,当这个“虚拟的DOS”无法正常运行DOS程序时,只有使用真正的DOS(例如MS-DOS 7.10)以运行它们。
由于WinNT/2K/XP不带有DOS,所以要想在安装了这些操作系统后想用硬盘启动到纯DOS的话,只能使用双启动。很多网友知道WinNT/2K/XP启动时往往会出现一个菜单,可以从中选择要启动的操作系统。然而,有时此菜单中并没有“DOS”这个选项,甚至启动时根本没有出现此启动菜单(如果在安装WinNT/2K/XP时选择保留原操作系统的话,WinNT/2K/XP的启动菜单中就会出现原来操作系统的选项)。那么该怎么办呢?以下介绍一下在安装了WinNT/2K/XP后再安装DOS的方法。
DOS的启动需要DOS系统的引导扇区和启动文件。而安装了WinNT/2K/XP后再安装DOS的关键就是要建立它们。大家也许会问,系统安装了WinNT/2K/XP后主引导扇区中的内容不是已被替换成为非DOS的了吗,为什么还能通过上面所提到的启动菜单启动到DOS呢?这是因为,如果系统中曾经安装着DOS(例如MS-DOS 7.10),WinNT/2K/XP在安装时会自动在主引导分区(通常是C驱动器)中建立BOOTSECT.DOS文件,而此文件中保留着DOS的引导信息,在启动菜单中选择启动DOS后,WinNT/2K/XP就利用此文件使DOS能够启动。因此,如果C:\(即主引导分区)中已存在BOOTSECT.DOS文件,就不用手工建立此文件了。可直接将DOS(如MS-DOS 7.10)的IO.SYS、MSDOS.SYS和COMMAND.COM文件复制到C:\上(最好不要用SYS命令传输系统,详情可看下段的介绍),然后按照下面的介绍修改BOOT.INI文件就可以了。
对于DOS系统启动文件,大家知道可以用DOS自带的SYS命令传输。但是,若直接这样做的话,只有DOS可以启动了,WinNT/2K/XP的引导信息会被覆盖而导致无法启动。为了使DOS和WinNT/2K/XP均能启动,有几种办法。可以使用一个叫作BOOTPART的十分实用的工具,可在本站的“系统工具”中找到。它的功能很强大,比如可以向引导扇区中写入指定的系统的信息,包括MS-DOS 6.x、MS-DOS 7.x、WinNT/2K/XP的。例如想将MS-DOS 7.10的引导信息写入C盘,就可用BOOTPART DOS71 BOOT:C:,命令来完成。因此,具体的方法是,先用SYS命令(如SYS C:)将DOS系统文件传输入C盘,然后将此时的主引导扇区中的信息(即DOS引导信息)中的内容保存到C:\BOOTSECT.DOS文件中,可用本站“磁盘工具”中的一个叫SRC Tools的小工具轻易实现。其中的SRCBOOT、SRCMBR和SRCFAT分别是对BOOT、MBR和FAT进入保存、备份及比较操作的命令,SRCTools工具集的具体使用方法可在“DOS文章”栏目中的专文中看到。例如SRCBOOT C: C:\BOOTSECT.DOS /S就可将C盘的引导扇区保存到C:\BOOTSECT.DOS文件中。此时BOOTSECT.DOS文件已顺利建立,接下来就是恢复WinNT/2K/XP的引导信息了,可用上面那个BOOTPART工具完成,如BOOTPART WINNT BOOT:C:。然后再进行下面修改BOOT.INI文件的操作就可以了。
另一种办法是,先将WinNT/2K/XP的引导信息保存下来到文件中,再分别将DOS的系统启动文件和引导信息建立,然后用上面所提到的SRC Tools将DOS的引导信息保存到C:\BOOTSECT.DOS文件中,最后将保存于文件中的WinNT/2K/XP的引导信息还原到启动扇区中。建立DOS的系统启动文件和引导信息的具体过程可见上面的方法,而保存和还原WinNT/2K/XP的启动扇区则均可以用SRC Tools命令,例如可分别执行SRCBOOT C: C:\NTBOOT.DAT /S和SRCBOOT C: C:\NTBOOT.DAT /R命令来完成(/S参数表示保存,/R参数表示恢复,而NTBOOT.DAT只是保存和还原WinNT/2K/XP的引导信息时所用的临时文件,完成后可删除),再进行下面的操作即可。
最后,就可以开始做双重启动菜单了。WinNT/2K/XP的启动菜单保存于主引导分区的根文件夹下的BOOT.INI文件中(通常是C:\BOOT.INI),操作方法是首先去掉C:\BOOT.INI文件的只读、隐藏和系统属性(如用DOS自带的ATTRIB命令,也可用增强的ATTRIB命令等等),再用文本编辑器(如DOS自带的EDIT)打开C:\BOOT.INI文件,在其文件中的项下加入一行:C:\="MS-DOS"。完成后保存文件并恢复文件的各种属性,然后重新启动系统,就会出现一个启动菜单,其中有"MS-DOS"这一项了。选此项后即可进入纯DOS方式。此时,WinNT/2K/XP与DOS的双启动就制作成功了,以后就可以选择相应的启动选项以启动相应的系统了。
说明:如果想让系统自动进行上述在WinNT/2K/XP下安装DOS的操作(而不是手工设置)的话,请使用“MS-DOS 7.10完整安装版”(可以在网站或论坛中看到)。它可以自动实现在WinNT/2K/XP下安装MS-DOS 7.10完整版,并自动实现上述的多重启动。由于此完整安装版所使用的方法更好,所以它的成功率更大,欢迎大家使用。
另外,如果硬盘的主分区(通常是C盘)是NTFS格式的,那用以上的方法是不行的,因为DOS不支持NTFS格式。这时有一种另外的解决方法,那就是利用虚拟软盘镜像的方法来启动DOS(也就是从WinNT/2K/XP的开机菜单中直接启动虚拟软盘中的DOS)。可以通过用一个叫作VFloppy的软件来实现,具体可以在“DOS启动盘/LOGO技术”版块中看到。
Now some netizens start to install WinNT/2K or even XP. However, after they boot these operating systems, they find that many DOS programs cannot run and pure DOS cannot start. What's the matter?
You know, there is a thing called "Command Prompt" in WinNT/2K/XP. It looks similar to the MS-DOS window in Win3.x/9x on the surface. However, they are completely different. Win3.x/9x is a large protected mode interface enhancement program running under MS-DOS, while WinNT/2K/XP is an independent operating system based on OS/2, NT components. Therefore, there are essential differences between them. Similarly, the MS-DOS provided in Win3.x/9x is the real DOS, and the "Command Prompt" in WinNT/2K/XP is just a "DOS virtual machine". Since it is virtual, the effect is naturally not as good as the real one. Therefore, when this "virtual DOS" cannot run DOS programs normally, only the real DOS (such as MS-DOS 7.10) can be used to run them.
Since WinNT/2K/XP does not come with DOS, if you want to boot to pure DOS from the hard disk after installing these operating systems, you can only use dual-booting. Many netizens know that when WinNT/2K/XP starts, there will often be a menu from which you can select the operating system to boot. However, sometimes there is no "DOS" option in this menu, and even the boot menu does not appear at all (if the original operating system is reserved when installing WinNT/2K/XP, the option of the original operating system will appear in the boot menu of WinNT/2K/XP). Then what should be done? The following introduces the method of installing DOS after installing WinNT/2K/XP.
The startup of DOS requires the boot sector and startup files of the DOS system. And the key to installing DOS after installing WinNT/2K/XP is to establish them. You may ask, after the system installs WinNT/2K/XP, the content in the main boot sector has been replaced with non-DOS, why can it boot to DOS through the above-mentioned boot menu? This is because if DOS (such as MS-DOS 7.10) has been installed in the system, WinNT/2K/XP will automatically create the BOOTSECT.DOS file in the main boot partition (usually drive C) during installation, and this file retains the boot information of DOS. After selecting to boot DOS in the boot menu, WinNT/2K/XP uses this file to enable DOS to boot. Therefore, if the BOOTSECT.DOS file already exists in C:\ (that is, the main boot partition), there is no need to manually create this file. You can directly copy the IO.SYS, MSDOS.SYS, and COMMAND.COM files of DOS (such as MS-DOS 7.10) to C:\ (it is best not to use the SYS command to transfer the system, for details, please refer to the introduction in the next paragraph), and then modify the BOOT.INI file as introduced below.
For the startup files of the DOS system, you know that you can use the SYS command自带 by DOS to transfer. However, if you do this directly, only DOS can boot, and the boot information of WinNT/2K/XP will be overwritten and cannot boot. In order to make both DOS and WinNT/2K/XP bootable, there are several methods. You can use a very practical tool called BOOTPART, which can be found in the "System Tools" of this site. Its function is very powerful. For example, it can write the information of the specified system into the boot sector, including MS-DOS 6.x, MS-DOS 7.x, and WinNT/2K/XP. For example, if you want to write the boot information of MS-DOS 7.10 into drive C, you can use the command BOOTPART DOS71 BOOT:C:. Therefore, the specific method is to first use the SYS command (such as SYS C:) to transfer the DOS system files to drive C, and then save the content in the main boot sector at this time (that is, the DOS boot information) to the C:\BOOTSECT.DOS file, which can be easily realized with a small tool called SRC Tools in the "Disk Tools" of this site. Among them, SRCBOOT, SRCMBR, and SRCFAT are commands for saving, backing up, and comparing BOOT, MBR, and FAT respectively. The specific usage method of the SRCTools toolset can be seen in the special article in the "DOS Articles" column. For example, SRCBOOT C: C:\BOOTSECT.DOS /S can save the boot sector of drive C to the C:\BOOTSECT.DOS file. At this time, the BOOTSECT.DOS file has been successfully established. Next, it is to restore the boot information of WinNT/2K/XP, which can be completed with the above-mentioned BOOTPART tool, such as BOOTPART WINNT BOOT:C:. Then perform the following operation of modifying the BOOT.INI file.
Another method is to first save the boot information of WinNT/2K/XP to a file, then respectively establish the system startup files and boot information of DOS, then use the above-mentioned SRC Tools to save the boot information of DOS to the C:\BOOTSECT.DOS file, and finally restore the boot information of WinNT/2K/XP saved in the file to the boot sector. The specific process of establishing the system startup files and boot information of DOS can be seen in the above method, and both saving and restoring the boot sector of WinNT/2K/XP can be completed with the SRC Tools command. For example, you can execute the SRCBOOT C: C:\NTBOOT.DAT /S and SRCBOOT C: C:\NTBOOT.DAT /R commands respectively (/S parameter means save, /R parameter means restore, and NTBOOT.DAT is only a temporary file used for saving and restoring the boot information of WinNT/2K/XP, which can be deleted after completion), and then perform the following operations.
Finally, you can start to make the dual-boot menu. The boot menu of WinNT/2K/XP is saved in the BOOT.INI file in the root folder of the main boot partition (usually C:\BOOT.INI). The operation method is to first remove the read-only, hidden, and system attributes of the C:\BOOT.INI file (such as using the ATTRIB command自带 by DOS, or using the enhanced ATTRIB command, etc.), then open the C:\BOOT.INI file with a text editor (such as EDIT自带 by DOS), and add a line: C:\="MS-DOS" under the item in the file. After completion, save the file and restore the various attributes of the file, then restart the system, and a boot menu will appear, in which there will be the "MS-DOS" item. Select this item to enter the pure DOS mode. At this time, the dual-boot of WinNT/2K/XP and DOS is successfully made, and then you can select the corresponding boot option to boot the corresponding system.
Note: If you want the system to automatically perform the above operation of installing DOS under WinNT/2K/XP (instead of manual setting), please use the "MS-DOS 7.10 Full Installation Edition" (which can be seen on the website or forum). It can automatically realize the full installation of MS-DOS 7.10 under WinNT/2K/XP and automatically realize the above multi-booting. Since the method used by this full installation edition is better, its success rate is greater, and everyone is welcome to use it.
In addition, if the primary partition of the hard disk (usually drive C) is in NTFS format, the above method will not work because DOS does not support the NTFS format. At this time, there is another solution, that is, use the method of virtual floppy disk image to boot DOS (that is, directly boot the DOS in the virtual floppy disk from the boot menu of WinNT/2K/XP). It can be realized by using a software called VFloppy, which can be specifically seen in the "DOS Boot Disk/LOGO Technology" section.
LLM 解释
WinNT/2K/XP无法直接启动纯DOS的技术原因
Windows NT/2000/XP与Windows 9x存在本质架构差异:
-
Windows 9x:基于实模式DOS内核,属于"DOS扩展"系统,可通过重启进入纯DOS
-
Windows NT系列:采用独立的NT内核,运行于保护模式,无实模式DOS基础
-
命令提示符:仅是用户模式下的虚拟DOS环境(NTVDM),不支持直接硬件访问和部分DOS中断
在NT/2K/XP系统中实现纯DOS启动的技术方案
方案一:基于FAT32分区的双启动配置(适用于FAT32系统分区)
-
准备DOS系统文件
- 需IO.SYS、MSDOS.SYS、COMMAND.COM核心文件(建议使用MS-DOS 7.10版本)
- 避免直接使用
SYS C:
命令,会覆盖NT引导扇区导致系统无法启动
-
创建DOS引导扇区文件
REM 使用SRC Tools保存DOS引导扇区
SRCBOOT C: C:\BOOTSECT.DOS /S
REM 使用BOOTPART恢复NT引导扇区
BOOTPART WINNT BOOT:C:
-
修改BOOT.INI配置文件
REM 移除文件属性
ATTRIB -R -H -S C:\BOOT.INI
REM 添加DOS启动项(在[operating systems]节下)
C:\="MS-DOS 7.10"
REM 恢复文件属性
ATTRIB +R +H +S C:\BOOT.INI
方案二:NTFS分区的虚拟软盘启动方案
当系统分区为NTFS格式时(DOS不支持NTFS),需使用虚拟软盘技术:
-
创建DOS启动盘镜像
- 使用
FORMAT A: /S
制作启动盘
- 使用
RAWRITE
或WINIMAGE
创建镜像文件(DOS.IMG)
-
使用VFloppy配置虚拟启动
- 安装VFloppy工具并指向DOS镜像文件
- 程序自动修改BOOT.INI添加启动项:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP" /fastdetect
C:\VFLOPPY.SYS="MS-DOS (Virtual Floppy)"
方案三:使用第三方启动管理器(高级方案)
推荐使用System Commander或BootMagic:
- 支持多系统引导和分区隐藏
- 可在NTFS环境下创建独立DOS分区
- 提供更灵活的启动菜单定制功能
关键技术要点说明
-
BOOTSECT.DOS文件作用
- 存储DOS引导扇区信息的特殊文件
- 由NTLDR在启动时加载,实现DOS引导
- 大小固定为512字节(标准扇区大小)
-
NTLDR引导流程
BIOS → MBR → NTLDR → 读取BOOT.INI →
加载对应系统(Windows NT/2K/XP或BOOTSECT.DOS)
-
兼容性注意事项
- DOS无法访问NTFS分区,需单独FAT32分区存放DOS程序
- 部分老旧DOS程序可能因硬件抽象层差异无法运行
- 大于64MB内存需在CONFIG.SYS中设置
HIMEM.SYS
参数
自动化解决方案
使用"MS-DOS 7.10完整安装版"可实现自动化配置:
- 自动检测系统环境并创建BOOTSECT.DOS
- 智能修改BOOT.INI文件
- 集成常用DOS工具和驱动程序
- 支持FAT32大分区和长文件名
通过以上方法,可在Windows NT/2000/XP系统中实现纯DOS环境的启动,解决传统DOS程序的兼容性问题。选择方案时需根据系统分区格式(FAT32/NTFS)和具体需求进行技术选型。