feat: free caches and log free mem before kexec

This commit is contained in:
David 2024-05-10 12:39:48 +02:00
parent deff4302a7
commit f274f19bbc
No known key found for this signature in database
GPG key ID: AB15A6AF1101390D

View file

@ -74,6 +74,9 @@ if ! "$SCRIPT_DIR/kexec" --load "$SCRIPT_DIR/bzImage" \
exit 1
fi
sync; echo 3 > /proc/sys/vm/drop_caches
echo "current available memory: $(free -h | awk '/^Mem/ {print $7}')"
# Disconnect our background kexec from the terminal
echo "machine will boot into nixos in 6s..."
if test -e /dev/kmsg; then