In computing, booting is a bootstrapping process that starts operating systems when the user turns on a computer system.
Most computer systems can only execute code found in the memory (ROM or RAM); modern operating systems are mostly stored on hard disk drives, LiveCDs and USB flash drive. 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 on its own; 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.
Table of contents |
2 BIOS boot devices 3 Boot sequence on standard PC (IBM-PC compatible) 4 Related articles 5 External links |
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 specifically so that it is capable of loading 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 themselves up by one's bootstraps (see boot).
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.
Pseudo-assembly code for the bootloader might be as simple as the following eight instructions:
Boot loader
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 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 of the most promising device.
The small program is most often not itself an operating system, but only a second-stage boot loader, such as 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 answer queries from the outside. Typical modern PCs boot in about a minute (of which about 15 seconds are taken by the preliminary boot loaders, and the rest - by the one 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.
In computing, a boot sequence is the operations the computer performs when it is switched on, which load an operating system.
A Boot Device is any device that must be initialized prior to loading the O/S. 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 one form of a boot device (an Initial Program Load Device is any device in the system that can boot and load an O/S; in old AT machines, this is the floppy drive or hard drive).
In nowadays BIOS, the user can select the first, second and third device for the booting, between them : floppy, LS-120, Hard disk (HDD-0 - for the first available hard disk-, HDD-1, HDD-2, HDD-3), SCSI, CDROM, ZIP, USB (USB-FDD, USB-ZIP, USB-CDROM, USB-HDD). USB-FD or USB-ZIP is also the generally called bootable USB key (or keydrive).
For example, one can install Windows in the first hard disk and Linux in the second. Changing the BIOS booting devices, the user can select the operating system to load (floppy like the first boot device and HDD1 - to load windows - or HDD2 - to load Linux - like second ).
Upon starting, a personal computer's CPU runs the instruction located at the memory register FFFF0h of the BIOS. This memory register location is at the end of system memory. It contains a jump instruction that moves execution to the location of the BIOS start-up program. This program runs a Power-On Self Test (POST), which is a test to check that devices the computer will rely on are functioning, and initializes 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 master boot record (MBR). In most cases, the MBR checks the partition table for an active partition. If one is found, the MBR loads the partition's boot sector and runs it. This boot sector is operating system specific, however in most operating systems its main function is to load and execute a kernel, which continues startup.
Some other procesor have another kind of boot modes, most DSP include :
Second-stage boot loader
BIOS boot devices
Boot sequence on standard PC (IBM-PC compatible)
Related articles
External links