First upload!
This commit is contained in:
commit
cdc90f83e7
23 changed files with 788 additions and 0 deletions
16
kexec/kexec.sh
Executable file
16
kexec/kexec.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Force root
|
||||
[ `whoami` = root ] || { sudo "$0" "$@"; exit $?; }
|
||||
|
||||
latestkernel=`ls -t /boot/vmlinuz-* | sed "s/\/boot\/vmlinuz-//g" | head -n1`
|
||||
echo "kernel current: $(uname -r)"
|
||||
echo "kernel target: ${latestkernel}"
|
||||
echo ""
|
||||
echo "Arming kexec..."
|
||||
#kexec -l /boot/vmlinuz-${latestkernel} --initrd=/boot/initramfs-${latestkernel}.img --append="`cat /proc/cmdline`"
|
||||
kexec -l /boot/vmlinuz-${latestkernel} --initrd=/boot/initramfs-${latestkernel}.img --reuse-cmdline
|
||||
echo ""
|
||||
read -p "Press [Enter] key to start new kernel..."
|
||||
#systemctl start kexec.target
|
||||
kexec -e
|
Loading…
Add table
Add a link
Reference in a new issue