- The grub.cfg file is the GRUB configuration file. Try
vim /boot/grub/grub.cfgto see your own grub.cfg.
- The grub.cfg file is generated by the
grub-mkconfigprogram using a set of primary configuration files and the grub default file as a source for user configuration specifications.
- grub configuration files: the main set of configuration files for grub.cfg is located in the /etc/grub.d directory.
- grub default file: the /etc/default/grub
The main set of configuration files for grub.cfg is located in the /etc/grub.d directory. Each of the files in that directory contains GRUB code that is collected into the final grub.cfg file. The numbering scheme used in the names of these configuration files is designed to provide ordering so that the final grub.cfg file is assembled into the correct sequence. Each of these files has a comment to denote the beginning and end of the section, and those comments are also part of the final grub.cfg file so that it is possible to see from which file each section is generated. The delimiting comments look like this:
### BEGIN /etc/grub.d/10_linux ###
These files should not be modified unless you are a GRUB expert and understand what the changes will do. Even then you should always keep a backup copy of the original, working grub.cfg file. The specific files, 40_custom and 41_custom are intended to be used to generate user modifications to the GRUB configuration. You should still be aware of the consequences of any changes you make to these files and maintain a backup of the original grub.cfg file.
The /etc/default/grub file is very simple. The grub defaults file has a number of valid key/value pairs listed already. You can simply change the values of existing keys or add other keys that are not already in the file.
make the Grub menu visible when booting:
set the default menu entry:
update-grub:update-grub is a stub for running
grub-mkconfig -o /boot/grub/grub.cfgto generate grub.cfg file.
spec:GNU GRUB Manual 2.04
阅读Getting Started Guide for ACRN Industry Scenario With Ubuntu Service VM，看看实例是如何配置grub的。