Product SiteDocumentation Site

21.5.3. Adding a new Entry

When executing the grub2-mkconfig command, GRUB 2 searches for Linux kernels and other operating systems based on the files located in the /etc/grub.d/ directory. The /etc/grub.d/10_linux script searches for installed Linux kernels on the same partition. The /etc/grub.d/30_os-prober script searches for other operating systems. Menu entries are also automatically added to the boot menu when updating the kernel.
The 40_custom file located in the /etc/grub.d/ directory is a template for custom entries and looks as follows:
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
This file can be edited or copied. Note that as a minimum, a valid menu entry must include at least the following:
menuentry "<Title>"{