欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

通过grub2修改kernel参数

程序员文章站 2022-07-03 23:27:00
...
  1. cp /boot/grub2/grub.cfg /root/grub.cfg.bak
  2. view /etc/default/grub
# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg' afterwards to update
# /boot/grub2/grub.cfg.

# Uncomment to set your own custom distributor. If you leave it unset or empty, the default
# policy is to determine the value from /etc/os-release
GRUB_DISTRIBUTOR=
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=8
# GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/sda1 splash=silent quiet showopts"
GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/sda1 splash=silent quiet showopts crashkernel=128M,high crashkernel=32M,low"
GRUB_CMDLINE_LINUX=""
  1. grub2-mkconfig -o /boot/grub2/grub.cfg

  2. view /boot/grub2/grub.cfg (to check changes)
    diff /boot/grub2/grub.cfg /root/grub.cfg.bak

相关标签: Linux