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 09:00
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Original: Introductory DOS Boot Tutorial (1): The Boot Process View 4,873 Replies 25
Original Poster Posted 2002-11-12 00:00 ·  中国 湖北 随州 电信
元老会员
★★★
Credits 1,987
Posts 632
Joined 2002-10-27 00:00
23-year member
UID 73
Gender Male
Status Offline
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)
















http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
Floor 2 Posted 2002-11-12 00:00 ·  中国 上海 教育网
元老会员
★★★
Credits 1,987
Posts 632
Joined 2002-10-27 00:00
23-year member
UID 73
Gender Male
Status Offline
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.
http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
Floor 3 Posted 2002-11-13 00:00 ·  中国 新疆 塔城地区 电信
初级用户
Credits 130
Posts 10
Joined 2002-11-09 00:00
23-year member
UID 201
Gender Male
Status Offline
It's a bit difficult, but I hope you can keep going.
Floor 4 Posted 2002-11-13 00:00 ·  中国 北京 东城区 联通
初级用户
Credits 102
Posts 1
Joined 2002-11-13 00:00
23-year member
UID 240
Gender Male
Status Offline
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.
Floor 5 Posted 2002-11-18 00:00 ·  中国 湖北 随州 电信
元老会员
★★★
Credits 1,987
Posts 632
Joined 2002-10-27 00:00
23-year member
UID 73
Gender Male
Status Offline
Please continue following Boot Tutorial (2) and (3).
http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
Floor 6 Posted 2002-11-18 00:00 ·  中国 广东 佛山 三水区 电信
元老会员
★★★★
Credits 5,170
Posts 1,637
Joined 2002-10-16 00:00
23-year member
UID 8
Gender Male
From 广东佛山
Status Offline
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.
我的网志
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos
Floor 7 Posted 2002-11-18 00:00 ·  中国 浙江 宁波 联通
中级用户
★★
imp
Credits 312
Posts 82
Joined 2002-11-09 00:00
23-year member
UID 204
Gender Male
Status Offline
Does it freeze halfway through booting?
Floor 8 Posted 2002-11-18 00:00 ·  中国 广东 佛山 三水区 电信
元老会员
★★★★
Credits 5,170
Posts 1,637
Joined 2002-10-16 00:00
23-year member
UID 8
Gender Male
From 广东佛山
Status Offline
Yes, not sure whether it's a hardware conflict or what, it seemed to be a display problem, I don't remember clearly.
我的网志
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos
Floor 9 Posted 2002-11-18 00:00 ·  中国 浙江 宁波 联通
中级用户
★★
imp
Credits 312
Posts 82
Joined 2002-11-09 00:00
23-year member
UID 204
Gender Male
Status Offline
Mine is the same too
Floor 10 Posted 2002-11-20 00:00 ·  中国 山东 潍坊 联通
初级用户
Credits 104
Posts 2
Joined 2002-11-20 00:00
23-year member
UID 292
Gender Female
Status Offline
Same as the previous post
Floor 11 Posted 2003-06-06 00:00 ·  中国 河南 洛阳 联通
初级用户
Credits 111
Posts 2
Joined 2003-06-06 00:00
23-year member
UID 3901
Gender Male
Status Offline
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
Floor 12 Posted 2003-06-06 00:00 ·  中国 广东 珠海 教育网
初级用户
★★
DOS爱好者
Credits 478
Posts 100
Joined 2003-04-22 00:00
23-year member
UID 1648
Gender Male
Status Offline
Good
learned something

|||||||  寻人启示:姓名:
| c●● ~年龄:20,性别:男
|  ♂▃~ 特征:帅.很帅.酷.特别酷....
| |︺英俊潇洒.风流倜傥,玉树临风→我

单钓E时代论坛
Floor 13 Posted 2003-06-07 00:00 ·  中国 河南 新乡 联通
初级用户
Credits 152
Posts 11
Joined 2003-06-07 00:00
23-year member
UID 4100
Gender Male
Status Offline
I can't quite understand it. Please teach me how I can learn well.
Floor 14 Posted 2003-06-08 00:00 ·  中国 云南 西双版纳傣族自治州 景洪市 电信
初级用户
Credits 132
Posts 7
Joined 2003-06-08 00:00
23-year member
UID 4443
Gender Male
Status Offline
Bump
Floor 15 Posted 2003-06-08 00:00 ·  中国 山东 潍坊 联通
中级用户
★★
Credits 396
Posts 67
Joined 2002-12-03 00:00
23-year member
UID 390
Gender Male
Status Offline
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!!!
Forum Jump: