initial bootloader Initial Bootloader Introduction On power-up, when a computer is turned on, the following operations are performed: 1. The computer performs a power on self test (POST) to ensure that it meets the necessary requirements and that the hardware is functioning properly. 2. A program located in the ROM BIOS, called the bootstrap loader, is executed. 3. When the bootstrap loader starts it searches for a boot sector and passes control to the boot sector's code area. A boot sector is the first sector of a disk and has a small program in its code area, known as the initial bootstrap program, that can load an operating system. The hardware can recognise a boot sector by hexadecimal signature number AA55 which marks the last two bytes of the sector. The bootstrap loader searches for boot sectors on a number of storage devices, including: ● floppy drives ● CD-ROM drives ● hard drives ● flash drives In almost all computers, the BIOS can be configured to change the order storage devices are searched to control their priority. For example, floppy drives normally have higher priority than hard drives, so if a bootable floppy disk is in the drive when the computer is switched on the computer will boot from the floppy disk; otherwise it will boot from media in another storage device, such as a hard disk. When booting from a hard disk or flash drive, the machine code in the master boot record normally examines the partition table (also in the master boot record), identifies the active partition (the partition that is marked as bootable), reads the boot sector, containing the volume boot record (VBR), from that partition, and then runs the machine code in the volume boot record in the same way code would be run from the boot sector in a floppy disk. revision 1 initial bootloader 4. When the bootstrap loader finds the first boot sector on the primary bootable storage device, it loads it into RAM and passes control to the initial bootstrap program in its code area. The initial bootstrap program is a small program in the boot sector's code area (small enough to fit into one sector) responsible for reading the actual operating system from the recording medium and executing it. The initial bootstrap program has to be very small to fit into the code area and normally loads further software which will be used to load the operating system. Some operating systems, such as Windows, have software built in to load from the boot sector's code area. Unix-like operating systems on the PC, however, cannot load directly from the boot sector's code area and require a prior program, known as a bootloader. The bootloader discussed in this article is GRUB (GRand Unified Bootloader). This is not the only bootloader available: alternatives include LILO and Syslinux. revision 1 initial bootloader Concepts bootloader Some operating systems, such as Unix-like operating systems, cannot load directly and require a prior program, known as a bootloader. The bootloader discussed in this article is GRUB. BIOS BIOS is an acronym that stands for Basic Input/Output System. It is located in ROM in a PC and contains its standard firmware. Every PC contains a BIOS that is available as soon as it is turned on. boot sector A boot sector is the first data sector in a recording medium that contains machine code for booting a program stored elsewhere in the recording medium. code area The code area in a boot sector is the data containing the initial bootstrap program. power on self test (POST) When a computer is first turned on, it performs a power on self test to ensure that it meets the necessary system requirements and that the hardware is functioning properly. The POST firmware is contained in the BIOS and is available as soon as the computer is turned on. bootstrap loader The bootstrap loader is firmware located in the ROM BIOS that loads the bootloader from the the primary bootable device and runs it. After the power on self test completes, the computer runs the bootstrap loader to start the computer's software. initial bootstrap program In secondary storage a bootloader normally consists of more than one program. The first program is contained entirely in the boot sector and is known as the initial bootstrap program. The initial bootstrap program must be small enough to fit into one sector and executes the remainder of the bootloader. In GRUB, the initial bootstrap program is stored with a file name of stage1. stage1 then loads either the remainder of GRUB: stage2, or an intermediate program: *_stage1_5. revision 1 initial bootloader Installation GRUB can be run from Unix and then used to install the bootloader to the desired storage device. Once running from one storage device, GRUB is self-propagating and can be used to install itself onto another storage device. However, it cannot be installed from Windows and Unix will not run without a bootloader. The method used in this article to obtain an initial bootloader is to copy a GRUB image directly to the necessary sectors on the target medium. When the computer is then booted using the target device, GRUB will run as the bootloader and can then propagate itself correctly to another target. Options This article provides instructions for installing GRUB onto the following media: ● floppy disk ● flash drive If both floppy drive and flash drive are available, the following factors should be considered when deciding which media to install the initial GRUB image to: ● Flash drives are available with a number of different capacities, and the image used to deploy GRUB initially therefore only partially populates the drive. Floppy disks, on the other hand, have a standard capacity of 1.44 MB and a single image is available that will properly populate any floppy disk. ● The 1.44 MB capacity of a floppy disk is extremely limited and very little data can be stored. Even a minimal Unix system will require a minimum of two floppy disks. Because of the capacity issue with floppy disks, it is suggested that the initial GRUB image is deployed to a flash drive if one is available. Terms program A computer program is a collection of instructions to perform a task or set of tasks to be carried out by a computer. When a computer is started, it requires a program known as a bootloader to start the operating system. software A single program or a collection of programs are often referred to as software. operating system An operating system is a set of computer programs that manage the hardware and software resources of a computer. Unix-like operating systems require a bootloader to start. revision 1 initial bootloader central processing unit (CPU) The central processing unit (CPU) is the component in a computer that executes program instructions. The primary activity of a computer is performed in the CPU and it is the CPU that executes all instructions from the moment it is turned on. data Data is a measurement which can be organised to become information. The programs used to start a computer and the information these programs require are made available as data. data storage Data storage refers to retention of data used for computing for some period of time. When a computer is started it requires programs and data to start the operating system. These programs and data are stored for use when the computer is powered up. primary storage Data in primary storage can be accessed directly by the computer's CPU. Programs used when the computer is first turned on must be available as primary storage to be accessible to the CPU. secondary storage Data in secondary storage cannot be accessed directly by the CPU. A bootloader is stored in secondary storage and must be retrieved into primary storage before it can be executed by the CPU. random access memory (RAM) Random access memory is primary storage that consists of memory cells. The CPU can access (read from or write to) RAM cells directly. In a computer RAM is the working memory. When the data is no longer required it may be simply overwritten and the storage location can be used again for something else. Random access memory is volatile: i.e. the memory contents are lost when the computer is turned off. For this reason programs used when the computer is first turned on cannot be stored in RAM. revision 1 initial bootloader read only memory (ROM) Primary storage in the form of read only memory can be read directly by the CPU but cannot be written directly by the CPU. It is non-volatile: its contents remain unchanged when the computer is turned off. Programs used when the computer is first turned on must be available immediately as primary storage and must therefore be stored in non-volatile read only memory. firmware Firmware is programs installed permanently in ROM. Programs used by the computer on power-up are firmware. secondary storage device A secondary storage device, is used to access data held as secondary storage. A bootloader is stored in secondary storage accessed via a secondary storage device. recording medium Hardware used to hold data is called a recording medium. A secondary storage device is used to access data held as secondary storage in the recording medium. The data that constitutes a bootloader is held in a recording medium and is accessed (loaded into primary storage) via a storage device. platter A hard disk contains one or more flat disks that are used to store data in the drive.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages13 Page
-
File Size-