How To Set Up Encrypted Password for GRUB2

Generate an encrypted hash for the password to be used to access GRUB2 edit and console screens:

Copy the generated hash and open:
gksudo gedit /etc/grub.d/00_header

At the bottom of the file add the following (replace "username" with one you want to associate to that password; does not need to be your account user name):
# Superuser password
cat << EOF
set superusers="username"
password_pbkdf2 username grub.pbkdf2.sha512.10000.loooong_number

Regenerate GRUB2 menu:
sudo update-grub
Enhanced by Zemanta