In Depth
See Also

Booting

In computing, booting is a bootstrapping process that starts operating system Operating system

An operating system is a software program [i] that manages the hardware [i] and software [i] ... 

s when the user turns on a computer system. A boot sequence is the set of operations the computer performs when it is switched on that load an operating system.

Discussions

  Discussion Features

   Ask a question about 'Booting'

   Start a new discussion about 'Booting'

   Answer questions about 'Booting'

   'Booting' discussion forum


Encyclopedia

This article is about booting, in the sense of starting a computer. For other meanings, see Booting Booting

In computing [i], booting is a bootstrapping [i] process that starts operating system [i]s when the user ... 

.





In computing, booting is a bootstrapping process that starts operating system Operating system

An operating system is a software program [i] that manages the hardware [i] and software [i] ... 

s when the user turns on a computer system. A boot sequence is the set of operations the computer performs when it is switched on that load an operating system.

Boot loader

Most typwriter systems can only execute code found in the memory . Modern operating systems are stored on hard disk Hard disk

A hard disk drive is a digitally encoded non-volatile storage [i] device which stores data on the magnetic [i] ... 

s, or occasionally on LiveCD LiveDistro

LiveDistro is a generic term for an operating system [i] distribution [i] that is ex ... 

s, USB flash drive USB flash drive

USB flash drives are NAND [i]-type flash memory [i] data storage device [i]s ... 

s, or other non-volatile storage devices. When a computer is first powered on, it doesn't have an operating system in memory. The computer's hardware Computer hardware

Computer hardware is the physical part of a computer [i], including the digital circuit [i]ry,... 

 alone cannot perform complex actions such as loading a program from disk, so a paradox Paradox

A paradox is an apparently true [i] statement [i] or group of statements that leads t... 

 exists: to load the operating system into memory, one appears to need to have an operating system already loaded.

The solution to the paradox is to use a special small program, called a bootstrap loader or boot loader. This program's only job is to load 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 .

Early programmable computers had a row of toggle switch Toggle switch

A toggle switch is a class of electrical switch [i]es that use a mechanical lever [i], handle or rocking ... 

es on the front panel to allow the operator to manually enter the binary Binary numeral system

The binary numeral system [i] represents numeric values using two symbols, typically 0 [i] and 1 [i] ... 

 boot instructions into memory before transferring control to the CPU Central processing unit

A central processing unit , or sometimes simply processor, is the component in a digital computer [i] ... 

. The boot loader would then read the operating system in from an outside storage medium such as paper tape Punched tape

Punched tape or paper tape is a largely obsolete form of data storage [i], consisting of a long st... 

, punched card Punch card

The punch card is an obsolescent [i] recording medium [i] for digital information for use by automated ... 

, 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

A related example is based on a loader for a 1970's Nicolet Instrument Corporation minicomputer. Note that the bytes of the second-stage loader are read from paper tape in reverse order.

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

The length of the second stage loader is such that the final byte overwrites location 6. After the instruction in location 5 executes, location 6 starts the second stage loader executing. The second stage loader then waits for the much longer tape containing the operating system to be placed in the tape reader. The difference between the boot loader and second stage loader is the addition of checking code to trap paper tape read errors, a frequent occurrence with the hardware of the time, which in this case was an ASR-33 ASR33

Introduced about 1963, Teletype Corporation [i]'s ASR33 was a very popular model of teleprinter [i]. ... 

 teletype Teleprinter

A teleprinter is a now largely obsolete electro-mechanical typewriter [i] which can be used to communic... 

.

In modern computers the bootstrapping process begins with the CPU Central processing unit

A central processing unit , or sometimes simply processor, is the component in a digital computer [i] ... 

 executing software contained in ROM at a predefined address . This software contains rudimentary functionality to search for devices eligible to participate in booting, and load a small program from a special section 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 must fit into the first 446 bytes of the Master Boot Record, in order to leave room for the 64-byte partition table and the 2-byte AA55h 'signature', which the BIOS requires for a proper boot loader.

Some operating systems, most notably pre-1995 Macintosh Macintosh

The Macintosh, or Mac, is a line of personal computer [i]s designed, developed, manufactured, and ... 

 systems from Apple Computer Apple Computer

Apple Computer, Inc. is an American [i] computer [i] technology [i] corporation [i] with ... 

, are so closely interwoven with their hardware that it is impossible to natively boot an operating system other than the standard one. A common solution in such situations is to design a bootloader that works as a program belonging to the standard OS that hijacks the system and loads the alternative OS. This technique was used by Apple for its A/UX A/UX

A/UX was Apple Computer [i]'s implementation of the Unix [i] operating system [i] for some of their Macintosh [i] ... 

 Unix Unix

Unix or UNIX is a computer [i] operating system [i] originally developed in the 1960s and 1970s by ... 

 implementation and copied by various freeware operating systems and BeOS Personal Edition 5 BeOS

BeOS is an operating system [i] for personal computers [i] which began development by Be Inc. [i] in 1991 [i] ... 

.

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 NTLDR

NTLDR is the boot loader [i] for Windows NT [i], including its later versions. ... 

, LILO LILO (boot loader)

| name = LILO
| screenshot = | caption = Standard LILO display.... 

 or GRUB GNU GRUB

GNU GRUB is a boot loader [i] package from the GNU Project [i] which follows the Multiboot Specification [i] ... 

. 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 driver Device driver

A device driver, or a software driver is a specific type of computer software [i], typically devel ... 

s 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 Operating system

An operating system is a software program [i] that manages the hardware [i] and software [i] ... 

 is capable of running ordinary applications. Typical modern PCs Personal computer

A personal computer is usually a microcomputer [i] whose price, size, and capabilities make it suitable ... 

 boot in about a minute , 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 system Embedded system

An embedded system is a special-purpose system in which the computer [i] is completely encapsulated by t ... 

s must boot immediately. For example, waiting a minute for a digital television to come up is not acceptable. Therefore they have their complete operating system in ROM or flash memory Flash memory

Flash memory is a form of non-volatile computer memory [i] that can be electrically e ... 

, 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 , the primary output device , and the initial program load device .

In a modern BIOS BIOS

BIOS, in computing [i], stands for Basic Input/Output System or Basic Integrated Operating Syst ... 

, the user can select one of several interfaces from which to boot. These include: hard disk Hard disk

A hard disk drive is a digitally encoded non-volatile storage [i] device which stores data on the magnetic [i] ... 

, floppy, SCSI SCSI

SCSI stands for "Small Computer System Interface", and is a standard [i] interface ... 

, CDROM CD-ROM

CD-ROM is a compact disc that contains data accessible by a computer.... 

, Zip Zip drive

The Zip drive is a medium-capacity removable disk storage [i] system, introduced by Iomega [i] in late 1994 [i] ... 

, LS-120, a network interface card using PXE, or USB Universal Serial Bus

Universal Serial Bus is a serial [i] bus [i] standard to interface [i] ... 

 .

For example, one can install Microsoft Windows Microsoft Windows

Microsoft Windows is a family of operating system [i]s by Microsoft [i].... 

 on the first hard disk and Linux Linux

Linux is a Unix-like [i] computer operating system [i]. ... 

 on the second. By changing the BIOS boot device, the user can select the operating system Operating system

An operating system is a software program [i] that manages the hardware [i] and software [i] ... 

 to load.

Boot sequence on standard PC


Upon starting, a personal computer Personal computer

A personal computer is usually a microcomputer [i] whose price, size, and capabilities make it suitable ... 

's x86 CPU Central processing unit

A central processing unit , or sometimes simply processor, is the component in a digital computer [i] ... 

 runs the instruction located at the memory location F000:FF00 of the BIOS BIOS

BIOS, in computing [i], stands for Basic Input/Output System or Basic Integrated Operating Syst ... 

. 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  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. On the original IBM PC, if it finds no such device, control is transferred to IBM Cassette BASIC. On more modern machines with no built-in operating system, an error message is generated 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  and is often not operating system Operating system

An operating system is a software program [i] that manages the hardware [i] and software [i] ... 

 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 Operating system

An operating system is a software program [i] that manages the hardware [i] and software [i] ... 

 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 and load its boot sector, which usually loads the corresponding operating system Operating system

An operating system is a software program [i] that manages the hardware [i] and software [i] ... 

 Kernel.

Other kinds of boot sequence

Some other processors have other kinds of boot modes; most digital signal processor Digital signal processor

A digital signal processor is a specialized [i] microprocessor [i] designed specifically... 

s have the following boot modes:
  • Serial mode boot
  • Parallel mode boot
  • HPI boot
  • Warm boot or soft reboot  refers to an abridged start up which does not require that power be removed and reapplied.

Random reboot

Random reboot is a non-technical term referring to an unintended reboot for which the cause is not immediately evident to the user. Such reboots may occur due to a multitude of software and / or hardware problems.

See also

  • Windows NT Startup Process Windows NT Startup Process

    The Windows NT Startup Process is the process by which Microsoft [i]'s Windows NT [i], Windows 2000 [i], ... 

  • Microreboot
  • Initial Program Load
  • Boot disk, LiveCD LiveDistro

    LiveDistro is a generic term for an operating system [i] distribution [i] that is ex ... 

    , U3 U3

    U3 LLC [i]. is a joint venture that is backed by Sandisk [i] and M-Systems. ... 

     and Flash drive USB flash drive

    USB flash drives are NAND [i]-type flash memory [i] data storage device [i]s ... 

    s.
  • Crash-only software
  • bootp
  • Second-stage boot loaders
    • bootman
    • GRUB GNU GRUB

      GNU GRUB is a boot loader [i] package from the GNU Project [i] which follows the Multiboot Specification [i] ... 

    • LILO
    • NTLDR NTLDR

      NTLDR is the boot loader [i] for Windows NT [i], including its later versions. ... 

    • XOSL 
    • BootX
    • loadlin
    • Gujin 
    • Boot Camp
    • Syslinux SYSLINUX

      The SYSLINUX Project covers a suite of lightweight bootloader [i]s, for starting up computer [i]s in the ... 

    • GAG

Further reading

  • at OSDEV Community
  • FreeBSD
  • Linux
  • Mac OS X
  • Windows






Categories: