Software >> OS >> Unix >> Linux >> Red Hat Enterprise Linux >> 7.x >> grub >> How to rebuild grub config after changing grub menu

grub menu items are defined in files in /etc/grub.d/

e.g.
# ls -alh /etc/grub.d
total 84K
drwx------.   2 root root  182 Aug 30  2017 .
drwxr-xr-x. 138 root root 8.0K Apr  5 14:55 ..
-rwxr-xr-x.   1 root root 8.5K May 31  2017 00_header
-rwxr-xr-x.   1 root root 1.1K Apr 11  2017 00_tuned
-rwxr-xr-x.   1 root root  232 May 31  2017 01_users
-rwxr-xr-x.   1 root root  11K May 31  2017 10_linux
-rwxr-xr-x.   1 root root  11K May 31  2017 20_linux_xen
-rwxr-xr-x.   1 root root 2.5K May 31  2017 20_ppc_terminfo
-rwxr-xr-x.   1 root root  11K May 31  2017 30_os-prober
-rwxr-xr-x.   1 root root  214 May 31  2017 40_custom
-rwxr-xr-x.   1 root root  216 May 31  2017 41_custom
-rw-r--r--.   1 root root  483 May 31  2017 README

 

after editing any of these files, rebuild grub config by

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