Grub is a boot loader from the GNU project, an implementation of the multi-boot specification, which allows users to have multiple operating systems in the computer at the same time and select the operating system that they want to run when the computer starts. In the Ubuntu system, many users will set the password for GRUB2, but how to do? The following small series to introduce the next Ubuntu set up Grub2 password method.
Operation Steps:
leekwen@leekwen:~# GRUB-MKPASSWD-PBKDF2
Enter password: "Input your grub password here."
Reenter password: "Enter your grub password here."
Your PBKDF2 is GRUB.PBKDF2.SHA512.10000.BC4D0A450E86EE447561FC822C832XXXXXXXXXXXXX45572D3B4E40500CE
leekwen@leekwen:~# Cp/etc/grub.d/00_header/etc/grub.d/00_header.bak
leekwen@leekwen:~# Vi/etc/grub.d/00_header
leekwen@leekwen:~# Tail-n 6/etc/grub.d/00_header
### ADD Those line to set GRUB2 password
Cat "EOF
Set superusers= "Leekwen"
PASSWORD_PBKDF2 Leekwen GRUB.PBKDF2.SHA512.10000.BC4D0A450E86EE447561FC822C832XXXXXXXXXXXXX45572D3B4E40500CE
Eof
### ADD End
leekwen@leekwen:/etc/grub.d# Update-grub "Run this command before it can take effect
Generating grub.cfg ...
Found Linux Image:/boot/vmlinuz-3.11.0-15-generic
Found initrd Image:/boot/initrd.img-3.11.0-15-generic
Found memtest86+ Image:/memtest86+.bin
Done
After this reboot, when the startup item is pressed, E will let you enter:
Username
Password
Only the user name (for example, I just set the username: Leekwen) and the password after the correct (just use the GRUB-MKPASSWD-PBKDF2 generated password), you can enter the Startup item Edit menu, startup item This step is safe, remember, modify 00_header must run after "Update-grub" command, so as to take effect!