GRUB2 Quick Start/de

Dieser Artikel enthält Informationen zum Einrichten und Betreiben von GRUB2 in den einfachsten Konfigurationen. Weitere, umfassendere Informationen finden Sie unter GRUB2 (englisch). Zur Migration von GRUB Legacy (englisch) zu GRUB2, see GRUB2 Migration (englisch).

Installation von GRUB2
The package is slotted which means both grub-0.97 and grub-2.xx may be installed at the same time. However, while both versions of GRUB can be installed simultaneously, only one version of GRUB may be active as the system's bootloader at a time.

To install GRUB2, first set the GRUB_PLATFORMS variable with one or more appropriate values in the system's. If unset, GRUB2 will guess which platform to use on the system. It guesses  (which is the MBR style of installation) for / architectures.

After the variable is set, emerge the software:

Aktivierung des GRUB2 Bootloader
Mounten Sie falls zutreffend:

When using an EFI platform, make sure that the EFI System Partition is available (mounted) at. This can either be through a specific mount point (at ) or by having an entire partition formatted with the FAT filesystem. This will effectually render into a large EFI System Partition.

Presuming only is FAT:

Run the utility to copy the relevant files to. On the PC platform, this also installs a boot image to the Master Boot Record (MBR) or a partition's boot sector.

Installation von GRUB2 auf den MBR:

Installation von GRUB2 auf ein EFI-System:

The command accepts a   option to specify which CPU/Platform to install. If unspecified, will make a guess: on / it will use the   value by default.

Automatische Konfiguration
GRUB2 is traditionally configured by using the program to generate a configuration file.

generates the configuration file based on template sections located in. The default templates should cover most common boot setups.

Das Verhalten dieser Vorlagen kann durch festlegen von Variablen in gesteuert werden. Siehe GRUB Manual (englisch) für weitere Informationen.

Kernel Namensschema
In order for to detect the available Linux kernel(s), their names must start with  or.

Zum Beispiel:

When using an initramfs, its name should start with or  and end with. The version must match one of a kernel image. File names generated by will also work.

Zum Beispiel:

To generate the file, execute the  command like so:

Stille Kernel Dekompression
To silence kernel decompression at boot time, edit and add   to the GRUB_CMDLINE_LINUX_DEFAULT variable.

Systemd
To boot systemd while using GRUB2 make the GRUB_CMDLINE_LINUX variable look like this:

Ein anderes Betriebssystem laden
can also generate configurations to load other operating systems. This requires the package.

To boot Windows, the also needs to be installed. It allows for the utility to probe NTFS filesystems.

Manuelle Konfiguration
Users do not need to use. The file can be edited manually as well.

Da die meisten Anwender Erfahrung mit dem GRUB Legacy Format haben, zeigt das nächste Beispiel wie auf Grundlage einer GRUB Legacy Konfiguration eine GRUB2 Konfiguration geschrieben wird.

Siehe auch

 * GRUB2 - The 'full' GRUB2 article contains more information and an extensive list of resources.