kexec (reboot without hardware initialization)
echo "kexec-tools kexec-tools/load_kexec select true" | sudo debconf-set-selections
sudo apt install -y kexec-tools
#sudo kexec -l /boot/vmlinuz-4.15.0-32-generic --initrd=/boot/initrd.img-4.15.0-32-generic --reuse-cmdline
#sudo kexec -e
#systemctl kexec
sudo kexec -l /vmlinuz --initrd=/initrd.img --reuse-cmdline && sudo systemctl kexec
- name: Enable kexec
lineinfile:
path: /etc/default/kexec
regexp: '^LOAD_KEXEC='
line: 'LOAD_KEXEC=true'
when: ('dev' in group_names)