2. MS-DOS BOOT PROCESS
Summary of the DOS Boot Sequence
POST
MBR
IO.SYS
MSDOS.SYS
CONFIG.SYS
COMMAND.COM
AUTOEXEC.BAT
Command prompt
3. BOOTSTRAP
Boot is short for bootstrap, which in olden days was a
strap attached to the top of your boot that you could
pull to help get your boot on.
Boot: the starting-up of a computer, which involves
loading the operating system and other basic software .
A cold boot is when you turn the
computer on from an off position.
A warm boot is when you reset a
computer that is already on
4. CPU's initialization
starts with the special boot program software that is in
the system BIOS ROM
Location: at the memory register FFFF0h of the
BIOS. This memory register location is at the end of
system memory.
Containing: a jump instruction that moves execution
to the location of the BIOS start-up program. This
program runs a Power-On Self Test (POST)
5. Bios check
BIOS (Basic Input Output System) :
is a set of OS-independent programs in ROM that
configure the system, seek and boot an operating system
(OS)
The BIOS typically looks to the CMOS chip to tell it
where to find the OS.
The first of these BIOS tasks = the Power On Self Test
(POST)
6. Power-On Self Test (POST)
Note: The system will skip the POST if you perform a
"warm" boot by pressing CTRL-ALT-DEL)
POST checks the hardware including:
Video Test: initializes the display adapter, tests the video
card and video memory, and displays configuration information or
any errors.
BIOS Identification: displays the BIOS version, date,
and manufacturer.
Memory Test: tests the memory chips. A running sum of
the amount of memory tested will display.
error message :indicates a faulty memory chip that will require
replacement.
7. If the POST does not detect a battery failure, it then continues
to initialize the CPU:
PCI Initialization – If you have a PCI bus the system will now
initialize the cards on the bus.
Configuration Display – The BIOS now tests and
displays the system configuration, including the status of:
CPU
Floppy drives
Mouse and keyboard ports
Serial ports
Parallel ports
Cache memory information
If not finding these things it gives an error:
1. on screen
2. by emitting a series of beeps through the pc built-in
speaker.
There are different varieties of BIOS, and each has its own BEEP codes, which are used
to diagnose problems during the boot process
If everything works, your computer will beep once and continue booting.
A "fatal" error will cause the BIOS to halt the boot process.
8. CMOS Check
CMOS (complementary metal oxide semiconductor).
settings that are held on a bettery-powered chip.
CMOS settings are configurable by
the user, and can be accessed at the
beginning of the boot process by
pressing a special key, such as F1 or
Delete.
9. CMOS
is a memory chip (only 64 bytes in size)
containing information such as date and time,
hard disk settings, etc.
A CMOS memory chip requires a very small
amount of current to retain its settings. A small
battery inside the computer supplies current.
Oftentimes, the first sign of a failure of the
computer’s battery will be the inability of the
computer to remember date and time settings.
10. Settings in CMOS
Settings in CMOS are accessed through a system setup
program included on the BIOS chip.
The motherboard manual will list the keystrokes
necessary to invoke the setup program. Most BIOS
programs will also list the keystrokes onscreen during
the boot process in the form of:
PRESS <DEL> TO ENTER SETUP
The order of drives that the CMOS looks to in
order to locate the OS is called the boot
sequence, which can be changed by altering the
CMOS setup.
Note:You need to be quick with these keystrokes, since the setup
program can usually be initiated only during the few seconds that
the boot process takes to complete.
11. a bit about Hard Disk Drives
In order to better manage the ever-increasing capacities of a hard-drive, a
scheme called partitionaning is created.
Partitioning: physically splits up the hard drive into chunks, or
"Partitions". Each partition has a 512byte chunk of data at the beginning
called the Boot Record.
Boot Record is the very first sector of the disk for every disk formatted
under DOS
Master Boot Record : MBR is a small 512 bytes partition which
is at the first physical sector of the hard disk. The location is
denoted as CHS 0,0,1 meaning 0th Cylinder, 0th Head and 1st
sector
MBR contains a small program known as bootstrap
program which is responsible for booting into any OSes.
12. MBR
For DOS systems, the MBR will point the computer to
two hidden start-up files:
1. IO.SYS (or for IBM computers, IBMBIO.COM).
This must be the very first file (physically) on your boot disk or
your disk will not boot.
2. MSDOS.SYS (or IBMDOS.COM).
This must be the second file (physically) on the boot disk or it
will not boot.
This is why you cannot create a boot disk by simply copying thse files to
blank floppy disk. They would be on the disk, but they would not be
in the proper position for the boot process to find them.
To create a "system disk", you need to use a particular
command that tells the computer to place these files in
the precise position needed for booting to occur
13. Boot code
The BIOS, now, loads the boot code found in the master boot record
and then transfers control of the system to it.
the boot code searches the root directory of the device being booted for
the operating system files that contain the operating system. For MS-
DOS, these are the files "IO.SYS", "MSDOS.SYS" and "COMMAND.COM".
The first place the BIOS will look is in the boot record for the drive listed
in CMOS as the first bootable drive (usually drive A:).
If no operating system files are found, the boot program will display an
error message similar to:
"Non-system disk or disk error - Replace and press any key when ready".
It means that the BIOS examined the floppy disk for example and just
rejected it because it couldn't boot an operating system.
If there is no disk in drive A: the system will then turn to the
next bootable device listed in CMOS (usually drive C:).
14. IO.SYS & MS-DOS.SYS
IO.SYS (or IBMBIO.COM) contains the interface between MS-DOS (or
PC-DOS) and the I/O subsystem.
This allows the OS to communicate with the basic peripherals and perform
input and output tasks.
it contains more BIOS software
MSDOS.SYS (or IBMDOS.COM) is the Kernel of the OS. It interacts
with the hardware and helps process the various DOS functions
contains: software to manage files, run applications software and interface
with hardware
Both IO.SYS and MSDOS.SYS are hidden files, which means that you
won't see them in a DOS dir comand normally , and
they would not appear in a directory listing.
This is to protect the OS from someone mistakenly deleting these key files
and rendering the computer unable to boot.
15. CONFIG.SYS
The third file to be loaded
this file contains information that helps to
configure your system. CONFIG.SYS is a text
file
This is where you would install devices and
drivers :mouse, sound card, and CD-ROM drive
installed here.
contains commands that tell DOS:
1. (FILE=) how many files it can open at any one time
2. (BUFFERS=) how many file buffers to create
3. (DRIVERS=)commands to load device drivers (small programs
that tell your computer how to communicate with devices such as
printers)
16. Device driver
any program which controls a device
are made permanently resident
are loaded as part of the CONFIG.SYS
E.x:The programs that make access to CD-ROM drives and
sound cards
their extension can be anything the
developer wants.
virtually all commercially available device drivers have an extension
of SYS, COM, or EXE.
Some drivers are available with the extension DEV
17. The syntax for loading a device driver in your
CONFIG.SYS is:
device=
if you have a device HIMEM.SYS in the directory
C:DOS, it will take a numeric parameter
to set the size of some buffer
you might load it with:
device=C:doshimem.sys 128
18. Parameters of devices
The question of which parameters a
given device driver allows or whether it allows
any: at all depends on the driver
and should be dealt with in the documentation for the
program in question
ANSI.SYS takes no parameters
VDISK.SYS takes parameters explained
in the DOS manual.
19. BUFFERS
diskette access & hard disk has access times are much slower than RAM
access times.
Disk caching sets aside some RAM to keep a copy of the
most recently accessed disk information
for example, if a database is continually accessing a disk, the first time
the disk is really read but the next time the copy in
cache memory will be read instead
DOS comes with some free rudimentary disk caching included. It keeps
N buffers of 512 bytes each.
By default N = eight (on most DOS systems)
You should certainly make this number larger by including the line:
BUFFERS=N ,10<N<25
20. Examples of Device Drivers
Device: a virtual file which can typically be written to and read from
Despite the name, the device command can load other programs which do not
control devices and
physical "devices" may not be devices in the sense of setting up a virtual file.
A mouse is a good example of something which is not a device in
this technical sense
The most common example :"con" which you typically read from when you issue
the command "copy con filename".
Devices can only be installed via the CONFIG.SYS.
The hidden file MSDOS.SYS sets up several devices even if you have no
CONFIG.SYS: con, prn, aux, lpt1, lpt2, lpt3, com1, com2.
LPTn and COMn are names for the parallel and serial ports
Con= short for console, is a combined keyboard/monitor device,
prn =printer
21. The FILES command
file handle :When DOS opens a file, it keeps certain information
in memory to be able to quickly access the file.
During boot up, memory is put aside for these file handles so a limit
is placed on the number of files that can be open at one time.
The default is eight
may seem adequate since programs normally close files when they
are done allowing the file handles to be reused
is often not adequate. DOS uses four of the handles itself for "files" like con
and prn. Thus there are four available for your programs
If DOS is asked to open a file and a handle is not available,
DOS issues an error message and the running program may even
abort.
place the line : FILES=40 in your CONFIG.SYS file.
If you are running Microsoft Windows then set the files=80.
22. COMMAND.COM
The fourth file to be loaded
is loaded into memory at the beginning of the boot process, and stays resident in
memory at all times.
This file does not need to be in any particular physical location on the
disk, but does need to be in the root directory.
This file is a command interpreter: In Unix (and Linux)= shell.
it interprets all of the Internal Commands= the commands that are used in writing
batch files: time , rename , path , cd , exit , cls
External commands:
some commands do not need to be loaded into memory every time you boot,
because they are used infrequently, or possibly because they are large and take
up a lot of space. These commands are stored as separate files in your C:DOS
directory : debug , help , find , edit
consists of 3 parts:
1. more code to manage Input/Output (I/O),
2. internal DOS commands such as COPY and DIR,
3. and a short program that looks for AUTOEXEC.BAT.
23. AUTOEXEC.BAT
The fifth, and last file to be loaded.
stands for "automatically executed batch" program.
1. holds a list of DOS commands that are automatically executed
each time DOS loads.
2. batch file:it contains a series of commands that are executed whenever
the file is run.
If there is no AUTOEXEC.BAT file present, a default version is run. if the
default version is run you will be asked to enter the date and the time.
After all of this, if it all works correctly, you will finally
see the prompt, which will most likely look like one of
these:
A:>
C:>
24. Booting windows
If any of the Windows 95/98/ME
versions were being started, the above
would only be the beginning of the
startup process.
For loading these Windows versions,
there are many more routines for boot
process: reading the system registry,
initializing hardware devices and
starting the graphical user interface
and …