During the boot process of the operating system occurs. Editing the boot of several Windows operating systems. Where is the BIOS stored and what is CMOS

login , which logs users into the system, is only run when the system itself is already fully operational and running normally. This does not happen immediately after the computer is turned on: Linux is a rather complex system, the objects of which enter the operating system - a stepwise process: the behavior of the computer at various stages of loading is determined by different people - from hardware developers to system administrators. Flexibility requirements for the system, the ability to change its settings depending on the hardware component, the need to solve various tasks using the same computer also make the boot process staggered: first, the profile future system and then this profile implemented.

The initial stage does not depend at all on which operating system installed on the computer, for some steps in each operating system offers their own solutions - for the most part, interchangeable. We will call this stage (initial) pre-system boot. Starting from a certain stage, the boot of the computer is already controlled by Linux itself, using utilities, scripts, etc. We will call this stage (final) system load .

ROM bootloader

Immediately after switching on, the RAM of a classic architecture computer is pristine. In order to start working, the processor needs at least some kind of program. This program is automatically loaded into memory from permanent storage device, ROM (or ROM, read-only memory), in which it is entered once and for all unchanged 1 Modern computers use programmable ROM, the contents of which can be changed, however, such a change is always considered an abnormal situation: for example, writing new version the contents of the ROM, in which the errors are corrected (upgrade).. AT specialized computers (for example, in cheap game consoles) everything that the user needs is recorded exactly on

Usually, in general-purpose computers, a program from ROM is not useful to the user: it is small, and it always does the same thing. You can slightly change the behavior of the program from the ROM by operating with the data recorded in non-volatile memory(sometimes called CMOS, sometimes NVRAM). Volume non-volatile memory is very small, and the data from it is saved after the computer is turned off due to autonomous power supply (usually, from a battery like a watch).

What should this initial program be able to do? Recognize the main devices on which another program - the user needs - can be recorded, be able to load this program into memory and transfer execution to it, and also support an interface that allows you to change settings in NVRAM. Actually, this is not even one program, but many subroutines dealing with interaction with a variety of I / O devices - both with those on which programs can be stored (hard and floppy disks, magnetic tapes and even network cards), and those through which you can communicate with the user (serial data ports - if it is possible to connect a console terminal, a system keyboard and a video card - for simple personal workstations). This set of routines in ROM is usually called BIOS(basic input-output system).

BIOS. Short for "Basic Input-Output System", a set of routines in ROM designed for the simplest low-level access to external computer devices. In modern operating systems, it is used only during the initial boot process.

This stage of loading the system can be called zero, since it does not depend on any system. Its task is to determine (perhaps with the help of the user) from which device the download will take place, download a special bootloader program from there and run it. For example, to find out that the boot device is a hard drive, consider the most the first sector of this disk and transfer control to the program located in the read area.

Boot sector and primary loader

Most often, the size of the primary disk loader - the program to which control is transferred after the zero stage - is very small. It is related to the requirements universality such kind of programs. You can read data from disk sectors, the size of which varies for different types of disk devices (from half a kilobyte to eight or even more). In addition, if one, the first, sector of the disk can always be read in the same way, then the commands for reading several sectors on different devices may look different. That's why primary loader usually occupies no more than one sector at the very beginning of the disk, in its boot sector.

If primary loader was bigger, he probably could figure out where the core is operating system, and could independently read it, place it in memory, configure and transfer control to it. However, the core operating system has a rather complex structure - and hence a difficult way to load; it can be quite large, and, worst of all, it can be located no one knows where on the disk, obeying the laws file system(for example, consist of several parts scattered across the disk). Take it all into account primary loader unable to. Its task is more modest: to determine where on the disk is the "big" secondary bootloader, download and run it. Secondary bootloader is simple, and it can be put in a predetermined location on the disk, or, at worst, put in a predetermined location accommodation map, which describes exactly where to look for its parts (size secondary bootloader is limited, so it is possible to build such a map).

Accommodation map. Representing an area with the required data (for example, secondary bootloader or the system kernel) as a list of disk sectors that it occupies.

For an IBM compatible computer, the size boot sector is only 512 bytes, of which not all are program region. boot sector IBM PC, called MBR( master boot record ), contains also disk partition table, the structure of which is described in Lecture 11. It is clear that a program of this size cannot boast a variety of functions. Standard on many systems boot sector can only count disk partition table, define the so-called boot partition( active partition ) and download the program located at the beginning of this partition. Each disk type can have its own MBR software part, which allows you to read data from any place on the disk, in accordance with its type and geometry. However, you can still read no more than one sector: it is not known what the installed on this partition is used for. operating system second and subsequent sectors. It turns out that the standard software part of the MBR is a certain preloader, which reads and runs the real primary loader from the first sector boot partition.

There are preloader versions that allow the user to independently choose which partition to boot from 2 For example, BOOTACTV from the pfdisk package or the standard FreeBSD preloader boot0 , which, by virtue of their pre-system, can be applied anywhere.. This allows for each of the installed operating systems keep own primary loader at the beginning of the section and freely choose among them. The standard Linux boot scheme takes a different approach: a simple primary loader is written directly to the MBR and the select function is passed secondary bootloader.

Primary Loader. The first stage of booting a computer: a program whose size and capabilities depend on the hardware requirements and BIOS functions. The main task is to download secondary bootloader .

Kernel loader

To the task operating system. As a rule, the kernel of the system is written to a file with a specific name. But how secondary bootloader read the file with the kernel, if Linux has this operation function kernels? This problem can be solved in three ways.

First, the kernel may not be a file on disk. If the download occurs over the network, it is enough to ask the server for "a file with such and such a name", and the answer will be a whole sequence of data containing the requested kernel. All file operations will be performed by the server on which the system is already loaded and running. In other cases, the kernel is "driven" into a section specially allocated for this, where it is no longer in the form of a file, but in the same continuous piece, the size and location of which are known. However, this is not customary in Linux, since there may not be room for a special partition on the disk of, say, an IBM-compatible computer.

Secondly, you can use the above accommodation card: represent the kernel as a set of sectors on the disk, write this set to a predetermined location, and force the bootloader to assemble the kernel from pieces on the map. Usage accommodation maps has two significant drawbacks: creation only possible under control already loaded systems, and change kernel must necessarily be accompanied by a map change. If for some reason the system does not boot in any of the pre-planned configurations, the only way to remedy the situation is to boot from an external medium (for example, from a laser disc). And the system may not boot precisely because the administrator forgot after changing the kernel, rebuild the map: the map contains a list of sectors that corresponded old kernel file, and after deleting the old file, these sectors can contain any kind of "garbage".

Third, you can teach secondary bootloader recognize the structure of file systems and find files there by name. This will significantly increase its size and require "doubling the functions" - after all, exactly the same, even more powerful, recognition will be in the

After turning on the computer, there is no operating system in its RAM. On its own, without an operating system, computer hardware cannot perform complex actions such as loading a program into memory. Thus we are faced with a paradox that seems unresolvable: in order to load an operating system into memory, we must already have an operating system in memory.

The solution to this paradox is to use a special little computer program called boot loader, or commands located in permanent memory (for example, on the IBM PC - reboot commands without any help). This software can detect devices suitable for booting and load from a special partition of the selected device itself (most often the boot sector) of these devices the OS loader.

Bootstrappers must comply with specific restrictions, especially with regard to volume. For example, on an IBM PC first level loader must fit in the first 446 bytes of the master boot record, leaving room for 64 bytes of the partition table and 2 bytes for the AA55 signature needed for the BIOS to detect the bootloader itself.

Story

Early computers had a set of switches that allowed the operator to place the bootloader in memory prior to starting the processor. This bootloader would then read the operating system from an external device such as punched tape or a hard drive.

The pseudo-assembler bootloader code can be as simple as the following sequence of instructions:

0: write number 8 into register P 1: check that the punched tape reader can start reading 2: if it cannot, go to step 1 3: read a byte from the punched tape reader and write it to the accumulator 4: if the punched tape is out, go to step 8 5: write the value stored in the accumulator to RAM at the address stored in register P 6: increase the value of register P by one 7: go to step 1

This example is based on the bootloader of one of the minicomputers released in the 1970s by Nicolet Instrument Corporation.

0: Write 106 to register P 1: Check that the punched tape reader can start reading 2: If it cannot, go to step 1 3: Read a byte from the punched tape reader and write it to the accumulator 4: If the punched tape has run out, go to step 8 5: write the value stored in the accumulator to RAM at the address stored in register P 6: decrement the value of register P by one 7: go to step 1

The length of the second level bootloader was such that the last byte of the bootloader changed the command located at address 6. Thus, after the execution of step 5, the second level bootloader started. The second-level loader was waiting for a punched tape length containing an operating system to be loaded into the punched tape reader. The difference between the first level loader and the second level loader was the checks for reading errors from punched tape, which were often encountered at that time, and, in particular, on the ASR-33 teleprinters used in this case.

Some operating systems, most notably the older (pre-1995) Apple Computer operating systems, are so closely tied to the computer hardware that it is not possible to boot any other operating system on those computers. In these cases, it is common to develop a bootloader that acts as a standard OS bootloader and then passes control to an alternate operating system. Apple used this method to run an A/UX version of Unix, and then it was used by various free operating systems.

Devices initialized by the BIOS

A boot device is a device that must be initialized before the operating system boots. These include input devices (keyboard, mouse), basic output device (display), and the device to be produced from - floppy drive, hard drive, flash drive, PXE).

Boot sequence for a standard IBM-compatible personal computer

Booting personal computer

Links

Wikimedia Foundation. 2010 .

See what "Loading the operating system" is in other dictionaries:

    The operating system loader is system software that ensures that the operating system is loaded immediately after the computer is turned on. Operating system loader: provides the necessary means for dialogue with ... ... Wikipedia

    This term has other meanings, see Core. The kernel is the central part of the operating system (OS), which provides applications with coordinated access to computer resources, such as processor time, memory, and external hardware ... ... Wikipedia

    For the term Task Scheduler, see other meanings. Task scheduling is one of the key concepts in multitasking and multiprocessing in both general-purpose operating systems and real-world operating systems ... ... Wikipedia

    It is a form of system software distribution. The presence of distributions is due to the fact that the form of software used to distribute it almost never matches the form of software running ... ... Wikipedia

    trusted boot feature personal computer to prevent unauthorized launch of the user, loading the operating system (OS) and gaining access to confidential information. Providing ... ... Wikipedia

    This article should be wikified. Please format it according to the rules for formatting articles ... Wikipedia

    Windows XP starts in the Internet phone machine In computer science, booting is a complex and multi-step process of starting a computer. The boot sequence is a sequence of actions that the computer must perform in order to ... Wikipedia

    The ability of terminal clients to safely boot the operating system. The main decision safe boot is to check the integrity and authenticity of operating system files that can be stored on a local hard drive, ... ... Wikipedia

    Main and backup ROM chips motherboard Gigabyte containing AWARD's BIOS. BIOS (eng. basic input / output system "basic ... Wikipedia

    Prefetcher operating system component Microsoft Windows, speeding up the process of its initial loading, as well as reducing the time it takes to launch programs. Prefetcher first appeared in the Windows XP operating system. Beginning with Windows Vista, he ... ... Wikipedia

A long time ago, when I was a kid working in an institute laboratory on a big computer SM-3 (something like the famous PDP-11), bootstrapping (loading) the computer looked like this. A short paper tape with a boot program punched into it was loaded into the photo reader, the reading process was started, and then ... as lucky.

The fact is that the paper tape gradually wore out, began to be poorly read, and the computer could “not start” the first time. In this case, the process had to be repeated, sometimes several times, until the end. When the tape finally failed and the machine did not want to "come to life" in any way, it was necessary to temporarily enter the boot program manually using the switches located on the front panel. Here, the main thing was not to rush and not to make mistakes.

On modern computers, the boot process is mostly automated, but this does not mean that it does not deserve to be familiarized with it.

Basic definitions and steps for loading an operating system

Turning on the computer, POST, BootMonitor

The initial stage of loading the operating system after turning on the computer begins in the BIOS (Basic Input / Output System - basic input / output system). In the BIOS settings, we specify a boot device, or a series of boot devices in order of priority. Various loading options and their combinations are possible: with hard drive, CD / DVD - disk, USB-flash and others.

Immediately after passing POST (Power-On Self-Test - self-testing after turning on), the computer's BIOS will begin to sort through the specified boot devices one by one until it finds a suitable special entry on one of them, which contains information on further actions.

Loader 1st level. Master Boot Record

Master Boot Record - The master boot record is located in the first physical sectors of bootable storage devices. It contains a Partition Table and executable code.

The main task of the program written in the MBR is to find the active system partition of the disk and transfer control to its boot sector. Thus, this stage can be called preparatory, due to the fact that the actual loading of the OS itself does not yet occur.

It is customary to call the system disk partition (storage device) on which the operating system files responsible for the OS boot process are located (the operating system itself can be located in another partition). In principle, there can be several system partitions, so one of them is marked as active. That is what the program loaded from the MBR is looking for.

Loader 2nd level. Partition Boot Sector

The next step in booting the computer is to transfer control to the executable code written in PBS (Partition Boot Sector - the boot sector of the active partition). The PBS is located in the first sector(s) of the corresponding disk partition. The PBS code contains the file name of the operating system loader, to which control is transferred at this stage.

The initial stage of loading the operating system. OS boot manager

The original Linux bootloader was LILO (Linux Loader). Due to its shortcomings, the main of which was the inability to understand the Linux file systems, later the GRUB (GRand Unified Bootloader) bootloader began to be used, in which the shortcomings of LILO were corrected.

If it's about Windows versions to Vista, such as Windows XP, Ntldr will be loaded. It, in turn, reads information from text file Boot.ini, which contains information about installed operating systems.

Loading the operating system kernel

The final stage of loading the operating system is loading the OS kernel and transferring control to it.

A few years ago in my practice there was such a funny case.

I was asked to help a man buy and fix a computer for his home. This comrade at that time had just retired, and before that he worked as a boss and saw the computer, for the most part, from afar, on the table of his secretary. After his retirement, he had the time and desire to master the computer. Well, I think it's great. We picked up a computer for him, inexpensive, but solid and with a good, for those times, monitor. I installed and configured some programs, showed how to use them. The gentleman got a book from the series “ Something for Dummies and we parted completely satisfied with each other.

About a week later, my ward called me on the phone and almost cried that everything was gone and the computer no longer works. Fortunately, he did not lock himself up and honestly told how it was. And it was like that. The comrade climbed to investigate the contents of his computer and found several suspicious and "unnecessary" files in the root of the C:\ drive. He decided to free up space and simply deleted these files. I think that everyone has already guessed that these were boot.ini, ntldr, ntdetect, etc. It was not difficult to correct the situation, except that I had to go to him again.

By the way, in order to get problems with loading Windows XP, it was possible not to erase anything, but to slightly “correct”, for example, boot.ini.

Apparently Microsoft somehow found out about this case and in the next version of its OS decided to hide the bootloader files better.

Features of loading operating systems Windows Vista / 7 / 8

On Windows Vista or Windows 7/8, the boot manager is called Bootmgr. It reads the list of installed operating systems not from a simple text file, which is boot.ini, but from the BCD (Boot Configuration Data) system storage, which is accessed through a special utility bcdedit.exe.

But that is not all. Open "Computer Management" -\u003e "Disk Management"\u003e

The process of standard installation of the Windows Vista / 7 / 8 operating system creates an additional "System Reserved" partition at the beginning of the disk. It is not assigned a drive letter, due to which, if no additional steps are taken, the partition itself and its contents will be hidden from the user. This main partition has the status "System" and "Active" and, therefore, cannot be deleted either.

In Windows 7, the size of such a partition is 100 MB, of which about 30 MB are occupied, in Windows 8 it is already 350 MB, and 105 MB of them are occupied. This difference is explained by the fact that in Windows 8 the “Recovery” folder has been moved to this partition.

Let's see the contents of the "Reserved by the system" section. To do this, assign a drive letter to it, for example, "W" in "Disk Management". In addition, open the "Control Panel" -\u003e "Folder Options" and on the "View" tab, uncheck "Hide protected operating system files" and check "Show hidden files, folders and drives".

If the system has file manager FAR Manager, then you can use it to view it and not bother with setting the visibility of hidden files.

This is what the contents of the System Reserved section look like in Windows 8 >

As expected, at the root of the partition we see the Bootmgr bootloader.

And this is what part of the contents of the “Boot” folder looks like>

In the folder we find the BCD boot configuration data store database and its accompanying folders with language and font files.

To complete the picture, it remains to say which partition is called boot. The answer is already shown in the picture with Windows volumes 7. Obviously, this is the partition on which all the main files of the operating system are located.

Well, it’s very easy to remember the names of disk partitions according to the “everything is the other way around” principle - there is no system (operating) on ​​the system one, but the third-level bootloader is located, on the bootloader there is just no bootloader, but the system itself is located. Naturally, this "reminder" only works when there are several sections. If there is only one partition, then it can be immediately system, active and bootable.

The main task of the level 3 boot loader, which, depending on the type of OS, is Bootmgr, Ntldr, or GRUB, is to read from the boot disk and load the operating system kernel. In addition, in the case of multiple boot, when several operating systems are installed on the computer, the 3rd level loader allows you to select the one you need each time you start the computer.

A classic mistake that Microsoft has dedicated to is installing Windows XP after Windows Vista/7/8. The Windows XP installer marks its partition as active, after which, at boot time, the MBR hands over control to that partition's PBS, which in turn passes to Ntldr. The Windows XP boot loader is unaware of later versions of Windows operating systems and cannot be loaded. It is treated quite easily, but such a situation can confuse an inexperienced user.

There is practically nothing to add to this and you can go directly to editing the boot menu. Let's start with .

9 comments

    • Thanks for the feedback. In the near future, I plan to continue describing methods for fixing download errors using specific examples. I know from experience that while you are reading everything seems to be understandable, but when it comes down to it, in practice, difficulties begin.

  1. Please tell me how to treat?
    “The Windows XP boot loader knows nothing about later versions of Windows operating systems and it becomes impossible to boot them. It is treated quite easily, but for an inexperienced user, this situation can be confusing.

    I put XP after Vista on a laptop - as a result, the system starts up until XP starts loading and everything reboots again, and if you turn off the power adapter (for the duration of the OS boot), then everything loads normally. If you boot in safe mode, then the adapter does not need to be disabled. What is it that can beat and how to deal with it?

    PLEASE SIGN UP. THANKS IN ADVANCE. SORRY FOR "BROKEN" RUSSIAN.

    • I won’t say anything about the influence of the power adapter on XP loading - there are no specific ideas. Regarding the restoration of the boot of Vista, if it is relevant, then at the end of the post there is a link to the Microsoft support article (919529), dedicated directly to this topic. Recovery will require installation disk Vista. AT command line with administrator rights you need to run:
      X:\boot\bootsect.exe /nt60 all
      where X: is the letter of the optical drive.
      But the XP boot will need to be added manually using the editor. The set of commands will be like this:
      Bcdedit /create (ntldr) /d "Microsoft Windows XP"
      if this command fails, then:
      Bcdedit /set (ntldr) description "Microsoft Windows XP"
      Further:
      bcdedit /set (ntldr) device partition=X:
      X: - the drive letter of the partition where the XP bootloader files are located, and the path to it:
      bcdedit /set (ntldr) path \ntldr
      bcdedit /displayorder (ntldr) /addlast

    I had a laptop, when loading and rebooting, Windows immediately turned on, and now I have purchased a desktop computer and the download is in three stages. How can I get rid of these stages. Sorry for the illiterate designation of technical terms.

    • Yuri! I'm afraid that the information you provided is clearly insufficient for any recommendation. What Windows and what steps are we talking about? Specify.

    Good health, Alexander.
    How to understand, prevent, and if it happens again, it is right to get out of such a situation.
    Notebook. Windows-7 installed. After turning it on and entering the password, it issued “missing operating system” - that is, “there is no operating system”. Switching off and on again gave the same result. It was possible to start only by removing and after a while inserting the battery.
    The day before, however, there was an incorrect shutdown: the flash drive and modem were not previously turned off. Previously, such forgetfulness also happened, but there was no similar effect.
    I would be grateful for an answer available to the old “teapot” (I am ten years older than the gentleman in a funny case, but I met COMP at about the same age).

    • Vladimir, hello. Happy holidays and all the best.
      In this situation, you did everything right - you dropped the “sticky” glitch.
      As the song goes: “One rain is not rain yet. One snowflake is not snow yet. It is possible that nothing like this will happen again. Now, if regular problems begin with the launch, then it will be necessary to deal with it. In general, Windows 7 and above are quite resistant to abnormal shutdowns.
      What to do? You yourself answered your own question - try to regularly turn off the devices. And if it is possible to connect an external drive via USB, then I would definitely make (in fact, I do it quite regularly) a backup of the system, for example, using .

Briefly, the process of booting the computer is described in the article "Turning on the PC" in the BIOS section. Let's consider this process in more detail.

System initialization using BIOS

  1. Pressing the power button. When turned on power buttons supply voltages are supplied to the elements of the motherboard; on a Power Good signal, the clock generator is started; a reset signal is applied to the processor, which resets it. The system BIOS programs start working.
  2. BIOS check. The checksum of system programs in ROM is located in one of the cells. After starting, the checksum is recalculated and compared with the reference value.
  3. Processor identification. The motherboard provides the ability to install various processor models. The BIOS sends a request to identify the processor and, based on the response received, determines the type of processor, frequency, voltage, and so on.
  4. Setting up basic elements. The basic components of the motherboard are initialized and tested: the direct memory access block, the timer, the hardware interrupt block.
  5. RAM testing. The type of memory modules, their volume, organization are determined; the first 64 KB of RAM are being tested.
  6. Organization of working structures of RAM. The area under the BIOS is allocated, interrupts are configured.
  7. Checking CMOS memory and battery. If the CMOS battery fails, all BIOS setup data in memory is lost. Loading the last configuration becomes impossible, as reported on the monitor screen. It is possible to load standard factory BIOS values.
  8. Initialization of motherboard devices. It searches and configures boot devices (hard disk, CD drive, FDD), boot process control tools (keyboard, mouse), input/output devices (COM, LPT). Devices are allocated appropriate interrupt lines.
  9. PnP. Devices connected via system connectors are identified. Devices are allocated resources and interrupts.
  10. Turning on the video system. The Video BIOS starts and sets the video controller to VGA or EGA mode, which all video controllers support. After that, the video controller is ready to work.
  11. Displaying a message on the monitor screen. The first message appears on the monitor screen: BIOS manufacturer, processor type and frequency, RAM type and amount.
  12. RAM testing. A selective check of unused RAM is performed.
  13. Initializing the drive controller.
  14. Initializing the hard disk controller.
  15. Keyboard initialization. The keyboard controller is turned on, the contact matrix is ​​tested, the key polling time parameters and the NumLock mode are set. The keyboard is ready to go. A message is displayed on the screen about the possibility of using the BIOS Setup program (usually the Del key is used for this).
  16. Search for devices with their own BIOS. If such devices are found, then control is transferred to the BIOS programs of these devices and they are initialized.
  17. Transferring control to the OS loader. By software interrupt Int 19h, the OS loader (Boot Record) is searched for on disk drives. It must be on one of the devices (HDD, CD, FDD, SCSI). The location of the bootloader is the same everywhere. After the OS loader is found, control is transferred to it.

Operating system loading

The kernel of the operating system (OS) is loaded into RAM, after which the main part of the OS is placed in the system memory.


BIOS produces a "rough" configuration of the computer system. Its main task is to "breathe" life into computer hardware, regardless of its specific modification. New models of processors, motherboards, chipsets and other devices are released almost quarterly. It is impossible to immediately lay down the identification of all this diversity in the BIOS. Yes, this is not necessary. The main task of the BIOS is to make the initial initialization of the equipment and start the operation of the operating system, which itself performs "fine" tuning of computer components.


At the dawn of the development of personal computers, system configuration required appropriate qualifications from users. Surely, experienced users still remember files such as config.exe and autoexec.bat, which had to be set up correctly so that the "cart" would go normally.


What to do - this was the other side of the coin of IBM's open architecture. For the convenience of obtaining a computer of the desired configuration, one had to pay with knowledge of its correct configuration. Such inconveniences scared away unprepared users, therefore, PC manufacturers could not put up with this state of affairs for a long time. Manufacturers of computer equipment and software developers have tried to remove the need to configure their computer from the consumer as much as possible. For the first time, the new system setup procedure was applied in the OS Windows- the operating system itself "interrogated" the connected devices and correctly configured them:

  • a list of devices requiring software settings was determined;
  • searched for appropriate programs for the correct operation of such devices;
  • the procedure for programmatic initialization of devices and their adjustment to operating modes was performed.

The task, in general, is quite difficult. To facilitate its implementation, chipset manufacturers and software developers have agreed and established certain rules for the bootstrap mechanism. Now the components of the computer system that require initialization and configuration were completed with the appropriate software(initializers, drivers, INF files):

  • Initializing programs control codes are entered at specific addresses (one-time procedure);
  • Drivers- these are programs that control the operation of the controller of the corresponding device;
  • INF file- a batch file that helps the OS organize the procedure for setting up a particular computer unit.

Initial Windows boot is controlled by a batch file that contains a list of programs and drivers executed during the OS boot process. This is the so-called "blank" batch file, which should be in the process of initial Windows installation on a computer, converted into a working version, according to the installed equipment on this computer.


Windows has a certain set of universal drivers (which is constantly updated with the release of a new version of the OS) that allow you to configure all system components. To be fair, it should be said that universal Windows drivers are not always able to produce optimal setting one or another device, which reduces the performance and stability of the entire computer system. Therefore, all devices come with "their" installation software (usually on CD). During the initial installation of a new Windows devices may ask you to install a disk with the appropriate drivers in the drive to correct setting new device. It is also recommended to follow the release of a new version of drivers (in which bugs are fixed, work is optimized, etc.) for the chipset of your motherboard and update them regularly.

When the computer is powered on, control is transferred basic system input / output, BIOS. It checks the hardware components of the computer, forms the initial part of the interrupt vector table, initializes the devices and begins the process of loading the operating system.

Booting begins with the BIOS attempting to read the very first sector of the floppy in drive A: (on a boot floppy, this sector contains the operating system loader). If a system diskette is inserted into the drive, the bootloader is read from it and control is transferred to it.

If the floppy is not a system disk, i.e. does not contain a boot record, a message appears on the screen asking you to replace the floppy disk.

If there is no diskette in drive A: at all, then the BIOS reads the master boot record of drive C: (Master Boot Record). This is usually the very first sector on the disk. Control is transferred to the bootloader, which is located in this sector. The boot loader analyzes the contents of the partition table (it is also in this sector), selects the active partition and reads the boot record of this partition. The boot record of the active partition (Boot Record) is similar to the boot record located in the first sector of the system floppy disk.

The active partition boot record reads the IO.SYS and MSDOS.SYS files from disk (in that order). The resident drivers are then read and loaded. The formation of a linked list of device drivers begins. The contents of the CONFIG.SYS file are analyzed and the drivers described in this file are loaded. First, the drivers described by the DEVICE parameter are loaded, then (in MS-DOS versions 4.x and 5.0 only) the resident programs specified by the INSTALL statements. After that, the command processor is read and control is transferred to it.

The command processor consists of three parts - resident, initializing and transitive. The resident part is loaded first. It processes interrupts INT 22H, INT 23H, INT 24H, manages the loading of the transit part. This part of the shell handles MS-DOS errors and prompts the user for action when errors are encountered.

The initialization part is used only during the boot process of the operating system. It defines the starting address where the user program will be loaded and initializes the execution of the AUTOEXEC.BAT file.

The transit part of the command processor is located in high memory addresses. This part contains MS-DOS internal command handlers and a batch file interpreter with a .BAT extension. The transitive part issues a system prompt (for example, A:\>), waits for the operator's command to be entered from the keyboard or from a batch file, and organizes their execution.

After loading the command processor and performing the initial procedures listed in the AUTOEXEC.BAT file, system preparation for operation is completed.

1.3. The general scheme of work dos

In order to work correctly with system software and hardware, you need to clearly understand the mechanism of interaction between the application program and the computer. On fig. 1.1 shows the functional links of the program with the IBM PC software and hardware.

Fig.1. Functional links of the program for MS-DOS with the software and hardware of the PC

As a rule, the DOS kernel is divided into several subsystems, each of which is responsible for performing a particular task. As shown in the figure, the following subsystems are usually distinguished:

    file system;

    memory management system;

    program management system;

    communication system with device drivers;

    error handling system;

    time service;

    operator console input/output system.

These subsystems communicate with the hardware through the BIOS, drivers, or directly. Application software can call DOS subsystems, work with the BIOS, or work directly with the hardware. Note, however, that application programs can only access drivers through the appropriate DOS subsystem.

It is also obvious that the higher the level of interface between the application program and the hardware, the less the program will depend on the features of the hardware.

Consider DOS subsystems separately.