musher0 wrote:This is what I would suggest, then:
Download and unzip the slaxsave.zip file attached above.
Unzip save512.zip. A slaxsave.dat file of 512 Mg will be unpacked.
Rename this slaxsave.dat to pupswap.swp.
Move this pupswap.swp to /mnt/home.
and at next boot you will have a 512 Mg swap file.
I do not wish to start an argument, but in my experience,
it doesn't make sense to put your swap file in / , since that
will only occupy space on your pupsave file.
I believe the proper place for it is on a disk partition
such as /mnt/sda1 or /mnt/sda2 (which are traditionally
the hard drives) or even on your USB drive if you
have space enough there.
Regards.
Code: Select all
#if no go, try for a swap file...
if [ "$SWAPON" != "yes" ];then
SWAPFILE="/pupswap.swp"
if [ -f /initrd${PUP_HOME}${SWAPFILE} ];then
echo -n "Loading swap file ${SWAPFILE}..." >/dev/console #loading swap file
swapon /initrd${PUP_HOME}${SWAPFILE}
status_func $?
[ $? -eq 0 ] && SWAPON="yes"
fi
if [ -f $SWAPFILE ];then
echo -n "Loading swap file ${SWAPFILE}..." >/dev/console
swapon $SWAPFILE
status_func $?
[ $? -eq 0 ] && SWAPON="yes"
fi
fi
I just tried to make one swap file under /mnt/home. It works fine. Great.
Code: Select all
cd /mnt/home
dd if=/dev/zero of=pupswap.swp bs=1024 count=102400
chmod 600 pupswap.swp
mkswap pupswap.swp
swapon -v pupswap.swp
Code: Select all
swapon -s
free