View Single Post
Old 04-09-2015, 04:47 PM   #58
Salah
Enthusiast
Salah began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Sep 2014
Device: Kindle 4
Thanks for pointing out that knc1, I've found this
Quote:
Originally Posted by AeroFengBlade View Post
You can also make a new node inside /dev/ called swap for easier access:
Code:
mknod /dev/swap b 7 8 #b=block device, 7=use loop driver, 8=loop device number
Make a separate directory in /mnt/us/ called swap:
Code:
mkdir /mnt/us/swap
cd /mnt/us/swap
Make a new swap file:
Code:
dd if=/dev/zero of=swapfile bs=1M count=128
mkswap swapfile
Turn the file into a block device:
Code:
losetup /dev/swap /mnt/us/swap/swapfile
I made some scripts in /mnt/us/swap/ for easy swapping on/off:
swapon.sh
Spoiler:

mknod /dev/swap b 7 8
losetup /dev/swap /mnt/us/swap/swapfile
swapon /dev/swap

swapoff.sh
Spoiler:

swappoff /dev/swap #You don't really need a script for this, but I'm lazy

Swap on...swap off Sounds like wax on, wax off from the original Karate Kid, if you know what I'm talking about
but the commands swapon and swapoff dont work on the Kindle 4, i havent tried inside the chroot yet.
Salah is offline   Reply With Quote