CentOS/Grub: Difference between revisions
< CentOS
No edit summary |
|||
| Line 18: | Line 18: | ||
# from /etc/grub.d and settings from /etc/default/grub | # from /etc/grub.d and settings from /etc/default/grub | ||
=== Example == | === Example === | ||
<pre> | <pre> | ||
| Line 40: | Line 40: | ||
done | done | ||
</pre> | </pre> | ||
== performance tweaks == | == performance tweaks == | ||
Revision as of 22:06, 24 January 2026
CentOS 9
Generate Grub Config
grub2-mkconfig -o /etc/grub2.cfg # OR grub2-mkconfig -o /etc/grub2-efi.cfg # OR grub2-mkconfig -o /boot/grub2/grub.cfg
# ls -la /etc/grub2.cfg lrwxrwxrwx. 1 root root 22 Nov 4 07:47 /etc/grub2.cfg -> ../boot/grub2/grub.cfg
# ls -la /etc/grub2-efi.cfg lrwxrwxrwx. 1 root root 22 Nov 4 07:47 /etc/grub2-efi.cfg -> ../boot/grub2/grub.cfg
# It is automatically generated by grub2-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub
Example
# grub2-mkconfig -o /etc/grub2.cfg Generating grub configuration file ... Adding boot menu entry for UEFI Firmware Settings ... done
# grub2-mkconfig -o /etc/grub2-efi.cfg Generating grub configuration file ... Adding boot menu entry for UEFI Firmware Settings ... done
# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Adding boot menu entry for UEFI Firmware Settings ... done
performance tweaks
/etc/default/grub
# vim grub GRUB_TIMEOUT=60 GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" #GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet splash selinux=0" #GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet splash intel_pstate=disable pcie_aspm.policy=performance pci=pcie_b us_perf noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mi tigations=off intel_idle.max_cstate=0 idle=poll transparent_hugepage=never audit=0 selinux=0 nmi_watchdog=0 nohz=on clocksource=tsc nosoftlockup mce=ignore_ce cpuidle.off=1 skew_tick=1 processor.max_cstate=0 acpi_irq_nobalance" GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet splash intel_pstate=disable pcie_aspm.policy=performance pci=pcie_bu s_perf noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mit igations=off intel_idle.max_cstate=0 idle=poll transparent_hugepage=never audit=0 selinux=0" GRUB_DISABLE_RECOVERY="true"