Hi there, askamillion.
I will attempt to address the boot process at the higher level. Please
note that the MS-DOS bootup process has been largely the same since
MS-DOS version 3 or so. Most additions since then have been utilities,
such as DOSSHELL (a file manager), QBASIC (a programming language),
and so on.
When a computer is first turned on, before it even looks at the
operating system (in this case, MS-DOS), it performs what is called a
Power On Self Test, or POST. This involves it checking that everything
which is plugged in works - it tests the memory, disk drives, graphics
card, and so on. Once it is satisfied that these components are
working, it attempts to boot an operating system. If anything goes
wrong before trying to boot the operating system, you'll hear a series
of different beeps, which indicate an error.
On most computers, the first place it will look for an operating
system is the floppy disk drive. If a disk is inserted, it will
attempt to boot from that. But if there is nothing in the drive, it
will then query the Master Boot Record on the first hard disk in the
system (the master device on IDE channel zero).
The Master Boot Record is an area on the outermost cylinder of a hard
disk. It contains up to four entries which identify the types,
starting cylinder and sizes of up to four partitions on the hard disk.
One of these partition entries will be marked as "Active", and the
computer will then pass control to the boot sector on the active
partition.
The boot sector is the first sector on that partition, and is 512
bytes long. It contains the computer code required to start everything
else up. Essentially it just points to IO.SYS (see below) and tells
the computer how to start loading that. Other boot sectors do
different things, but this is what the DOS one does. This is the stage
where MS-DOS really takes over.
Four files are now dealt with. These are all located in the root
directory (C:\) of your active partition.
The first thing which loads is a file called IO.SYS. IO stands for
Input/Output, and this file does just that. It tells DOS how to
display on the screen, how to read keystrokes from the keyboard, how
to use the system memory, etc. This file must be present, or DOS will
not load.
After that, a file called MSDOS.SYS is loaded. This takes care of
higher level things - basically, how programs can get executed,
request memory, use files, and so on. This file must be present, or
DOS will not load.
At this point, if you press the F8 key rapidly, DOS will let you
choose exactly how to boot up. You can choose to ignore the commands
that follow in CONFIG.SYS and AUTOEXEC.BAT (see below), either
completely, or selectively.
Next, DOS searches for a file called CONFIG.SYS. This file contains
configuration options which let you customize DOS further. For
example, you could change your keyboard to a foreign key layout, load
a memory manager, or you could add support for your CD-ROM drive. This
file need not be present, but almost always is in a standard MS-DOS
installation.
After this, DOS then looks for a file called COMMAND.COM. This file is
known as the Command Interpreter. This provides the user interface -
in this case, it shows you the command prompt. When you type in a
command (for example, "DIR", or "CD \"), COMMAND.COM interprets it for
you, and passes the correct commands to MSDOS.SYS and IO.SYS in order
to get the information you request. COMMAND.COM does not load
completely - it only loads a small, necessary portion of itself; when
more is needed, that is loaded as necessary. This file doesn't have to
be present, but if it is not, you need to replace it with another
command interpreter (for example, 4DOS: http://www.jpsoft.com/ ).
Once COMMAND.COM has loaded, the last file in the boot process is
AUTOEXEC.BAT. This is a list of instructions that you could just as
well type at the command prompt. However, these instructions are
usually put in this file because you always need them when starting.
For example, you might choose to load a mouse driver in the
AUTOEXEC.BAT, or you may want to set your prompt colour to green.
Once AUTOEXEC.BAT has finished processing, you can be said to have
booted up!
So in summary: POST; look at the MBR; look at the boot sector on the
active partition; boot sector says to load IO.SYS; IO.SYS loads
MSDOS.SYS; CONFIG.SYS is consulted and the commands within are
executed; COMMAND.COM is loaded; AUTOEXEC.BAT is read and all the
commands within are executed.
I hope this answer was helpful to you. If anything is unclear, or I
haven't explained something as well as you would like, please don't
hesitate to request clarification before rating this answer!
Thanks, and good luck with your class.
--seizer-ga
Search strategy: Most of this came from personal knowledge. For extra
clarification of a few terms, I used Google's Glossary service to
obtain some extra information: http://labs.google.com/glossary |