97

Is there a way to reboot a Linux system (Debian in particular) without rebooting the hardware?

I have a RAID controller that takes a bit to get itself running before the OS starts up, and I would like it if there was a way to quickly reboot the Linux OS without having to go through the whole reboot process of restarting the RAID controller, etc.

lacrosse1991
  • 1,477

3 Answers3

109

I use kexec-reboot on nearly all of my production systems.

It works incredibly well, allowing me to bypass the long POST time on HP ProLiant servers and reduce the boot cycle from 5 minutes to ~45 seconds.

See: https://github.com/error10/kexec-reboot

The only caveat is that it doesn't seem to work on RHEL/CentOS 6.x systems booting UEFI. But most sane OS/hardware combinations work.

ewwhite
  • 201,205
18

Yes, it is possible. kexec will allow a Linux kernel to be booted directly from Linux without going through the BIOS boot process.

kasperd
  • 31,086
17

Yes. You must use kexec-tools. To make the life easier, I use kexec-reboot.

$sudo apt-get install kexec-tools
$wget https://raw.githubusercontent.com/vadmium/kexec-reboot/master/kexec-reboot
$chmod +x kexec-reboot
$sudo mv kexec-reboot /usr/local/sbin/kexec-reboot
$sudo /usr/local/sbin/kexec-reboot