View Single Post
Old 06-24-2012, 06:01 PM   #19
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Well, if you find you have to use a partition (a device) rather than a file...

Make a file of zeros:
dd if=/dev/zero of=devfile bs=1M count=128

Find first available loop device:
losetup -f
(for example, returns 1)

Turn the file into a block device:
losetup /dev/loop1 devfile

Now setup the entire device (think: swap device) as swap:
mkswap /dev/loop1

Then use that "swap device" for swap:
swapon /dev/loop1

See what "free" has to say;
Also check "cat /proc/swaps"
And "cat /proc/vmstat" will give you an idea of what is happening to your memory.

To reverse the process:
swapoff /dev/loop1
losetup -d /dev/loop1

Which leaves the "devfile" ready to be used next time.
I.E: You don't have to refill it with zeros or run mkswap on it again.

In case memory isn't the problem -
The next question...
enter the chroot, post the output of the "mount" command.

Last edited by knc1; 06-24-2012 at 06:06 PM.
knc1 is offline   Reply With Quote