fallocate is no longer a viable option, use dd

This commit is contained in:
mollusk 2020-07-08 23:20:28 -07:00
parent f597d1285f
commit 52fde23819

View File

@ -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