China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 12:54
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » DOS Application Tips - Quickly Restore Win2k (or XP) Boot Startup DigestI View 15,610 Replies 28
Original Poster Posted 2002-10-21 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
Learning DOS is useless??? You're wrong. DOS is the foundation of computers. Sometimes, if you don't understand DOS, you'll be at a loss when encountering some problems. If you know a little about DOS, then the following problem will be easy to handle.

Windows has developed to the present, and it seems to gradually get away from DOS. Windows ME has no DOS mode, and Windows 2000, Windows NT, Windows XP are even more so. But actually, they still came along the path of DOS.
Windows ME can be patched to retrieve the DOS mode hidden by "Bill the B@stard".
For systems like Windows 2000, at least the installation requires using DOS, right?! (Some people say that it can be installed under Windows systems like Windows 98?!) Oh, then where was its Windows 98 installed? It was still DOS!
Moreover, the following problem was perfectly solved under DOS. So, DOS is very important.
Problem: How to quickly restore the Windows 2000 (or XP) boot menu?
Many people like to install dual systems, Windows 98 (C drive) + Windows 2000 (D drive). When reinstalling Windows 98 (referring to the complete reinstallation method of formatting the C drive), you can't return to the boot menu of Windows 2000.难道 reinstall Windows 2000 again? Or some articles say that you can also find back the boot menu of Windows 2000 without completely reinstalling Windows 2000. But the incomplete reinstallation also takes a long time. (I don't adopt this method, so I won't explain it much. If you are interested, you can find relevant information by yourself to know why I say so.)
Solution:
Use this small batch file I made under DOS, which can be done in a few seconds! The specific operations are as follows:
  1. Enter the w2k directory (you can run it directly on the CD or copy it to your hard drive and run it), and run setup.bat
2. If it prompts that smartdrv.exe is not loaded and asks if you want to continue, press Enter and select continue! (Don't pay attention to it. We don't plan to install Windows 2000 and don't need to copy too large files. It's okay not to install it. But if you want to install Windows 2000, you must load smartdrv.exe first, otherwise the installation time will be so long that you'll want to cry!!!)
  3. If it prompts that disk1 or something is not found, also don't pay attention to it, press Enter. Still not working? Press F3 twice to exit. (Failed? No, it's fine. What we want it to do, it has already done. It has nothing to do with it anymore. Why stay in it if you don't exit?)
  4. After exiting, it will restart the computer.
  5. You see, the boot menu of Windows 2000 is back, right?
6. Since I'm using the English version of Windows 2000, so that winnt.exe is in English interface. You can find the Chinese version of winnt.exe, ntldr, ntdetect.com to replace it by yourself, and add the bootfont.bin file, and it will be in Chinese interface.
  7. The boot.ini file I used is applicable to the situation of Windows 98 (C drive) + Windows 2000 (D drive).
   If your Windows 2000 is installed in drive E or F, please change it yourself:
   If installed in drive E, change all partition(2) in boot.ini to partition(3)
   If installed in drive F, change all partition(2) in boot.ini to partition(4)
   If your Windows 2000 is installed in drive C or D of the second hard drive, please change it yourself:
If installed in drive C of the second hard drive, change rdisk(0)partition(2) all to rdisk(1)partition(1)
If installed in drive D of the second hard drive, change rdisk(0)partition(2) all to rdisk(1)partition(2) 
And so on... Note that you should change the number after RDISK, not the number after DISK! Don't change it wrong!!!
   8. If it's Windows XP, just copy ntldr and ntdetect.com under Windows XP over and modify boot.ini, don't use winnt.exe under Windows XP, otherwise it won't install.
  
Thus, even the latest version of Windows, XP, is also inseparable from DOS...
If you don't understand DOS, then you'll go to pain! Hehe...

Attachment 1: File list
ATTRIB.COM --Tool to modify file attributes
BOOT.INI   --Boot menu
DOSNET.INF  --A file required for Windows 2000 installation
NTDETECT.COM --A file required for Windows 2000 startup
NTLDR     --A file required for Windows 2000 startup
SETUP.BAT   --The batch file I made
SHUTDOWN.COM --Soft shutdown tool
TDEL.EXE   --Enhanced DEL command
WINNT.EXE  --Windows 2000 installation program

Note: The several DOS enhanced tools used here can be found in my FTP, or in the New DOS Paradise (a beautiful new DOS era) (http://www.cn-dos.net/newdos/dosmain.html or http://wendos.my163.com/).

Attachment 2: Content of boot.ini file:

Timeout=3
Default=multi(0)disk(0)rdisk(0)partition(2)\WINNT

multi(0)disk(0)rdisk(0)partition(2)\WINNT="Windows 2000 Server"
C:\="Microsoft Windows"

Attachment 3: Content of setup.bat file
@echo off
copy ntldr c:\>NUL
copy ntdetect.com c:\>NUL
winnt
attrib -h -s -r -a c:\boot.ini>NUL
tdel c:\$win_nt$.~bt/s/y/q
tdel c:\inf000.swp/y/q
copy boot.ini c:\>NUL
shutdown -r
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 2 Posted 2003-06-12 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
2002-07-14 02:37
--------------------------------------------------------------------------------



http://www.3382.net/cgi-bin/topic_show.cgi?id=95828&h=1&bpg=1&age=0
What to do if bootsect.dos is accidentally deleted? Can't boot into 98...

BTW: The original text seems to have an error. The author mistakenly wrote "bootselt.dos" instead of "bootsect.dos". I accidentally took a glance just now, and it was almost incomprehensible, haha.

//---------------------------------------------------------------

Subject: About methods to restore (or perform a clean install of) the WinXp OS Loader.
BY: Wwashington@COC, Board: Software Usage Exchange. 2002/07/14.

//---------------------------------------------------------------

Origin: What to do if bootsect.dos is accidentally deleted? Can't boot into 98...

//---------------------------------------------------------------

gaochen wrote: ==>
> Strictly speaking, it should be BOOTSECT.DOS. The recovery method is as follows:
> 1. Boot the computer with a Win98 boot floppy, and at the command prompt, enter A:\sys c:
> 2. Remove the floppy, restart the computer, and check if 98 can boot normally. After confirmation, use
> the WinXP CD-ROM, and boot into WinXP.
> 3. After the WinXP installation program is started, press the R key to select repairing the existing installation, then select the M key
> to manually repair.
> 4. In the repair options, only select the check item for BOOTSECT, and the others can be not selected.
> 5. It may require you to insert the repair disk in the middle. If not, press the L key, and the installation program will automatically search.
> 6. After repairing the MBR, restart the computer. It should be okay.
> (Since it's all from memory, if there are any errors in specific names or key symbols, follow the instructions of the installation program
> to do.)

//---------------------------------------------------------------

Hehe, the method gaochen said is correct. But in practical application, there's no need to be so troublesome looking for the CD. I often don't know where the CD is thrown, hehe. This fault essentially is restoring the boot sector, which is equivalent to not installing Xp but only installing the boot record. My steps are as follows:

1) First, expand this compressed package and put the executable file into c:\winnt\ldr\w2k
2) Boot with a Win98 SE floppy, first run fdisk /mbr, then sys a: c:
3) cd c:\winnt\ldr\w2k
4) winnt {It will prompt that the installation file is not found, it's okay, press F3 to exit and restart}
5) Now the boot menu is back, hehe. Enter the original system, then edit boot.ini.
6) Summary: The winnt.exe in Win2k and Winnt both have the function of writing the boot record and boot.ini (adding a line: Upgrade/Install WinXX...). These two files are very small, even without compression, they are only 200K.
7) Note: I have successfully added the os loader (for all ms os) using the installation files of nt4 and win2k, but the files in WinXP seem to have been changed and can't take effect. It is recommended to use Win2k's, it can add the correct boot record for Winnt/Win2k/WinXP, provided that the relevant boot files are in your root directory. As for the boot files, it's best to use XP's currently, because the low-version ntldr and ntdetect.com don't recognize later XP.
8) Strictly speaking, the above are all nonsense, you just need to remember this passage.
Boot record: Use Win2k's winnt.exe + dosnet.inf to add.
Boot file: Use WinXP's ntdetct.com + ntldr + bootfont.bin.
9) Understand the above principles, and you don't need to carry the CD with you all the time. And it can also be used for more advanced uses (my old work published in Tsinghua, hehe), that is: About the skills of not installing nt/2k/xp, only installing the os loader. It's an antique from many years ago, too lazy to rewrite, the principle is the same.
A) To facilitate everyone's reading, I put the previous article in the Txt directory. Only if you really like to study Tech and are not afraid of boring documents, then go in and have a look, otherwise you will get a headache.

//---------------------------------------------------------------

wwashington edited on 2002-07-14 03:43

=====================
KO's words: There was a similar article in the Fuyun forum originally...
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 3 Posted 2003-06-12 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
After reading it the first time, I felt I understood it. After reading it the second time, I felt confused. I'll go back to see if I can, and when I read it the third time, there's only one question. Should the same recovery apply to WINXP + WIN98 in this operation?
==================
KO said: Indeed so. It should be able to recover the same for WINXP + WIN98!


Here I post another one that doesn't need all the above "troublesome" things. Only need the Windows 2000 installation CD to quickly recover the dual-boot menu of the system!

The most attractive place of Windows 98 is undoubtedly its perfect PnP and colorful multimedia functions, while the most attractive place of Windows 2000 is its stronger security, excellent stability and powerful network functions. Therefore, many users have established a dual-boot system on their own hard drives, and can also change the order of dual-boot by modifying the boot.ini file. But after reinstalling Windows 98, you will find that the original dual-boot menu is gone, and you can't enter Windows 2000. Even if you modify the boot.ini file, it's useless. Then how should we recover the dual-boot configuration of Windows 98 and Windows 2000?
Let's analyze the principle of dual-boot. The content of the disk boot sector determines the way the system boots. But in the case of dual-boot, the content of the boot sector depends on the installation order of each operating system. For example, if Windows 98 is installed first, then the boot sector is the boot sector of Windows 98, which will load io.sys when running to complete the normal boot work. If Windows 2000 is installed after Windows 98 is installed, then the original boot sector will be overwritten by the boot sector of Windows 2000. But in order to realize dual-boot with Windows 98, Windows 2000 does not delete the content of the Windows 98 boot sector, but saves it in a file named bootsect.dos. Moreover, when the Windows 2000 boot sector runs, it no longer loads io.sys, but loads ntldr (a hidden file located in the root directory of the hard drive), and then ntldr reads the boot.ini file also located in the root directory of the hard drive to check if there are other operating systems. If there are, it will display a boot menu, prompting you to choose to boot Windows 2000 or boot Windows 98. If you choose to boot Windows 98, then ntldr will run the file bootsect.dos, that is, the saved boot sector of Windows 98, to perform the normal boot work of Windows 98. But if Windows 98 is reinstalled at this time due to the crash of Windows 98, etc., the boot sector of Windows 2000 will be overwritten by the boot sector of Windows 98 again, so it will no longer load ntldr and boot.ini, and of course dual-boot can't be realized.
According to the above analysis, we can see that the content of the hard drive boot sector is the most crucial factor, which determines whether dual-boot can be realized. If it is restored, then dual-boot is restored. Although some system files can be recovered by copying, the boot sector must be automatically updated by the system installation program. Therefore, the specific method to recover the dual-boot of Windows 98 and Windows 2000 is:
1. Boot Windows 98, put in the Windows 2000 installation CD. After the welcome installation screen of Windows 2000 appears, select the second item, that is, "Install new Windows 2000 (clean installation)", and directly click the "Next" button in each dialog box to accept the default settings of the system (among them, especially pay attention not to select "Copy all installation files from the installation CD to the hard drive" in "Advanced options"). Then you will see that the system will quickly perform the pre-installation detection, and the process of copying installation files is also very fast (because it only needs to copy very few files from the CD), and finally the installation program will give a dialog box "Restarting the computer", please immediately click the "Don't restart" button to exit the installation process.
2. If you are not "quick-eyed and quick-handed" so that the system restarts, it doesn't matter. You will see a boot menu, including the following 3 items:
Microsoft Windows 2000 Professional
Microsoft Windows 2000 Professional Setup
Microsoft Windows
Choose the first item or the third item (don't choose the second item, otherwise Windows 2000 will continue to install its few files). Finally, the installation program will give a dialog box "Restarting the computer" (as shown in the attached installation). After the system boots, enter the C drive, and you will find that some installation files of Windows 2000 are added to the root directory, including a folder $win_nt$.~bt and 5 files $drvltr$.~_~, $ldr$, boot.bak, bootsect.dat and txtsetup.sif, etc. There will also be a disk acceleration file $drvltr$.~_~ added to other disk partitions, and they can be deleted.
3. Modify the boot.ini file to remove the "Microsoft Windows 2000 Professional Setup" boot menu item. The method is also very simple. Change "default=C:\$WIN_NT$.~BT\
BOOTSECT.DAT" in the section to "default=C:\" (Windows 98 is the default system) or "default=multi(0)disk(0)rdisk(0)partition(1)\WINNT" (Windows 2000 is the default system), and then directly delete the line "C:\$WIN_NT$.~BT\BOOTSECT.DAT=“Microsoft Windows 2000 Professional Setup”" in the section.

=============
KO said:
I heard some netizens comment that it's too "troublesome". It's very easy to recover with a Windows 2000 CD... Just happened to see this method that only needs a Windows 2000 CD. So I reprinted it.

But I want to say that the method on my roof, that is, the method when there is no need for a Windows 2000 CD.
Generally, after I install win98 and win2000, I will clone a system backup respectively with ghost.
Specifically, you can have a look at "This is how I manage my hard drive. "
http://www2.zzu.edu.cn/ie/newdos/dispbbs.asp?boardID=10&replyID=17676&ID=2844&skin=1

When reinstalling the system later, you can do without the CD, and directly restore it with ghost.
So, the above method of mine is for the small convenience of "without the CD".

Then restart the computer, and your system can perform dual-boot again.




ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 4 Posted 2003-06-12 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
Generally speaking, the boot records on different machines are different (unless different machines use the same hard disk, the same size, the same FAT format, and are all just formatted). So the boot record is unique to the machine, and you can't copy it from someone else's machine, but you can copy the boot record of your own hard disk out and copy it back when necessary.

The main boot area of the hard disk stores the system's main boot information and partition information. The system boot area stores parameters such as the DOS or Windows boot system, partition size, partition FAT table, number of sectors per track, and number of hidden sectors. After reading this, you should know that copying someone else's bootsect.dos and so on is in vain.


Hehe, in order to help you understand what the boot record is and how to back up the boot record (that is, what you said about copying it from other places), I found two articles from Google. I hope you can roughly take a look and have some understanding. I believe that after you repair your boot area, you will already be an expert in system boot.

1) How to back up the hard disk boot area, author: Han Ping from Guangdong Zhanhua Group Corporation
http://www.ccw.com.cn/htm/app/salon/001227_5.asp

=============================================
KO's words: The second article can't be found. It was originally published on Shangdu Information Port.
The title is CIH Hard Disk Data Recovery Method and Example, author unknown
=============================================

Done! It's really simple. I decompressed the file into any folder (there are those two files inside). First, use the 98 boot disk, then sys a: c:, then enter the unzipped folder, run winnt.exe, select installation, when prompted that the file is not found, exit with f3, then restart, and then edit boot.ini, remove the extra installation options, and also remove the installation directory.

=============================================
KO's words: Of course, using my batch processing will be simpler! Hehe...
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 5 Posted 2003-06-25 00:00 ·  中国 广东 广州 白云区 电信
初级用户
★★★
Credits 1,480
Posts 377
Joined 2003-06-06 00:00
23-year member
UID 3875
Gender Male
Status Offline
It would be nice if there could be an automatic response........
欢迎大家访问我的主页!
精品.爱好http://iso.533.net
Floor 6 Posted 2003-06-25 00:00 ·  中国 四川 成都 中移铁通
高级用户
★★
Credits 617
Posts 115
Joined 2003-06-04 00:00
23-year member
UID 3497
Gender Male
Status Offline
A great post must be bumped!
Floor 7 Posted 2003-06-25 00:00 ·  中国 重庆 电信
银牌会员
★★★
Credits 2,202
Posts 499
Joined 2003-06-12 00:00
23-year member
UID 4876
Gender Male
Status Offline
I've tried connecting six or seven times, but I can't get connected. I'm currently in area C with Windows 2000, and I want to install Windows 98 in area D. I need to copy the Windows 2000 files to restore, but I really don't want to wait.
Looking at DEBUG is like looking at something from another world! Do I save your setup.bat and boot.bin, and where do I put them?
Which parts should be changed and which shouldn't, I don't dare to change randomly, : ) Kind big brother, please help me according to my situation?
Thank you!
一年四季,枫叶红了又红;人生四季,失去的,还能再来吗?—— !
Floor 8 Posted 2003-06-26 00:00 ·  中国 四川 成都 中移铁通
高级用户
★★
Credits 617
Posts 115
Joined 2003-06-04 00:00
23-year member
UID 3497
Gender Male
Status Offline
Bump for you. By the way: Why can't my avatar be displayed? The size is appropriate.
Floor 9 Posted 2003-06-26 00:00 ·  加拿大 安大略省 多伦多
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is a quote from Mubai on 2003-6-26 10:27:48:
Bumping, by the way: Why can't my avatar be displayed? The size is appropriate.


It is estimated that it is because there cannot be Chinese characters in the URL address of the avatar.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 10 Posted 2003-06-27 00:00 ·  中国 四川 成都 中移铁通
高级用户
★★
Credits 617
Posts 115
Joined 2003-06-04 00:00
23-year member
UID 3497
Gender Male
Status Offline
"Probably because there can't be Chinese characters in the URL address of the avatar.."

——————Hahaha, sure enough so also
Floor 11 Posted 2003-06-27 00:00 ·  中国 山东 济南 广电网
中级用户
★★
Credits 364
Posts 95
Joined 2003-06-15 00:00
23-year member
UID 5250
Gender Male
Status Offline
Such articles are not very practical~~~

Experts find them too complicated, and novices get confused after reading them~~~

Just a personal view~~~
Floor 12 Posted 2003-08-10 00:00 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
22-year member
UID 7105
Gender Male
Status Offline
The must-pass path for middle - handers to climb up!!
Floor 13 Posted 2003-08-11 00:00 ·  中国 河南 南阳 联通
初级用户
Credits 219
Posts 23
Joined 2003-08-11 00:00
22-year member
UID 8405
Gender Male
Status Offline
What a long article!
Floor 14 Posted 2005-10-20 21:04 ·  中国 江苏 苏州 电信
初级用户
★★
Credits 125
Posts 72
Joined 2005-09-13 06:10
20-year member
UID 42467
Status Offline
Learned...........................
Floor 15 Posted 2005-10-23 20:26 ·  中国 湖南 湘潭 电信
新手上路
Credits 7
Posts 5
Joined 2005-10-10 18:55
20-year member
UID 43328
Gender Male
Status Offline
Originally posted by 雨浪飘零 at 2003-6-27 00:00:
This kind of article is not very practical~~~

Experts find it too complicated, and beginners get confused~~~

Just my two cents~~~

It feels just like that, it's too complicated, it would be better to be able to say it simply
Forum Jump: