Thanks, I had no post mount so I created it and edited the permissions to match the others.If it shows now, you should be able to create a swapfile on it. You can do it manually by entering the following in a terminal
Code:dd if=/dev/zero of=/tmp/mnt/16GB/myswap.swp bs=1k count=262144 mkswap /tmp/mnt/16GB/myswap.swp swapon /tmp/mnt/16GB/myswap.swp
That's for a 256Mb swap. If you want a 512Mb swap, replace 262144 with 524288.
To make sure it's activated at reboot, append the following line to /jffs/scripts/post-mount
Code:swapon /tmp/mnt/16GB/myswap.swp
Check with
Code:free
whether your swap is active.
before reboot
Code:
GoNz0@Router:/tmp/home/root# dd if=/dev/zero of=/tmp/mnt/16GB/myswap.swp bs=1k c
ount=524288
524288+0 records in
524288+0 records out
GoNz0@Router:/tmp/home/root# mkswap /tmp/mnt/16GB/myswap.swp
Setting up swapspace version 1, size = 536866816 bytes
UUID=2e4ceeee-b7cc-4e9a-851d-75133e468ee3
GoNz0@Router:/tmp/home/root# swapon /tmp/mnt/16GB/myswap.swp
GoNz0@Router:/tmp/home/root# free
total used free shared buffers cached
Mem: 255700 146496 109204 0 2828 11968
-/+ buffers/cache: 131700 124000
Swap: 524284 0 524284
GoNz0@Router:/tmp/home/root#
After reboot
Code:
freeGoNz0@Router:/tmp/home/root# free
total used free shared buffers cached
Mem: 255700 127240 128460 0 704 11788
-/+ buffers/cache: 114748 140952
Swap: 0 0 0
GoNz0@Router:/tmp/home/root#
If I run "swapon /tmp/mnt/16GB/myswap.swp" after in putty it shows the swap working again!
*edit, rebooted and left it 10 mins, still no swap.
Last edited: