separate kexec preparation
add testcase and fix breakage
better code structure