conceptually as to the purpose, think of it as a fancy version of an 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 USEfind 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