• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

grub2-mkconfig: command not found

by admin

The grub2-mkconfig command generates a new grub.cfg configuration file, and is used to update an existing grub.cfg file. The grub2-mkconfig command combines the configuration file templates in the /etc/grub.d/ directory with the settings in /etc/default/grub to generate the grub.cfg configuration file.

Note: On some distributions, this command is simply grub-mkconfig.

Syntax

The syntax of the grub2-mkconfig command is:

# grub2-mkconfig [-o {file name}]

If you encounter the below error while running the grub2-mkconfig:

grub2-mkconfig: command not found

You may install the below package:

# dnf install grub2-tools-1

Rebuilding Your GRUB Configuration File

Whenever you change your GRUB configuration, you need to rebuild it. Follow the steps outlined below:

1. The command to rebuild your GRUB configuration varies. On Fedora and openSUSE, use this command:

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Some distros, such as Ubuntu, use:

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

2. Ubuntu Linux also has a script that runs grub-mkconfig, update-grub:

$ sudo update-grub

Filed Under: Linux

Some more articles you might also be interested in …

  1. How To Delete Disk Partition using Parted Command
  2. CentOS / RHEL : How to restrict SSH login by time of day
  3. dpkg-scanpackages: command not found
  4. sed: command not found
  5. How to Change runlevels/targets using systemd in Ubuntu
  6. How to Identify NIS Authenticated Users
  7. ifconfig: command not found
  8. CentOS / RHEL 6,7 : How to disable or delete virbr0 interface
  9. localectl: command not found
  10. chromium-browser: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright