Where is the bootstrap program located? Loading the operating system. Download Windows XP

For normal computer operation, it is necessary that the main modules of the operating system are in RAM. Therefore, after turning on the computer, an automatic rewriting (loading) of the operating system from the disk into RAM was organized.

Software works best when it is divided into levels, and each level performs some function and frees other, higher, levels from worrying about details within its own level. Based on this philosophy, the MS-DOS operating system is built on a modular basis and consists of the following components:

    Bootloader operating system;

    System files IO.SYS and MSDOS.SYS;

    Device drivers

    MS DOS command processor (file COMMAND.COM);

    External MS DOS Commands

In addition, MS-DOS, like all other operating systems for the IBM PC, uses computer firmware called Basic Input / Output System (BIOS).

Consider these software modules in the order in which they are loaded into RAM after turning on the PC.

Basic input / output system- This is the lowest level of control, a kind of interface between computer hardware and programs. The BIOS directly controls the hardware of the computer and eliminates other programs from knowing the details of how this is done. BIOS programs are written in the ROM of the computer by the manufacturer and carry out:

    computer self-test when it is turned on (POST program);

    initialization i.e. tincture of computer equipment (computer configuration is determined, the necessary values \u200b\u200bof some registers are set);

    performance of service functions and processing of hardware interrupts;

    loading the operating system recorded on a magnetic disk (BOOT program).

Immediately after turning on the computer, the POST program starts working, checking the operability of the RAM and other components of the computer. Then the BIOS initializes and tries to read from the disk in drive A: the boot loader of the operating system to transfer control to it and continue the DOS boot process. In the absence of the necessary files or the floppy disk itself, the search continues on the C :, D :, E: hard drives If the boot (or, in other words, the system) disk is not found, a message about this is displayed on the monitor.

Note that after the boot is completed, utility functions of the BIOS (for example, outputting individual bytes to a disk or display screen, reading a character from the keyboard, reading real-time clock readings, etc.) are called using interrupts. Interrupt- This is a hardware mechanism that forces the processor to interrupt the execution of the current task and engage in processing an external event. Such an event may be a signal from external input-output devices, a request for a program, or an error case (division by zero, integer too large, etc.).

Bootloader- This is a very short program located in the first sector of each floppy disk and hard disk (hard drive) with the MS DOS operating system. The function of this program is to read DOS system files from the boot disk into RAM.

IO.SYS system fileis a BIOS extension. This module adjusts the operating system to a specific configuration of the computing complex and allows you to connect new drivers to non-standard input-output devices,

System fileMSDOS.SYS- interrupt processing module. It mainly serves the file system and manages the allocation of RAM.

After reading by the bootloader, system files are constantly located in the computer’s RAM, that is, they are resident programs.

Upon successful loading of system files, the IO.SYS program module sets the required configuration of the computing system. To this end, he places the drivers of external devices in the computer's RAM.

External driversdevices are separate program files that provide interaction with external devices. The list of connected drivers is contained in the CONFIG.SYS configuration file. .

Command processorcompletes the boot process of the operating system. After computer control is transferred to the command processor, the latter automatically starts the execution of a special batch file - AUTOEXEC.BAT (if such a file is present in the root directory of the boot disk). The AUTOEXEC.BAT file indicates the commands and programs that are executed each time the computer starts. Using this file, you can configure the operating environment settings. For example, create a virtual disk, provide a change of printing modes, load auxiliary programs, etc.

Files with the extension .BAT play a special role when working in a system environment. They contain a collection of operating system commands or executable file names. After starting the file with the .BAT extension, all the commands recorded in it are executed automatically one after another.

If the AUTOEXEC.BAT file is not found in the root directory of the disk from which the operating system is loaded, then MS DOS asks the user for the current date and time.

After executing the AUTOEXEC.BAT file, the process of loading the operating system ends. The command processor issues a prompt indicating that MS-DOS is ready to receive commands. The invitation usually has the form A: \\\u003eor for example C: \\\u003eif the download was from a hard drive.

Good day, dear friends, acquaintances and other personalities.

If you have a computer 2   and more operating systems, then for sure at a certain stage of your computer’s loading a list of these operating systems appears, offering you to select them during, say, 30   seconds. Or, it happens that after installing the next operating system, the second one suddenly disappeared from the list, or even completely stopped loading. Another common problem is when you uninstall (or completely delete) the system, but it has already managed to register in the bootloader and hangs there in a dead line, or .. Or something else :-)

Today I will help you eliminate a number of embarrassments with this very list and generally make working with it more convenient or remove it for good, as well as edit and so on.

A little more about what you can, well, and then how to do it.
  Go.

Editing the Windows Boot List

A few words about the desired, in my opinion, and sometimes even useful, settings and ways to apply editing the list of operating systems, as well as about frequently occurring problems where it may be needed.

  • First of all, as for me, 30 seconds - for someone a lot, for someone a little. How can there be a lot? Well, for example, you turn on the computer and go to put the kettle on, and upon returning you see that the system, if it got out, is still loading. So you can change this very time to, in general, any value from 1   before n. Perhaps there is a limit to this value, but I did not check, and I strongly doubt that anyone needs the system to boot through 30   minutes :)
  • Secondly,   as I said above, perhaps you (or your friends) put the second \\ third \\ fifth Windows   (or another operating system), but they interrupted the installation or something did not work out during it, or you completely deleted one of the systems from. Only here is a record about this very undeliverable \\ remote Windows   stayed and bored in every way, because you have to choose a working system from the list all the time. So you can get rid of extra lines.
  • Thirdly. Many people love all sorts of funny gadgets. In this case, you can, for example, rename the systems in the list as you like, for example, instead of putting Mega Winda Vasi.
  • Fourthlet's say a friend brought you a hard drive with his Windows, but you don’t know how to add an operating system to the list of available ones so that you can select it. Again, this can be done where I will now tell you.
  • Fifthly,   there is a somewhat crazy idea to use the method described below to edit the list of available systems for downloads. Can create a list of let's say 25   systems, but one of them will be loaded, the rest due to their nonexistence will give an error. What kind of work will only you know, because you will create this list, and the attacker who turned on your computer will have to 20   restart the computer in search of a working system. By the way, this can be used not only, but simply as a rally of a friend or girlfriend;)

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

The solution to this paradox is to use a special small computer program called bootloader, or commands located in read-only memory (for example, on an IBM PC - reboot commands without any help). This software can detect devices suitable for downloading and download the OS loader from a special section of the selected device (most often the boot sector) of these devices.

Bootloaders   must comply with specific restrictions, especially with regard to volume. For example, on an IBM PC first level bootloader   should 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, which is necessary for the BIOS to detect the boot loader itself.

Story

The first computers had a set of switches that allowed the operator to place the bootloader in memory before the processor started. Then, this bootloader read the operating system from an external device, for example, from punched tape or from a hard disk.

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

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

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

0: write number 106 to register P 1: check that the card reader can start reading 2: if it cannot, go to step 1 3: read the byte from the card reader and write it to the battery 4: if the card is over, go to p. 8 5: write the value stored in the battery to RAM at the address stored in register P 6: decrease the value of register P by one 7: go to p. 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 step 5, the second level bootloader started. The second-level loader was waiting for filling into the punched tape reader with the length of the punched tape containing the operating system. The difference between the first-level loader and the second-level loader was checking for read errors from punched tape, which were often encountered at that time, and, in particular, on the ASR-33 teletypes used in this case.

Some operating systems, the most characteristic of which are the old (until 1995) operating systems of Apple Computer computers, are so closely related to the hardware of computers that it is impossible to load any other operating system on these computers. In these cases, a bootloader is usually developed that acts as a bootloader of a standard OS, and then transfers control to an alternative operating system. Apple used this method to launch the A / UX version of Unix, and then it was used by various free operating systems.

BIOS initialized devices

Boot device - a device that must be initialized before the operating system boots. These include input devices (keyboard, mouse), the basic output device (display), and the device from which it will be produced - the drive, hard disk, flash drive, PXE).

The boot sequence of a standard IBM-compatible personal computer

PC is loading

References

Wikimedia Foundation. 2010.

See what "Operating System Download" is in other dictionaries:

    The bootloader of the operating system is the system software that provides the loading of the operating system immediately after turning on the computer. Bootloader operating system: provides the necessary tools for dialogue with ... ... Wikipedia

    There are other meanings to this term, see Kernel. The core 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 execution planning is one of the key concepts in multitasking and multiprocessing both in general-purpose operating systems and in real-life operating systems ... ... Wikipedia

    This is a form of distribution of system software. The presence of distributions is due to the fact that the form of software used to distribute it almost never coincides with the form of software that works ... ... Wikipedia

    Trusted download is the function of a personal computer to prevent unauthorized startup of the user, loading the operating system (OS) and gaining access to confidential information. Providing ... ... Wikipedia

    This article should be vikified. Please arrange it according to the rules for writing articles ... Wikipedia

    Windows XP starts in an Internet telephone booth In computer science, bootstrap refers to the complex and multi-step process of starting a computer. A boot sequence is a sequence of actions that a computer must perform for ... Wikipedia

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

    Main and duplicate ROM chips of a Gigabyte motherboard containing AWARD BIOS. BIOS (English basic input / output system "basic ... Wikipedia

operating system   usually stored in the computer’s external memory — on disk. When you turn on the computer, it is read from disk memory and placed in RAM. This process is called booting the operating system .

The disk on which the OS files are located and from which it is loaded is called systemic.
  Programs can only be executed if they are in RAM, so OS files must be loaded into RAM.
  After turning on the computer, the OS is loaded from the system disk into RAM. Download should be performed in accordance with the boot program - the bootloader of the OS.
  Phased loading of the OS can be represented as follows:
The computer contains a ROM containing computer testing programs and the first stage of loading the OS, which are called BIOS (Basic Input / Output System - the basic input-output system). After turning on the computer, these programs begin to run. Moreover, information on the progress of this process is displayed on the display screen. First, the hardware is tested and configured, then the OS starts loading. At this stage, the processor accesses the disk and looks for a small bootloader program in 1 sector of the disk MasterBoot.

Master Boot looks for the main bootloader on disk BootSector, loads it into memory and transfers control to it. Bootsector   (boot sector) - part of the disk reserved for the OS boot program. This sector usually contains a short machine language program that loads the OS.
  Next, the main loader searches for the remaining modules of the operating system and loads them into RAM.
  After loading the OS, control is transferred to the command processor. If you use the command line interface, a system prompt appears on the screen, otherwise the graphical interface loads.
  Depending on the type of OS, the process of loading it will be different. The composition of the OS necessarily includes files that are responsible for the boot process. Consider the "work" of files in the process windows XP boot.

  1. The initial phase of loading.
  2. System selection.
  3. The definition of "iron."
  4. The choice of configuration.

In the initial phase, NTLDR switches the processor to protected mode. Then it loads the appropriate file system driver for working with files of any file system supported by XP (FAT-16, FAT-32 and NTFS).

If there is BOOT.INI in the root directory, then its contents are loaded into memory. If it contains entries for more than one operating system, NTLDR stops working - it shows a menu with a choice and expects input from the user for a certain period of time.

If there is no such file, then NTLDR continues to boot from the first partition, the first disk, usually C: \\.
  If during the selection process the user selected Windows NT, 2000 or XP, then press F8 and show the corresponding menu with boot options.
  After each successful boot, XP creates a copy of the current combination of drivers and system settings known as Last Known Good Configuration. This collection can be used to download if some new device has made a mess in the operating system.

If the selected operating system is XP, then NTLDR finds and loads the DOS program NTDETECT.COM to determine the hardware installed in the computer. NTDETECT.COM builds a list of components, which is then used in the HARDWARE key of the HKEY_LOCAL_MACHINE registry branch.

If the computer has more than one hardware profile, the program stops from the configuration menu. After selecting the configuration, NTLDR starts loading the XP kernel (NTOSKRNL.EXE). During kernel boot (but before initialization), NTLDR remains central to computer management. The screen clears and an animation of white rectangles is shown at the bottom. In addition to the kernel, the Hardware Abstraction Layer (HAL.DLL) layer is also loaded so that the kernel can abstract itself from the hardware. Both files are in the System32 directory.

NTLDR downloads device drivers that are marked as bootable. After downloading them, NTLDR transfers control of the computer further. Each driver has a key in HKEY_LOCAL_MACHINE \\ SYSTEM \\ Services. If Start is SERVICE_BOOT_START, then the device is considered bootable. For each such device, a dot is printed on the screen.

NTOSKRNL during the boot process goes through two phases - the so-called phase 0 and phase 1. The first phase initializes only that part of the microkernel and executive subsystems that are required for the main services to work and continue loading. Phase 1 begins when the HAL prepares the system for handling device interrupts. If more than one processor is installed on the computer, they are initialized. All executive subsystems are reinitialized in the following order: Object Manager, Executive, Microkernel, Security Reference Monitor, Memory Manager, Cache Manager, LPCS, I / O Manager, Process Manager.

Initializing the I / O Manager starts the process of loading all system drivers. From the moment where NTLDR stopped, drivers are loaded by priority. A driver download failure may cause XP to reboot and try to restore Last Known Good Configuration. The final task of Phase 1 of the kernel initialization is to launch the Session Manager Subsystem (SMSS). The subsystem is responsible for creating the user environment that provides the NT interface. SMSS works in user mode, but unlike other applications, SMSS is considered a trusted part of the operating system and a “native” application (it uses only executive functions), which allows it to launch the graphical subsystem and login. SMSS loads win32k.sys, the graphics subsystem. The driver switches the computer to graphic mode, SMSS starts all services that should automatically start at startup. If all devices and services started successfully, the boot process is considered successful and the Last Known Good Configuration is created.

The download process is not considered complete until the user has logged into the system. The process is initialized by the WINLOGON.EXE file, which is launched as a service and is supported by the Local Security Authority (LSASS.EXE), which shows the login dialog. This dialog box appears approximately when the Services Subsystem starts a network service.

Briefly, the process of starting the computer is described in the article "Turning on the PC" in the BIOS section. Consider this process in more detail.

BIOS initialization

  1. Pressing the power button.   When the Power button is turned on, power supply voltages come to the elements of the motherboard; Power Good triggers the clock; a reset signal is applied to the processor, which sets it to its initial state. System BIOS programs start to work.
  2. BIOS check.   The checksum of system programs located in the ROM is 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. BIOS submits a request for identification of the processor and determines the type of processor, frequency, voltage and so on by the response received.
  4. Setting up the basic elements.   The basic components of the motherboard are initialized and tested: a direct memory access unit, a timer, a hardware interrupt unit.
  5. RAM testing. The type of memory modules, their volume, organization is determined; tested the first 64 KB of RAM.
  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 is faulty, all BIOS setup data in the memory is lost. Downloading the latest configuration becomes impossible, as reported on the monitor screen. It is possible to load standard factory BIOS values.
  8. Initialization of motherboard devices.   Search and configuration of boot devices (hard disk, CD drive, FDD), boot process controls (keyboard, mouse), input-output devices (COM, LPT) are performed. Devices are assigned appropriate interrupt lines.
  9. PnP.   Devices connected through system connectors are identified. Devices are allocated resources and interrupts.
  10. Turn on the video system.   The Video BIOS launches, which sets the video controller to VGA or EGA mode, which supports all video controllers. After that, the video controller is ready to work.
  11. Issuing a message on the monitor screen.   The first message appears on the monitor screen: the manufacturer of the BIOS, the type and frequency of the processor, the type and amount of RAM.
  12. RAM testing.   A random check of idle random access memory is performed.
  13. Initialize the drive controller.
  14. Initializing the hard disk controller.
  15. Keyboard initialization.   The keyboard controller turns on, the contact matrix test is performed, the temporary parameters for polling the keys and the NumLock mode are set. The keyboard is ready to go. A message about the possibility of using the BIOS Setup program is displayed on the screen (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 their initialization takes place.
  17. Transfer of control to the bootloader.   By software interrupt Int 19h on disk drives, the boot loader (Boot Record) is searched. 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.

Booting the operating system

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


BIOS makes a “rough” setup 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 come out almost quarterly. It is impossible to immediately lay down the identification of all this diversity in BIOS. Yes, this is not necessary. The main task of BIOS is to initialize the equipment and start the operation of the operating system, which itself performs the “fine-tuning” of computer components.


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


What to do was the flip side of the IBM open architecture medal. For the convenience of obtaining a computer of the desired configuration, one had to pay with knowledge on its proper configuration. Such inconveniences frightened unprepared users, therefore, PC manufacturers could not put up with this state of affairs for a long time. Computer manufacturers and software developers have tried as much as possible to remove from the consumer the need to configure their computer. For the first time, a new system setup procedure was applied in the OS Windows   - the operating system itself “polled” the connected devices and correctly configured them:

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

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

  • Initialization Programs   enter control codes to 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 specific computer unit.

The initial boot of Windows is carried out under the control of a batch file, which contains a list of programs and drivers that are executed during the boot process. This is the so-called "preparation" of the batch file, which should during the initial installation of Windows on the computer, converted into a working version, respectively, 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), allowing you to configure all the components of the system. In fairness, it should be said that universal Windows drivers are far from always capable of optimally configuring a device, which reduces the performance and stability of the entire computer system. Therefore, all devices come with "their" installation software (usually on CD). When you first install a new device, Windows may ask you to install the appropriate drivers in the drive to properly configure the new device. It is also recommended to monitor the release of a new version of drivers (in which errors have been fixed, optimization has been done, etc.) for the chipset of its motherboard and regularly update them.

Do you like the article? Share with friends: