GRUB_CMDLINE_LINUX_DEFAULT

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=0,1,2,3,4,5 intel_pstate=disable processor.max_cstate=0 intel_idle.max_cstate=0 idle=poll"

sudo vim /etc/default/grub
sudo update-grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#cpu序号从0开始
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=0,1,2,3,4 intel_pstate=disable processor.max_cstate=0 intel_idle.max_cstate=0 idle=poll"
GRUB_CMDLINE_LINUX="ioslcpus=0,1,2,3"



# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: grub_cmdline_linux_defaultGRUB引导程序的一个选项,用于设置Linux内核的默认命令行参数。在GRUB引导菜单中选择Linux内核时,这些参数将自动应用于内核启动过程中。这个选项可以用来设置各种内核参数,例如root设备、initrd文件、启动级别等等。 ### 回答2: grub_cmdline_linux_default是一个在GRUB2引导菜单中经常使用的选项,它用来定义Linux内核启动时的默认命令行参数。 在Linux系统启动时,内核需要使用一些命令行参数来配置其行为和启动过程。这些参数可以在GRUB2引导菜单中指定,例如root、quiet、splash等参数。然而,如果用户在启动时没有手动指定这些参数,内核会使用默认值。 这时,就可以使用grub_cmdline_linux_default选项来定义这些默认参数。 具体来说,grub_cmdline_linux_default指令将一段命令行参数添加到所有Linux内核映像启动的默认命令行中。例如,使用以下命令指定默认的内核参数: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" 上述命令将在GRUB2引导菜单中默认使用“quiet splash”参数,并将其添加到所有Linux内核启动的默认命令行中。也就是说,无论何种方法启动Linux内核,都会使用这些参数。 总之,grub_cmdline_linux_default选项提供了在GRUB2引导菜单中定义默认命令行参数的方法,方便用户在Linux系统启动时快速配置内核行为。 ### 回答3: grub_cmdline_linux_default是用于设置GRUB引导管理器的Linux默认参数命令。GRUB是一种开源的多引导程序,可用于加载不同的操作系统或内核。当系统启动时,GRUB会显示一个菜单,可以选择要启动的操作系统或内核。 有时,需要在GRUB菜单中添加一些参数,以在启动时为Linux内核添加新的参数。例如,可以启用调试模式,更改内存分配,或将根挂载文件系统进行更改。在这种情况下,grub_cmdline_linux_default就会用到了。 grub_cmdline_linux_default命令的使用非常简单。只需打开GRUB配置文件(在大多数Linux发行版中位于/boot/grub/目录下的grub.cfg文件),找到正确的引导菜单并添加命令即可。例如,下面是一个示例: menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-d3e09a14-8ce4-4a6b-b5b9-8f6c075521f8' { recordfail load_video gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-ieee127fs=uuid --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 b7fe45f6-82a6-4016-8bdd-83a2d5f7acb5 else search --no-floppy --fs-uuid --set=root b7fe45f6-82a6-4016-8bdd-83a2d5f7acb5 fi linux /vmlinuz-5.4.0-42-generic root=/dev/sda1 ro quiet splash grub_cmdline_linux_default="nomodeset" initrd /initrd.img-5.4.0-42-generic } 在上面的例子中,grub_cmdline_linux_default命令已添加到引导菜单中。nomodeset是一个Linux内核参数,可以禁用图形模式启动。这将更改GRUB引导Linux内核时的默认参数,将其设置为nomodeset。 总之,grub_cmdline_linux_default命令是用于设置GRUB引导管理器的Linux默认参数命令。通过将其添加到GRUB配置文件中,可以更改引导Linux内核时的默认参数。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值