Posted by: Anonymous
[ip: 62.111.200.202]
on October 24, 2008 09:39 PM
Original one didn't work for me, it uncited cmdline. Also I've got bzImage not vmlinuz. This do_stop() works
UNAMER=`uname -r`
CMD=`cat /proc/cmdline`
KPARAMS="-l " # tells kexec to load the kernel
KPARAMS=$KPARAMS"--initrd=/boot/initrd.img-$UNAMER "
KPARAMS=$KPARAMS"/boot/bzImage-$UNAMER"
KPARAMS="$KPARAMS --append=CMD"
log_action_msg "Will now restart"
if [ -x /sbin/kexec ]; then
/sbin/kexec $KPARAMS
sync
umount -a
kexec -e
fi
Reboot like a racecar with kexec
Posted by: Anonymous [ip: 62.111.200.202] on October 24, 2008 09:39 PMUNAMER=`uname -r`
CMD=`cat /proc/cmdline`
KPARAMS="-l " # tells kexec to load the kernel
KPARAMS=$KPARAMS"--initrd=/boot/initrd.img-$UNAMER "
KPARAMS=$KPARAMS"/boot/bzImage-$UNAMER"
KPARAMS="$KPARAMS --append=CMD"
log_action_msg "Will now restart"
if [ -x /sbin/kexec ]; then
/sbin/kexec $KPARAMS
sync
umount -a
kexec -e
fi
#