Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Modify The System Bootloader ====== **General Information** Managing Grub2; the system boot loader. ---- ===== Grub2 Structure ===== **Grub2 files:** * /boot/grub2/grub.cfg => grub2 generated menu (**do not edit directly**) * /etc/default/grub => grub2 variables (**can be edited**, then menus re-generated) * /etc/grub.d/ => individual files used internally by grub2 **Grub2 symlinks** * /etc/grub2.cfg => symlink to /boot/grub2/grub.cfg * /etc/sysconfig/grub => symlink to /etc/default/grub ---- ===== Grub2 Commands ===== **View the active kernel that is default for system boot** <code bash> grub2-editenv list saved_entry=CentOS Linux (3.10.0-327.3.1.el7.x86_64) 7 (Core) </code> \\ **View list of kernels displayed on grub menu** <code bash> grep ^menuentry /boot/grub2/grub.cfg menuentry 'CentOS Linux (3.10.0-327.3.1.el7.x86_64) 7 (Core)' ... menuentry 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' ... menuentry 'CentOS Linux (0-rescue-15bdd5425c924660bb6c9979dc071d56) 7 (Core)' ... </code> \\ **Set default kernel for grub system boot (permanent)** <code bash> grub2-set-default 'CentOS Linux (3.10.0-327.3.1.el7.x86_64) 7 (Core)' </code> * Note: Copy/paste including the single quotes from the "grep ^menuentry" output \\ **Changing Grub2 settings** - Edit grub2 variables<code bash>vim /etc/default/grub</code> - After making changes, re-generate the grub2 menu<code bash>grub2-mkconfig -o /boot/grub2/grub.cfg</code> ---- linux_wiki/modify_the_system_bootloader.txt Last modified: 2019/05/25 23:50(external edit)