GNU GRUB

Grand Unified Bootloader (GRUB short, English for Large Unified Bootloader) is a free bootloader program, which is often used to start of Unix-like operating systems such as Linux.

GRUB was developed within the GNU Hurd project as the boot loader and is provided under the GPL. Due to its higher flexibility displaced GRUB in many Linux distributions, traditional boot loader Linux Loader ( LILO). GRUB is also used in Solaris 10 x86. The current version, GRUB 2, provides a complete review of the 0.9x series dar. This is referred to as GRUB Legacy (English legacy, legacy ',' heritage ',' legacy ').

Features

  • Reads different file systems: GRUB Legacy (up GRUB 0.9x ): ext2, ext3, UFS, UFS2, ReiserFS, FAT, NTFS, ISO 9660, JFS, Minix, FFS, XFS, with distribution-specific extensions even more;
  • GRUB2 (from GRUB 1.9x ) in addition ext4, ZFS and btrfs.

Operation

GRUB GRUB Legacy and generally

Normally, the boot loader GRUB, the so-called Stage 1, in the Master Boot Record (MBR ) is written, which is located in the first 512 bytes of the primary drive. Due to the limited space in addition by the partition table, the Stage 1 can only load the first sector of the so-called Stage 2. In this sector, there is the program code and a block list to read the rest of the sectors of Stage 2

The Stage 2 can be located on any partition. Under Unix, it is usually located under / boot/grub/stage2. Stage 2 contains the file system driver, the program code for the select menu and the GRUB command line as well as the loading routine for the kernel.

After loading Stage 2, if present, the configuration file / boot / grub / menu.lst is read and processed. In this file, the entries of the selection menus are defined, which are now displayed in the console. From the menu to boot operating system can now be selected or commands via the command line are sent directly to GRUB. Stage 2 therefore represents the actual boot loader, which loads a kernel or the boot sector of a partition.

This two-step breakdown of the boot loader had the disadvantage that the bootloader to move or change of Stage 2 was no longer bootable. Why was between Stage 1 and 2, an intermediate stage, Stage 1.5, introduced. This is on the blocks of data between MBR and Stage 1 and the first block of the first partition and is able to accurately read a file system. The version is installed, which supports the file system that the partition on which Stage 2 is located. There are currently Stage 1.5 for file systems FAT, minix, ext2, ext3, JFS, ReiserFS, UFS2, JFS, XFS, and Joliet. Support for Reiser4 and ext4 there by third-party patches.

GRUB 2

For the successor GRUB 2 is a complete redesign was performed and dispensed backward compatibility to legacy GRUB. The Stage 2 was in a kernel ( kernel.img ) and many loadable modules (*. Mod) divided. The kernel contains only the essential code with decompression, ELF loader for modules, disk access and a rescue shell. The Stage 1.5, there is not in this form. When installing the modules are appended to the file system that contains the remaining components to the kernel and stored as a file core.img. Here, one of LZMA compression method or LZO is used, so that the compressed file can be stored, for example in the boot area behind the MBR ( When using a GPT this filing boot partition takes place in a specially provided BIOS). After loading the code is unpacked and configuration file / boot / grub / grub.cfg loaded. If necessary modules for additional file systems, boot menu, boot routines for different operating systems and GRUB shell are loaded from the file system. In addition to the shell -like scripting language GRUB 2 offers support for the Lua language.

Furthermore, GRUB 2 can also be used as payload for the free BIOS alternative coreboot. In this case, GRUB does not need to be as usual written in the MBR, but is written together with coreboot directly into the flash memory block (" BIOS chip " ) of the system. During the boot process passes coreboot after it has initialized the hardware control to GRUB, which then, as usual, displays a menu and loading a kernel allowed.

Special features of GRUB

GRUB can access through the file system on the operating system kernel stored as normal files. Other boot loader such as LILO are dependent on configuration data that indicate which data blocks of the kernel is. This information can unwind after a kernel update to change, and the corresponding configuration data must be rewritten. This step is not necessary, however, in regard to GRUB.

Extensions

The default GRUB is as described above with its own boat block. This means that you can usually GRUB can not boot from an existing operating system. The GRUB Shell is available on Linux, an alternative, the project GRUB4DOS ready, which GRUB extended so that it can be started as a program under DOS or as grldr from the Windows-XP-/-NT-Bootmenü out. The latter saves the hassle of extracting the Linux boot block using dd to a file. However, grub4dos, as the name implies, only for DOS and 32 -bit Windows systems that are compatible with it, is available. On 64 -bit systems, a DOS program to run.

With TrustedGRUB is currently an extension of GRUB developed, supports the Trusted Platform Module ( TPM).

270597
de