Suchen

9.6. GRUB-Befehle

download PDF
GRUB bietet eine Reihe nützlicher Befehle auf seiner Befehlszeilenoberfläche. Nach dem Namen einiger dieser Befehle können Optionen eingegeben werden. Diese Optionen sollten vom Befehl und anderen Optionen in derselben Zeile durch Leerzeichen getrennt werden.
In der folgenden Liste sind nützliche Befehle aufgeführt:
  • boot — Bootet das Betriebssystem oder den Chain-Loader, das/der zuletzt geladen wurde.
  • chainloader </path/to/file> — Loads the specified file as a chain loader. If the file is located on the first sector of the specified partition, use the blocklist notation, +1, instead of the file name.
    Nachfolgend ein Beispiel für einen chainloader-Befehl:
    chainloader +1
  • displaymem — Zeigt den derzeitigen Speicherbedarf anhand der Informationen des BIOS an. Dies ist besonders zum Ermitteln des RAM eines Systems vor dem Booten nützlich.
  • initrd </path/to/initrd> — Enables users to specify an initial RAM disk to use when booting. An initrd is necessary when the kernel needs certain modules in order to boot properly, such as when the root partition is formatted with the ext3 file system.
    Nachfolgend ein Beispiel für einen initrd-Befehl:
    initrd /initrd-2.6.8-1.523.img
  • install <stage-1> <install-disk> <stage-2> p config-file — Installs GRUB to the system MBR.
    • <stage-1> — Signifies a device, partition, and file where the first boot loader image can be found, such as (hd0,0)/grub/stage1.
    • <install-disk> — Specifies the disk where the stage 1 boot loader should be installed, such as (hd0).
    • <stage-2> — Passes the stage 2 boot loader location to the stage 1 boot loader, such as (hd0,0)/grub/stage2.
    • p <config-file> — This option tells the install command to look for the menu configuration file specified by <config-file>, such as (hd0,0)/grub/grub.conf.

    Warnung

    Der install Befehl überschreibt alle Informationen, die sich bereits im MBR befinden.
  • kernel </path/to/kernel> <option-1> <option-N> ... — Specifies the kernel file to load when booting the operating system. Replace </path/to/kernel> with an absolute path from the partition specified by the root command. Replace <option-1> with options for the Linux kernel, such as root=/dev/VolGroup00/LogVol00 to specify the device on which the root partition for the system is located. Multiple options can be passed to the kernel in a space separated list.
    Nachfolgend ein Beispiel eines kernel-Befehls:
    kernel /vmlinuz-2.6.8-1.523 ro root=/dev/VolGroup00/LogVol00
    Die Option im vorhergehenden Beispiel legt fest, dass sich das Root-Dateisystem für Linux auf der hda5-Partition befindet.
  • root (<device-type><device-number>,<partition>) — Configures the root partition for GRUB, such as (hd0,0), and mounts the partition.
    Nachfolgend ein Beispiel für einen root-Befehl:
    root (hd0,0)
  • rootnoverify (<device-type><device-number>,<partition>) — Configures the root partition for GRUB, just like the root command, but does not mount the partition.
Es sind noch weitere Befehle verfügbar. Geben Sie help --all ein, um eine komplette Liste der Befehle zu erhalten. Eine Beschreibung aller GRUB-Befehle finden Sie in der Online-Dokumentation unter http://www.gnu.org/software/grub/manual/.
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.