From 52fde23819aeeff63a09b955e79a28b1997afffe Mon Sep 17 00:00:00 2001 From: mollusk Date: Wed, 8 Jul 2020 23:20:28 -0700 Subject: [PATCH] fallocate is no longer a viable option, use dd --- genswap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/genswap.sh b/genswap.sh index b67c976..849a836 100755 --- a/genswap.sh +++ b/genswap.sh @@ -41,8 +41,8 @@ function autoSwap(){ echo -e "${LGREEN}------------------------------------------------------------------${NC}" read - echo -e "${LCYAN}\nCreating file in ${SWAPPATH}...\n${NC}" - fallocate -l ${TOTALRAM}M ${SWAPPATH}${SWAPNAME} + echo -e "${LCYAN}\nCreating file ${SWAPPATH}/${SWAPNAME}...\n${NC}" + dd if=/dev/zero of=${SWAPPATH}${SWAPNAME} count=${TOTALRAM} bs=1MiB ls -lh ${SWAPPATH}${SWAPNAME} sleep 1