kernel常用参数

  1. ipv6.disable=1          禁用ipv6
  2. sysctl --write net.ipv6.conf.all.disable_ipv6=1
    sysctl --write net.ipv6.conf.eth0.disable_ipv6=1       
  3. sysctl net.ipv4.ip_local_port_range          默认主动连接打开端口范围

     

     

  4. net.ipv4.tcp_keepalive_time               当keepalive probe间隔
  5. init=     内核执行的初始化进程名,设置错误进入Emergency Shell

     

     根目录是挂载成功的,上面的文件为/run/initramfs/rdsosreport.txt截取的错误信息,应当注意switch root是有激活init进程的动作
    initrd-switch-root.service              initrd-switch-root.target
    使用systemctl list-unit-files -a 查看这两个unit

     

     

     

     这两个unit都为静态,是被其他unit激活的,/boot/initramfs-`uname -r`.img中肯定存在这个了unit,以下为截图

     

     

  6. root=   内核启动时,哪个设备作为跟文件系统,i.g. root=/dev/sda2

     

     设置错误进入紧急模式           /sysroot目录为空         手动挂载根目录至/sysroot          mount /dev/mapper/centos-root /sysroot
    chroot /sysroot  可更改密码了,哈哈

  7. sysctl net.ipv4.tcp_max_tw_buckets   TIME_WAIT的tcp连接上限,超过则溢出

     

     

     

     

  8. sysctl net.ipv4.tcp_fin_timeout        套接字由本端主动关闭时,此参数决定其保持FIN-WAIT-2的最长时间.

     

     

  9. sysctl net.ipv4.tcp_max_syn_backlog         系统中处于SYN_RECV状态的tcp连接数上限,SYN_RECV指的是系统收到SYN后,做出SYN+ACK响应后,等待对方回复三次握手阶段的最后一个ACK阶段

     

     

  10. selinux=0      开机时,临时禁用selinux
posted @ 2020-06-16 18:41  ascertain  阅读(590)  评论(0编辑  收藏  举报