Booting

In computing, booting is a bootstrapping process that starts operating systems when the user turns on a computer system. A boot sequence is the set of operations the computer performs when it is switched on which load an operating system.

Contents

Boot loader

Most computer systems can only execute code found in the memory (ROM or RAM); modern operating systems are mostly stored on hard disks, LiveCDs and USB flash drives. Just after a computer has been turned on, it doesn't have an operating system in memory. The computer's hardware alone cannot perform complicated actions of the operating system, such as loading a program from disk; so a seemingly irresolvable paradox is created: to load the operating system into memory, one appears to need to have an operating system already installed.

The solution to the paradox involves using a special small program, called a bootstrap loader or boot loader. This program doesn't have the full functionality of an operating system, but is tailor-made to load enough other software for the operating system to start. Often, multiple-stage boot loaders are used, in which several small programs summon each other, until the last of them loads the operating system. The name bootstrap loader comes from the image of one pulling oneself up by one's bootstraps (see bootstrapping).

Early programmable computers had toggle switches on the front panel to allow the operator to place the bootloader into the program store before starting the CPU. This would then read the operating system in from an outside storage medium such as paper tape or an old fixed head disk drive.

Pseudo-assembly code for the bootloader might be as simple as the following eight instructions:

0: set the P register to 8
1: check paper tape reader ready
2: if not ready, jump to 1
3: read a byte from paper tape reader to accumulator
4: if end of tape, jump to 8
5: store accumulator to address in P register
6: increment the P register
7: jump to 1

In modern computers the bootstrapping process begins with the CPU executing software contained in ROM (for example, the BIOS of an IBM PC) at a predefined address (the CPU is programmed to execute this software after reset without outside help). This software contains rudimentary functionality to search for devices eligible to participate in booting, and load a small program from a special section (most commonly the boot sector) of the most promising device.

Boot loaders may face peculiar constraints, especially in size; for instance, on the IBM PC and compatibles, the first stage of boot loaders is always 512 bytes in length and ends with the AA55h value (which the BIOS looks at to ensure that it is a proper boot loader).

Second-stage boot loader

The small program is most often not itself an operating system, but only a second-stage boot loader, such as NTLDR, LILO or GRUB. It will then be able to load the operating system proper, and finally transfer execution to it. The system will initialize itself, and may load device drivers and other programs that are needed for the normal operation of the OS.

The boot process is considered complete when the computer is ready to interact with the user or the operating system is capable of running ordinary applications. Typical modern PCs boot in about a minute (of which about 15 seconds are taken by the preliminary boot loaders, and the rest by loading the operating system), while large servers may take several minutes to boot and to start all services - to ensure high availability, they bring up some services before others.

Most embedded systems must boot almost instantly -- for instance, waiting a minute for the television to come up is not acceptable. Therefore they have their whole operating system in ROM or flash memory, so it can be executed directly.

BIOS boot devices

A boot device is any device that must be initialized prior to loading the operating system. This includes the primary input device (keyboard), the primary output device (display), and the initial program load device (floppy drive, hard drive, CD-ROM, keydrive, etc.). (An IPL device is any device in the system that can boot and load an operating system, a stand alone utility (i.e. memtest86+) or even a boot loader; in old AT machines, this is the floppy drive or hard drive.)

In a modern BIOS, the user can select one of several devices from which to boot, for example hard disk, floppy, SCSI, CDROM, ZIP, LS-120 or USB (USB-FDD, USB-ZIP, USB-CDROM, USB-HDD).

For example, one can install Microsoft Windows on the first hard disk and Linux on the second. By changing the BIOS boot device, the user can select the operating system to load.

Boot sequence on standard PC (IBM-PC compatible)

A PC going through its boot sequence
Enlarge
A PC going through its boot sequence

Upon starting, a personal computer's CPU runs the instruction located at the memory location FFFF0h of the BIOS. This memory location is close to the end of system memory. It contains a jump instruction that transfers execution to the location of the BIOS start-up program. This program runs a Power-On Self Test (POST) to check that devices the computer will rely on are functioning; it also initializes these devices. Then, the BIOS goes through a preconfigured list of devices until it finds one that is bootable. If it finds no such device, an error is given and the boot process stops. If the BIOS finds a bootable device, it loads and executes its boot sector. In the case of a hard drive, this is referred to as the master boot record (MBR) and is often not operating system specific. Usually, the MBR code checks the partition table for an active partition. If one is found, the MBR code loads that partition's boot sector and executes it. The boot sector is often operating system specific, however in most operating systems its main function is to load and execute a kernel, which continues startup. If there is no active partition or the active partition's boot sector is invalid, the MBR may load a secondary boot loader and pass control to it and this secondary boot loader will select a partition (often via user input) and load its boot sector, which usually loads the corresponding operating system kernel.

Other kinds of boot sequence

Some other processors have other kinds of boot modes; most digital signal processors have the following boot modes:

  • Serial mode boot
  • Parallel mode boot
  • HPI boot
  • Warm boot or soft reboot (as opposed to hard reboot) refers to an abridged start up which does not require that power be removed and reapplied.

Related articles

External links


Booting is also a slang term referring to the disconnection or crashing of a remote computer system via a chat server, often involving malicious software. The process usually consists of sending a large volume of UDP packets to the target, which cause the target to reboot or be disconnected from the Internet.de:Booten es:Arranque fr:Boot he:אתחול it:Boot loader nl:Boot (computer) pt:Boot ru:Загрузчик ОС

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools