Operating system boot sequence on ibm. Initial loading of the operating system. Loading User Registration Services

login , which registers users in the system, is launched only when the system itself is already fully operational and operating in normal mode. This does not happen immediately after turning on the computer: Linux is a rather complex system, the objects of which end up in the operating system - a step-by-step process: the behavior of the computer at various boot stages is determined by different people - from hardware developers to the system administrator. The requirements for flexibility, the ability to change its settings depending on the hardware component, the need to solve different tasks using the same computer also make the loading process stepwise: first it is determined profile future system and then this profile being implemented.

The initial stage does not depend at all on what operating system installed on a computer, for some stages in each operating system They offer their own solutions - mostly interchangeable. Let's call this stage (initial) pre-system boot. Starting from a certain stage, the computer boot is already controlled by Linux itself, utilities, scripts, etc. are used. Let's call this (final) stage system boot .

Bootloader to ROM

Immediately after switching on, the RAM of a classical 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), into which it is written once and for all in an unchanged form 1 Modern computers use programmable ROMs, the contents of which can be changed, but such a change is always considered an abnormal situation: for example, writing a new version of the ROM contents, in which errors are corrected (upgrade).. IN specialized on computers (for example, in cheap game consoles), everything that the user needs is recorded on

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

What should this starter program be able to do? Recognize the main devices on which another program needed by the user can be written, 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, engaged in interaction with a variety of input/output devices - both 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. An abbreviation for "Basic Input-Output System", a set of routines in ROM designed for simple low-level access to external computer devices. In modern operating systems it is used only during the initial boot process.

This stage of system boot can be called zero, since it does not depend on any system. Its task is to determine (possibly 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 first sector of this disk and transfer control to a program that is located in a few areas.

Boot sector and primary boot loader

Most often, the size of the primary disk loader - the program to which control is transferred after stage zero - is quite small. This is due to the requirements versatility this kind of programs. You can read data from the 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 you can always read one, first, sector of a disk in the same way, 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 have figured out where the core was operating system, and could independently read it, place it in memory, configure it and transfer control to it. However, the core operating system has a rather complex structure - and therefore a difficult loading method; it can be quite large, and, most unpleasant of all, it can be located in an unknown location 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 I can't. Its task is more modest: to determine where on the disk the “big one” is located. secondary loader, download and run it. Secondary loader is simple, and can be put in a predetermined place on the disk, or, at worst, put in a predetermined place accommodation map, describing exactly where to look for its parts (size secondary bootloader limited, so it is possible to construct such a map).

Location map. Representation of the area with the necessary data (for example, secondary loader or the system kernel) in the form of 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 found in software region. Boot sector IBM PC, called MBR(master boot record), also contains disk partition table, the structure of which is described in Lecture 11. It is clear that a program of this size cannot boast of 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 load the program located at the beginning of this partition. Each type of disk can have its own MBR software part, which allows you to read data from anywhere on the disk, depending on its type and geometry. However, you can still read no more than one sector: it is unknown 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 versions of the preloader that provide the user with the ability to independently choose, from which partition to boot 2 For example, BOOTACTV from the pfdisk package or the standard FreeBSD preloader boot0 , which, due to their pre-system, can be used 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: simple primary loader is written directly to the MBR and the select function is passed to the secondary bootloader.

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

Kernel loader

To task operating system. Typically, the system kernel is written to a file with a specific name. But how to the secondary bootloader read the file with the kernel, if this operation exists in Linux 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 in response will come a solid 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 purpose, where it no longer lies in the form of a file, but in the same continuous piece, the size and location of which are known. However, in Linux it is not customary to do this, since there may not be space for a special partition on the disk of, say, an IBM-compatible computer.

Secondly, you can use the above location map: imagine 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 location maps has two significant drawbacks: its Creation only possible under control already loaded systems, and change kernels must necessarily be accompanied by a change in the map. If for some reason the system does not boot in any of the pre-planned configurations, the only way to improve the situation is to boot from external media (for example, from a laser disk). 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 correspond old file with the kernel, and after deleting the old file, these sectors may contain any kind of “garbage”.

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

The operating system files are located on a disk (hard or floppy). However, programs can only run if they are in RAM, so operating system files must be loaded into RAM.

When you turn on your computer, it tests its devices and tries to boot into the OS, the program that controls the computer.

This process is called bootstrap. It runs automatically when you turn on the computer's power.

After turning on the computer, the operating system is loaded from the system disk into RAM, which must be performed in accordance with the boot program.

The computer contains a read-only memory (ROM) that contains programs for testing the computer and the first stage of loading the operating system, which are called BIOS ( basic input/output system). The ROM is located on the system board and is powered by a battery, so the programs recorded in it are not erased when the computer is turned off.

After turning on the computer, these programs begin to execute, and information about the progress of this process is displayed on the display screen. First, the hardware is tested and configured, then the operating system starts loading.

At this stage, the processor accesses the disk and looks in a certain place (in 1 sector of the disk) for the presence of a very small bootloader program Master Boot. If the disk is a system one, then Master Boot appears in place, is read into memory, and control is transferred to it. In turn, Master Boot searches for the main boot loader on the disk Boot Sector, loads it into memory and transfers control to it. Next, the main boot loader searches for the remaining operating system modules and loads them into RAM.

If a non-system disk is inserted into the drive or there is no disk at all, a message appears on the monitor screen: Not system disk, and the computer freezes.

After the operating system has finished loading, 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.

All operating system files cannot be simultaneously located in RAM, since the volume of modern operating systems is tens and hundreds of megabytes. For a computer to function, a module that controls the file system, a command processor, and drivers for connected devices must be in RAM. Operating system modules that provide a graphical interface can be loaded into RAM at the user's discretion.

Questions for self-control 1. Why is an operating system needed? 2. What components are included in the operating system? 3. What is a file called, how is its name set? 4. What extensions can text files have? 5. What is the difference between quick and full disk formatting? 6. What is the difference between single-level and hierarchical file structures? 7. What operations with files are possible? 8. What are the main stages of loading an operating system?
Setting up the Windows interface Questions to study: 1. Windows desktop. 1.1. Object icons and labels. 1.2. Window. 1.3. Task bar. 1.4. Display panel. 2. Folder window structure. 2.1. Title line. 2.2. Buttons for controlling window sizes. 2.3. System icon. 2.4. Menu bar. 2.5. Toolbar. 2.6. Address bar. 2.7. Working field. 2.8. Status bar.

Operating systems of the Windows family are the most universal. They can be used to work with office programs, for consumer work on the Internet, for educational and entertainment purposes. Like all operating rooms

After turning on the computer, there is no operating system in its RAM. By itself, 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 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 permanent memory (for example, on an IBM PC - reboot commands without any help). This software can detect devices suitable for booting and load the OS bootloader from a special partition of the selected device itself (most often the boot sector) of these devices.

Bootloaders must comply with specific restrictions, especially regarding volume. For example, on 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 boot loader in memory before the processor started. This bootloader then read the operating system from an external device, such as a punched tape or hard drive.

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

0: write the number 8 to register P 1: check that the punched tape reader can start reading 2: if it can’t, go to step 1 3: read the byte from the punched tape reader and write it to the battery 4: if the punched tape runs out, go to step 8 5: write the value stored in the accumulator to RAM at the address stored in the P register 6: increase the value of the P register 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 the number 106 to register P 1: check that the punched tape reader can start reading 2: if it can’t, go to step 1 3: read the byte from the punched tape reader and write it to the battery 4: if the punched tape runs out, go to step 8 5: write the value stored in the accumulator to RAM at the address stored in the P register 6: decrease the value of the P register by one 7: go to step 1

The length of the second-level bootloader was such that the last byte of the bootloader modified the command located at address 6. Thus, after step 5 was completed, the second-level bootloader started. The second-level loader was waiting to load 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 were checks for errors in reading from punched tape, which were common at that time, and, in particular, on the ASR-33 teletypes used in this case.

Some operating systems, most notably the older (pre-1995) Apple Computer operating systems, are so closely tied to the computer's hardware that it is impossible to boot any other operating system on the computer. In these cases, it is common to develop a boot loader that acts as the boot loader for the standard OS and then transfers control to the alternative operating system. Apple used this method to launch the A/UX version of Unix, and it has since been used by various free operating systems.

Devices initialized by BIOS

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

Boot sequence of a standard IBM-compatible personal computer

The personal computer is loading

Links

Wikimedia Foundation. 2010.

See what “Loading the operating system” is in other dictionaries:

    Operating system loader is system software that loads the operating system immediately after turning on the computer. 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), providing 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 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 coincides with the form of the software running... ... Wikipedia

    Trusted boot is a function of a personal computer to prevent unauthorized user startup, 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 an Internet phone machine In computer science, booting is a complex and multi-step process of starting a computer. The boot sequence is the sequence of actions that the computer must perform to ... Wikipedia

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

    Main and backup ROM chips of the Gigabyte motherboard containing BIOS from AWARD. BIOS (English: basic input/output system “basic ... Wikipedia

    Prefetcher is a component of the Microsoft Windows operating system that speeds up the boot process and also reduces the startup time of programs. Prefetcher first appeared in the Windows XP operating system. Starting with Windows Vista, it... ... Wikipedia

In this article I will describe step by step the process of loading the Windows XP, Vista and Seven operating systems. Although this issue is discussed quite often on the Internet, I cannot help but touch on it. Such information can be very useful when diagnosing a malfunction and restoring the functionality of a “dead” OS.

Today we will look at:

  • Start BIOS;
  • Booting Windows XP;
  • Downloading Windows Vista/7.

Loading BIOS

BIOS is a set of microprograms recorded in the computer ROM and used to initialize devices on the motherboard, check and configure them, and load the operating system.

When you turn on the computer, the BIOS checks the hardware and if there are problems, it informs us with sound signals (a set of long and short beeps). Here is a table of BIOS beeps:

AMI signals

SignalPossible malfunction
Absent The power supply is faulty
2k RAM parity error
3k Error in the first 64 kB of RAM
4k System timer malfunction
5k CPU faulty
6k The keyboard controller is faulty
7k The system board is faulty
8k Video card memory is faulty
9k BIOS checksum error
10k Cannot write to CMOS
11k The cache on the system board is faulty
1d+2k Video card is faulty
1d+3k Video card is faulty
1d+8k Monitor not connected

AWARD signals

If the loading is interrupted at this stage, then according to the signal we find the failed part and replace it. In cases with RAM and video cards, sometimes removing them and cleaning the contacts from dust helps.

After checking, the BIOS reads the settings from CMOS and, in accordance with the mini, starts the bootloader from the specified media (CD, HDD, Flash card). If booting from a hard drive, the system reads the first 512 bytes of the Master Boot Record (MBR) and transfers control to it.

If the MBR is not found, the boot stops. You can restore the MBR using the Windows Recovery Console using the fixmbr command.

Windows XP boot process

Windows loading is controlled by NTLDR, which consists of two parts - the first StartUp puts the processor into protected mode and starts the OS loader. The bootloader contains basic functions for working with disks formatted in FAT*, NTFS and CDFS systems. The bootloader reads the contents of boot.ini and, in accordance with its contents (number of OS, disks on which are installed, etc.), continues loading. If Windows has been put into hibernation, NTLDR loads the hiberfil.sys file into the computer's memory and transfers control to the Windows kernel. If you shut down your computer by simply shutting down/rebooting, NTLDR loads the DOS file NTDETECT.COM, which builds a list of hardware and loads the Windows operating system itself.

If the NTLDR file is deleted/moved/damaged, the system will not boot and will display the message “NTLDR is missing. Press CTRL+ALT+DEL to restart.” You can solve this problem in the Windows Recovery Console using the fixboot command or by copying NTLDR from the working system to the root of the disk.

Before loading the kernel, NTLDR displays startup options (If the F8 key was pressed or the system crashed). After selecting the launch parameters, the system kernel starts - ntoskrnl.exe (we see an animation of white rectangles on a black screen). Next, the hardware abstract layer type, HALL.DLL, is loaded. This is necessary so that the kernel can abstract itself from the hardware; both files are located in the System32 directory. Next, the hardware debugger kernel extension library kdcom.dll and bootvid.dll are loaded, which loads the Windows logo and boot status indicator).

One of the most crucial moments is loading the system registry config\system; very often the system cannot read the system file and loading becomes impossible or starts.

Windows Vista/7 boot process

The boot process of Windows Vista and Windows 7 (Seven) begins to differ from the boot process of previous versions of the OS after reading the MBR. The Windows Installer creates a small boot partition that contains everything you need to run the OS. The MBR passes the boot to PBR (Partition Boot Record), and then BOOTMGR (Windows Boot Manager) starts. BOOTMGR replaced NTLDR and controls the loading of the operating system. BOOTMGR reads boot parameters from the Boot Configuration Database (BCD, Boot Configuration Database, which replaced boot.ini) and loads Winload.exe (OS loader boot application, OS loader). Winload.exe loads the operating system kernel, then the loading process is similar to starting Windows XP.

To edit the Boot Configuration Database (BCD), you can use the Bcdedit.exe utility by running it from the Windows Recovery Environment (WinRE). There you can also use the Bootrec.exe utility to correct errors.

When the computer is turned on, control is transferred to the basic input/output system, BIOS. It checks the computer's hardware components, forms the initial part of the interrupt vector table, initializes 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 disk inserted into drive A: (on a boot floppy disk, this sector contains the operating system loader). If a system floppy disk is inserted into the drive, the bootloader is read from it and control is transferred to it.

If the floppy disk is not a system one, 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 floppy disk 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 loader, which is located in this sector. The bootloader analyzes the contents of the partition table (also located 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's boot record reads the IO.SYS and MSDOS.SYS files from disk (in that order). Resident drivers are then read and loaded. The linked list of device drivers begins to be generated. 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 (only in MS-DOS versions 4.x and 5.0) the resident programs specified by the INSTALL statements. After this, the command processor is read and control is transferred to it.

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

The initialization part is used only during the boot process of the operating system. It determines the starting address at which the user program will be loaded and initiates execution of the AUTOEXEC.BAT file.

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

After loading the command processor and completing the initial procedures listed in the AUTOEXEC.BAT file, the system is ready for operation.

1.3. General scheme of how dos works

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

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

Typically, 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. Please 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 equipment, the less the program will depend on the characteristics of the equipment.

Let's look at the DOS subsystems separately.