TRENDING
  • Linux
  • Shell Script
  • Cloud
  • DevOps
  • About US
SUBSCRIBE
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Reading: How to Change Default GRUB Entries and Timeout on AlmaLinux / Rocky Linux
Share
TechBrownTechBrown
Aa
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Search
  • CLOUD
  • DEVOPS
  • LINUX
  • SHELL SCRIPT
Follow US
© 2014 - 2022 TechBrown. All Rights Reserved.
Linux

How to Change Default GRUB Entries and Timeout on AlmaLinux / Rocky Linux

June 23, 2016
Share
3 Min Read
SHARE
Contents
Step-1 (Login to the root user)Step-2 (List all the GRUB2 boot entries)Step-3 (Change the default boot entry)Step-4 (Check whether it is added to the default entry)Step-5 (Save all the changes in GRUB2)Step-6 (Change GRUB menu time out)Step-7 (Save all the changes in GRUB)

GRUB is the default boot loader for AlmaLinux / Rocky Linux / Amazon Linux. It load all the Linux Distro as well as other operating system with ease. It provides a menu which shows all the the operating system in one place. The GRUB has advanced feature as well as some basic features that makes it effective on all enterprise grade Linux. This guide provides to change the default GRUB Entries as well as to change the timeout according to the user requirements on respective Enterprise Linux that supports the GRUB.

Step-1 (Login to the root user)
$ su -
Password:
Step-2 (List all the GRUB2 boot entries)
# grep "^menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2

Sample Output

CentOS Linux 8 (Core), with Linux 3.10.0-229.el7.x86_64
CentOS Linux 8 (Core), with Linux 0-rescue-7e890c03ebb940a9a67163adaef14894
Windows 10 (loader) (on /dev/sda1)
menuentry "Windows 10 (loader) (on /dev/sda1)"
Step-3 (Change the default boot entry)

These command is use to set the entry as a default.

# grub2-set-default 3

Note you can change the 3 according to your choice of entries this is the default entries to boot.

Step-4 (Check whether it is added to the default entry)

This command shows the list of GRUB entries.

# grub2-editenv list

Sample Output

saved_entry=3
Step-5 (Save all the changes in GRUB2)
# grub2-mkconfig -o /boot/grub2/grub.cfg

Sample output

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-7e890c03ebb940a9a67163adaef14894
Found initrd image: /boot/initramfs-0-rescue-7e890c03ebb940a9a67163adaef14894.img
Found Windows 10 (loader) on /dev/sda1
done

Login to the root user

$ su -
Password:
Step-6 (Change GRUB menu time out)
# vi /etc/default/grub

Sample Output

GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

Note: You can make change “GRUB_TIMEOUT=ANY-POSITIVE-NUMBER” to it for making change the timeout period according to your choice.

Step-7 (Save all the changes in GRUB)

This command loads all the entries during boot time and apply those changes.

# grub2-mkconfig -o /boot/grub2/grub.cfg

Congratulations now you have change the GRUB entries and time on AlmaLinux / Rocky Linux / Amazon Linux.

You Might Also Like

How to Optimize MySQL Performance on AlmaLinux / Rocky Linux

How to Enable TLS 1.3 on Apache and Nginx

5 Security Tips to Protect your WordPress Website from Hackers

How to Enable AES-128 Bit SSL Cipher with TLS 1.3 on Nginx Web Server

How to Set Up NGINX Web Server on AlmaLinux / Rocky Linux

Sign Up For Newsletter

Be keep up! Get the latest articles delivered straight to your inbox.

TechBrown Solutions June 23, 2016
Share this Article
Facebook TwitterEmail Print
Share
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

TRENDING

Linux

RPM and YUM Commands Cheat Sheet for AlmaLinux / Rocky Linux

Linux

How to Configure Cacti with Percona Template on AlmaLinux / Rocky Linux

Linux

How to Create User without using Useradd Command on AlmaLinux / Rocky Linux

Linux

How to Set Up NGINX Web Server on AlmaLinux / Rocky Linux

You Might Also Like

Linux

How to Optimize MySQL Performance on AlmaLinux / Rocky Linux

October 19, 2021
Linux

How to Enable TLS 1.3 on Apache and Nginx

March 14, 2021
Linux

5 Security Tips to Protect your WordPress Website from Hackers

November 8, 2020
Linux

How to Enable AES-128 Bit SSL Cipher with TLS 1.3 on Nginx Web Server

November 7, 2020

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!

Follow US on Social Media

Facebook Twitter Youtube Rss

© 2014 - 2022 Techbrown. All Rights Reserved.

  • About Us
  • Terms of Service
  • Cookie Policy
  • Privacy Policy
By using this site, you agree to the Privacy Policy, Cookie Policy and Terms of Service.
Accept

Removed from reading list

Undo
AdBlock Detected
Our site is an advertising supported site. Please whitelist to support our site.
Okay, I'll Whitelist
Welcome Back!

Sign in to your account

Lost your password?