Setting a boot loader password


This directory contains all files related to GRUB configuration.



Define GRUB user.

  • To look at that, edit 01_users file
  • Add the highlighted part.
  • Basically, we are adding username and password to our GRUB authentication.


  • Edit 10_linux file and remove --unrestricted from the document.
  • Doing this, we are telling GRUB to do restricted login (with our new username and password)



  • To reconfigure all GRUB conf files, go to /boot/grub2.
  • Then, make a backup copy of a grub.cfg.
  • Then, type grub2-mkconfig -o /boot/grub2/grub.cfg.
  • This command will make new GRUB config file, and overwrite the grub.cfg.
  • Then, reboot the machine.