検索

このコンテンツは選択した言語では利用できません。

2.6. GRUB Commands

download PDF
GRUB allows a number of useful commands in its command line interface. Some of the commands accept options after their name; these options should be separated from the command and other options on that line by space characters.
The following is a list of useful commands:
  • boot — Boots the operating system or chain loader that was last loaded.
  • 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.
    The following is an example chainloader command:
    chainloader +1
  • displaymem — Displays the current use of memory, based on information from the BIOS. This is useful to determine how much RAM a system has prior to booting it.
  • 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.
    The following is an example initrd command:
    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.

    Warning

    The install command overwrites any information already located on the MBR.
  • 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.
    The following is an example kernel command:
    kernel /vmlinuz-2.6.8-1.523 ro root=/dev/VolGroup00/LogVol00
    The option in the previous example specifies that the root file system for Linux is located on the hda5 partition.
  • root (<device-type><device-number>,<partition>) — Configures the root partition for GRUB, such as (hd0,0), and mounts the partition.
    The following is an example root command:
    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.
Other commands are also available; type help --all for a full list of commands. For a description of all GRUB commands, refer to the documentation available online at http://www.gnu.org/software/grub/manual/.
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.