How to edit /proc/cmdline
/proc/cmdline是系统文件,不能直接修改,可通过如下方式修改
- 修改/etc/default/grub
sudo vim /etc/default/gruband add the two lines below in the file:
GRUB_CMDLINE_LINUX_DEFAULT='console=tty0 console=ttyS1,115200 intel_idle.max_cstate=0 processor.max_cstate=0 mce=ignore_ce nmi_watchdog=0 nosoftlockup'
GRUB_CMDLINE_LINUX='hugepages=8192 isolcpus=4-7'
-
sudo update-grub -
reboot
Ref
https://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter
https://blog.csdn.net/photon222/article/details/104792659

本文介绍如何通过修改/etc/default/grub文件来间接编辑/proc/cmdline,添加启动参数的方法。具体步骤包括使用sudo权限编辑grub配置文件,添加所需的内核启动参数,并更新grub配置,最后重启系统。

760

被折叠的 条评论
为什么被折叠?



