Run the command grub-md5-crypt and enter the password at the prompt. automatically give the password.
650) this.width=650; "title=" 6.png "src=" Http://s3.51cto.com/wyfs02/M00/72/CE/wKioL1XtohzSlOUtAABzsVU2pmY236.jpg " alt= "Wkiol1xtohzsloutaabzsvu2pmy236.jpg"/>
$1$TZ4TP$XYSOZ6O6TDPRW/T1WKNVT1 # Copy the password,
Vi/etc/grub.conf
Default=0
timeout=2
Title CentOS 6 (2.6.32-504.el6.x86_64)
password--md5 $1$TZ4TP$XYSOZ6O6TDPRW/T1WKNVT1 # Add here is the password to edit the Grub menu
Root (hd0,0)
kernel/vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/sda1
Initrd/initramfs-2.6.32-504.el6.x86_64.img
password--md5 $1$TZ4TP$XYSOZ6O6TDPRW/T1WKNVT1 # Add here is the boot password to start the kernel version
Reboot the system and you will find the contents of the Grub menu changed. Such as.
650) this.width=650; "style=" Float:none; "title=" 7.png "src=" http://s3.51cto.com/wyfs02/M01/72/CE/ Wkiol1xto1jgtehqaadk4p84rcq168.jpg "alt=" Wkiol1xto1jgtehqaadk4p84rcq168.jpg "/>
Enter P and you will be prompted for the password, which is the password to modify the Grub boot menu.
If you do not need to modify the Grub boot, press Enter and the prompt for the password will appear again, such as:
650) this.width=650; "style=" Float:none; "title=" 8.png "src=" http://s3.51cto.com/wyfs02/M01/72/D1/ Wkiom1xtos6sby9raaacybcetec916.jpg "alt=" Wkiom1xtos6sby9raaacybcetec916.jpg "/>
This is asking us to enter the password to start the kernel of this version.
Enter the correct password in order to start Linux
Add Password to Grub