GRUB command

xiaoxiao2021-04-10  515

GRUB contains many different commands that can be performed in an interaction in the command line interface. Some of these commands can be connected behind the command name, which are separated by spaces. The following list gives the most useful commands: • Boot - boot the operating system or chain loader previously already specified and loaded. ChainLoader

- Load the specified file as a chain loader. In order to obtain a file in a specified partition first sector, use 1 as a file name. · Displaymem - Displays the current memory usage, this information is based on BIOS. This command helps to determine how much memory before booting. INITRD

- User can specify an initial RAM disk that is available when booting. This is required when the kernel needs some modules for full boot. INSTALL

p

- Install the GRUB to the main boot record of the system. This command allows the system to block the GRUB interface when the system is restarted. Warning: The install command will override additional information in the main boot sector. If the command is executed, other information other than the GRUB information is lost. Before executing this command, make sure you have the correct understanding of it. This command can be configured in several ways. However, it requires designation

.

Represents a device, partition, and file where you can find the first image of the first boot loader, such as (HD0, 0) / GRUB / Stage1. In addition,

Also specifies the hard disk that the first step boot loader should be installed, such as (HD0). The option tells the first step to boot the loader The second step boot loader is located, for example (HD0, 0) / grub / stage2. P option tells the install command menu profile being specified

Part, such as (HD0, 0) /grub/grub.conf. Kernel

- When the operating system is guided by direct loading, the kernel command specifies that the kernel is loaded from the root file system of GRUB. The Options option is followed by the kernel command and passed to the kernel during kernel load. In Red Hat Linux, an example of a kernel command looks like the following form: kernel / vmlinuz root = / dev / hda5 Top This trip indicates that the VMLinuz file is loaded from the root file system of GRUB, such as (HD0, 0 ). At the same time, an option is also transmitted to the kernel. It pointed out that when Linux kernel is loaded, the root file system of the kernel should be located in the HDA5, the first IDE hard disk. If necessary, multiple options can be placed behind this option. Root

- Set the root partition of GRUB to a specific device and partition, such as (HD0, 0). And hang in this partition so that the file can be read. Rootnoverify

- Do the root order The same thing, just do not hang into the partition. In addition to the above, there are more commands available. Enter INFO GRUB to get a list of all commands.

转载请注明原文地址:https://www.9cbs.com/read-133325.html

New Post(0)