Created
October 2, 2016 20:37
-
-
Save naftulikay/757d97423f637a7ff6a1490d04b64fcb to your computer and use it in GitHub Desktop.
Reboot a machine using kexec.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tell kexec that when we reboot, we want the given kernel image and the given | |
# initramfs, and that we want to use the exact same kernel command line as was | |
# used to boot previously | |
kexec \ | |
-l /boot/vmlinuz-4.7.5-200.fc24.x86_64 \ | |
--initrd /boot/initramfs-4.7.5-200.fc24.x86_64.img \ | |
--reuse-cmdline | |
# the above doesn't actually do the reboot, so we need to tell kexec to start | |
# rippin' via systemd | |
systemctl kexec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment