Skip to content

Commit 87f8fb0

Browse files
committed
feat: free caches and log free mem before kexec
1 parent be435b1 commit 87f8fb0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nix/kexec-installer/kexec-run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ if ! "$SCRIPT_DIR/kexec" --load "$SCRIPT_DIR/bzImage" \
7474
exit 1
7575
fi
7676

77+
sync; echo 3 > /proc/sys/vm/drop_caches
78+
echo "current available memory: $(free -h | awk '/^Mem/ {print $7}')"
79+
7780
# Disconnect our background kexec from the terminal
7881
echo "machine will boot into nixos in 6s..."
7982
if test -e /dev/kmsg; then

0 commit comments

Comments
 (0)