View Single Post
Old 10-26-2012, 03:55 PM   #46
AeroFengBlade
Junior Member
AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.AeroFengBlade knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 5
Karma: 87422
Join Date: Sep 2012
Device: Kindle Touch
Quote:
Originally Posted by knc1 View Post
Well, if you find you have to use a partition (a device) rather than a file...

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

Last edited by AeroFengBlade; 10-26-2012 at 04:00 PM.
AeroFengBlade is offline   Reply With Quote