您的位置:首页 > 其它

使用kexec不停重启机器来测试启动过程中的问题

2017-07-12 00:00 197 查看
conceptually as to the purpose, think of it as a fancy version of an @reboot crontab entry run as root.

cat /proc/cmdline
sync
lscpu
sync
cat /proc/meminfo
sync

echo look for any scsi disks

(mount;swapon -s)|grep /dev/sd &&

echo DANGER SCSI DISKS IN USE

find initrd

unr=$(uname -r)
initrd=/boot/initramfs-$unr.img
test -f $initrd || initrd=/boot/initrd-$unr

if [[ -f $initrd ]]; then
kexec -l /boot/vmlinuz-$unr --initrd=$initrd --reuse-cmdline
sync
fi
reboot --no-wall

Or using
systemctl reboot
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐