[步骤] Linux GRUB2 排错模式的开启

步骤一:修改 /ETC/DEFAULT/GRUB 配置文件

# vim /etc/default/grub

在这一行里:

GRUB_CMDLINE_LINUX="......"

添加:

GRUB_CMDLINE_LINUX="...... systemd.default_timeout_start_sec=500s"

步骤二:使刚刚的修改生效

# grub2-mkconfig -o /boot/grub2/grub.cfg

[CONTENT] System local ports batch occupation

Content One: Occupy system local ports manually

# startport=33000;endport=34000;for i in $(seq $startport $endport);do nc -lk $i &;done

(Add: Take start port is 33000 and end port is 34000 as an example here)

Content Two: Release all ports which are opened manually (kill all nc command processes)

# for i in $(ps -aux | grep nc | grep '\-lk' | awk '{print $2}');do kill $i; done