Tech Junkie Blog - Real World Tutorials, Happy Coding!: Linux System Administration: Installing And Working With Grub Defaults

Monday, January 31, 2022

Linux System Administration: Installing And Working With Grub Defaults

 There are times when you need to reinstall GRUB which is the tool to manage Linux boot system. It could be corrupted and such.  It's also important to know the defaults that you have to work with once it's installed.  In this post we are going to go through the steps to do both.

Here are the steps to install GRUB.

1. Log in and open a terminal session as root

2.  There's two ways install GRUB that first is to install it locally by typing grub2-install /dev/sda and the second way is to use the yum package manager to install.  Type yum reinstall grub2-efi shim notice we are using the reinstall option for the yum command because grub should already be in the system we are just reinstalling because something is wrong with it
















2.  Once you have GRUB installed you can work with the defaults by using a text editor to edit the /etc/default/grub configuration file.  So type vi /etc/default/grub to edit the grub default.

We are going to change the countdown to 10 seconds instead of 5 and set the GRUB_DISABLE_RECOVERY="true" to get rid of the recovery options in the boot menu, esc :x to save the changes






3. Once the changes have been made to the file you have to run the command grub2-mkconfig -o /boot/grub2/grub.cfg to regenerate the grub configuration file








4. Now if you reboot you should not see the recovery options anymore in the boot menu and the countdown will be 10 seconds instead of 5



3 comments:

  1. This blog is very Nice Good Experiance, Easy learning IT sylabuse

    Learning to click

    ReplyDelete
  2. That's a great article. Thanks for sharing.I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. Please visit my website.
    Satta king fast
    Satta result

    ReplyDelete
  3. unholy blades

    Unholy Blades: where relentless combat meets a captivating tale. With unholy powers and razor-sharp blades, dive into a morally charged adventure. The game's immersive visuals and gripping narrative make for an unforgettable journey, where each swing of the blade resonates with dark echoes of choice and consequence.

    ReplyDelete

Search This Blog