中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-13 03:26
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » Original: Introductory DOS Boot Tutorial (1): The Boot Process
Printable Version  5,150 / 25
Floor1 yiyesong Posted 2002-11-12 00:00
元老会员 Posts 632 Credits 1,987
Mastering some simple knowledge of DOS boot principles has far-reaching significance. It is very helpful both for DOS itself and for system maintenance under WINDOWS (in fact, the initial startup of WINDOWS is also like this). I will try to introduce this knowledge bit by bit in plain and easy-to-understand language. I hope that forum friends with some basic DOS knowledge can gain a deeper understanding of DOS from this. Once you understand these things, you will find that solving problems during computer startup is so simple.

Keywords: BOOT、IO.SYS、MSDOS.SYS、COMMAND.COM、CONFIG.SYS、AUTOEXEC.BAT、SYSINIT、DOSINIT、CMDINIT

MS-DOS consists of the boot loader (BOOT) and three layers of modules (IO.SYS, MSDOS.SYS, and COMMAND.COM). A disk storing these files is called a DOS system disk.
So-called booting DOS means loading the 3 basic DOS modules on the disk into main memory, and having them direct the various parts of the computer to work in coordination. IO.SYS and MSDOS.SYS are two hidden system files. When using the DIR command to list the directory, the user can only see the COMMAND.COM file, but cannot see these two files.
The bootstrap program in ROM-BIOS first tests the floppy drive boot device, then tests the hard disk (this is the preset setting; if the boot order set in BIOS is not A, C, CDROM, then it is slightly different, but the basic principle is similar). The purpose of the test is to determine which device will guide the boot process. No matter whether the system disk is a floppy in drive A or a hard disk in drive C, the bootstrap
program always first reads physical sector 0 of that disk into memory. But there are still some differences at the very beginning between booting from a floppy and booting from a hard disk.
For floppy booting, what is read in is the DOS boot sector, so the BOOT boot loader is executed immediately; for hard disk booting, since what is read in first is the hard disk master boot sector, the master boot program in it must be executed first; it finds the DOS primary partition, that is, the partition that can be activated, and only then can the DOS boot sector of that partition be read in, after which execution switches to the BOOT boot loader. After that, the entire boot process is exactly the same.
The BOOT program checks whether the two files IO.SYS and MSDOS.SYS exist, whether they are the first two files, and whether IO.SYS is in the first position. After this check is completed and confirmed correct, it reads the IO.SYS module into main memory, and control is transferred to the initialization program SYSINIT. It initializes basic input/output management, reads the DOS kernel module MSDOS.SYS into memory, calls the kernel initialization program DOSINIT, and completes kernel initialization. After this, it returns to SYSINIT to execute the system configuration file CONFIG.SYS, setting up the system environment, then reads the command processor module COMMAND.COM into memory, and only then hands control over to CMDINIT.
CMDINIT does some related initialization work, then checks whether the AUTOEXEC.BAT file exists. If that file exists, it is executed. Finally, control is handed over to the transient module CCPT of COMMAND.COM, the DOS prompt appears on the screen, and the entire boot process is complete.
As for booting from a CD, it simulates floppy booting. Usually a floppy disk image file is placed on the CD, and its basic principle is the same as booting from a floppy.

The boot process is as follows:

hard disk
ROM-BIOS—bootstrap program—read sector 0 of the boot disk———— hard disk master boot sector—master boot program
| |
|floppy |
|disk |
|_____________________________________|
_______________________________________|
|
|
DOS boot sector—BOOT program checks the first two basic files—read in IO.SYS module——
SYSINIT program initializes the BIOS module—read in and locate MSDOS.SYS—execute CONFIG.SYS
| |
___________________________________________| read in COMMAND.COM—BIOS module
| |
MSDOS.SYS—DOSINITT program—initialize the kernel—kernel module |
_________________________________________________________|
|
COMMAND.COM—CMDINIT program performs initialization—execute AUTOEXEC.BAT—display DOS prompt
—transient module (CCPT)
—resident module (CCPR)
















Floor2 yiyesong Posted 2002-11-12 00:00
元老会员 Posts 632 Credits 1,987
Please give your opinions on this article. If the difficulty level is not too high, then in later tutorials I will continue introducing the boot process of the individual modules such as IO.SYS, MSDOS.SYS, COMMAND.COM, etc. If it feels too hard to take in, I will stop here.
Floor3 hjz123 Posted 2002-11-13 00:00
初级用户 Posts 10 Credits 130
It's a bit difficult, but I hope you can keep going.
Floor4 Darknight Posted 2002-11-13 00:00
初级用户 Posts 1 Credits 102
I downloaded “E/OS LX0.2” from the “System Enhancement” section and found that this system does not include boot files such as IO.SYS, MSDOS.SYS, COMMAND.COM, so how do you install and boot E/OS? Please let me know.
Floor5 yiyesong Posted 2002-11-18 00:00
元老会员 Posts 632 Credits 1,987
Please continue following Boot Tutorial (2) and (3).
Floor6 MYS Posted 2002-11-18 00:00
元老会员 Posts 1,637 Credits 5,170 From 广东佛山
As Wengier said: E/OS LX runs under DOS. It needs HIMEM.SYS loaded but does not need EMM386, and you run its WIN.EXE to start it, just like the old WINDOWS3.X.
But on my machine it hangs halfway through, so I can't tell you any more.
Floor7 流氓企鹅 Posted 2002-11-18 00:00
中级用户 Posts 82 Credits 312
Does it freeze halfway through booting?
Floor8 MYS Posted 2002-11-18 00:00
元老会员 Posts 1,637 Credits 5,170 From 广东佛山
Yes, not sure whether it's a hardware conflict or what, it seemed to be a display problem, I don't remember clearly.
Floor9 流氓企鹅 Posted 2002-11-18 00:00
中级用户 Posts 82 Credits 312
Mine is the same too
Floor10 水因缘 Posted 2002-11-20 00:00
初级用户 Posts 2 Credits 104
Same as the previous post
Floor11 zhangyl Posted 2003-06-06 00:00
初级用户 Posts 2 Credits 111
As a little newbie, I really do feel it's a bit difficult, hehe. I feel it would be better to talk about something a little simpler. Moderator, what do you think? I really want to learn DOS well, but I'm slow-witted and not very hardworking, so............. hehe Thanks for the hard work, moderator. Please don't throw eggs at me. I admit I'm a newbie................... I will keep coming to this forum to learn
Floor12 柏仔 Posted 2003-06-06 00:00
初级用户 Posts 100 Credits 478
Good
learned something
Floor13 wxp01 Posted 2003-06-07 00:00
初级用户 Posts 11 Credits 152
I can't quite understand it. Please teach me how I can learn well.
Floor14 89155380 Posted 2003-06-08 00:00
初级用户 Posts 7 Credits 132
Bump
Floor15 nbh002 Posted 2003-06-08 00:00
中级用户 Posts 67 Credits 396
I basically understood it, it's just that I still don't know much about these three things, SYSINIT, DOSINIT, and CMDINIT. I hope they can be explained in detail along the way in the later (2) and (3)!!!
Strongly bumping this thread!!!
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023