How to enter the GRUB command line interface
First, when the system starts, press any key to enter the Grub menu interface, and then press the C key to enter the GRUB command line.
The second way, after the system is running normally, enter grub into the command line interface.
Help
Get help information
Root
Root is interpreted according to the command line in order to set up the GRUB operating environment
Root (hd0,0)
Kernel
Used to specify the kernel file at the start of the boot, you can add many additional kernel parameters, the required parameter is RO Root=/dev/mapper/vg0-root This is the root file system for setting up the normal operating system
Other parameters are init= initialization script file selinux=0 disable SELinux quiet silent mode install operating system
Initrd
Specifies the RAMDisk that provides additional files for the selected kernel, which must be in the same version as the kernel version
Find
Find files (on the same disk and partition)
The parameters of this command cannot be entered directly, and the path must be entered. But if the administrator knows the path, what are you looking for?! This command is a direct judge of the existence of a file.
You can use the tab completion feature in this operating environment
Boot
You do not need to add parameters to direct the bootstrap operation.
There are other commands that can be under Baidu when needed.
Grub's configuration file
In the CENTOS6 environment, the Grub configuration file is in/boot/grub/grub.conf
Look at the contents of the configuration file
Default=0 This parameter is to set the system default boot kernel 0 is the title of the number, the title is not manually specified, but from the top down the number of
timeout= user can select the maximum time for kernel parameters, and the system will start the default kernel after timeout
Splashimage This is used to specify the background image.
Hiddenmenu The default is not to provide the kernel selection interface to remove this parameter, select the kernel interface will automatically jump out of the
Password menu Edit authentication, if you want to edit the menu (press C or E) will be certified to enhance system security, this password is basically not back
The title is in title and each title has a full kernel boot parameter.
These parameters can also be entered manually in the GRUB command line, but in order to power up the system later, the title is made to provide the user with a choice.
In the title there is also a password parameter, the function of this password is if you want to start the specified kernel must enter a password to start,
Generate ciphertext for passwords in grub.cfg
The password in the grub.cfg can be either plaintext or ciphertext.
If it is a ciphertext password, you must use password--md5 XXXXX
Ciphertext generated by password
Above is the effect shown in the password of the start title, the author first enters the password to enter the GRUB command line
Note: Here the OpenSSL Rand-hex 4 is a command, in order to get the result of the command need to use the anti-quote
Linuxgrub Command Line interface (CENTOS6)