a) Can you password protect GRUB? If you can, why
would you want to do this?
b) Describe how would you go about adding a password?
c) If your GRUB gets corrupted, what command can you execute to
rebuild it?
d) What does the GRUB acronym stand for? How many versions are
there as of this semester?
e) Describe what the GRUB root partition is.
f) What does the command grub2-install command do
a) Yes we can password protect it. We sholud password protect it because using live OS like Ubuntu live one can easily access our files and can steal our data. Also the session login password can easily be changed using commands without need to login it even at once. So without GRUB password , security of the system is very low.
b) To add a password, enter this command sudo grub-mkpasswd-pbkdf2 in terminal. Then set password as it will prompt to enter it. A key will be generated. Copy that key.
Now enter command sudo nano /etc/grub/grub.cnf in terminal and write these lines at the end:
set superusers="root"
password_pbkdf2 root copied_key
Save it and close it, then enter this command sudo grub-mkconfig -o /boot/grub2/grub.cfg
The system will reboot now and now there is a password on the GRUB
c)
sudo update-grub
sudo grub-install /dev/sda
sudo update-grub
sudo reboot
d) GRUB stands for GRand Unified Bootloader . There are 2 versions of GRUB
e) GRUB root partition contains GRUB configuration files. Note:- Root partioton of OS is different than GRUB root partiotion
f) This command installs GRUB on the storage or boot sector.
Get Answers For Free
Most questions answered within 1 hours.