CentOS/Grub: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Created page with " grub2-mkconfig -o /boot/grub2/grub.cfg <pre> # grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Adding boot menu entry for UEFI Firmware Settings ... done </pre> performance tweaks /etc/default/grub <pre> # 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_pst...")
 
No edit summary
Line 1: Line 1:
= 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
  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 ==
<pre>
# grub2-mkconfig -o /etc/grub2.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
</pre>
<pre>
# grub2-mkconfig -o /etc/grub2-efi.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
</pre>


<pre>
<pre>
Line 9: Line 41:
</pre>
</pre>


performance tweaks
 
== performance tweaks ==
 
/etc/default/grub
/etc/default/grub
<pre>
<pre>
Line 31: Line 65:
GRUB_DISABLE_RECOVERY="true"
GRUB_DISABLE_RECOVERY="true"
</pre>
</pre>
= keywords =

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"

keywords