author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sat, 18 Jun 2011 11:06:41 +0300 | |
changeset 880 | 60bfe3e287eb |
parent 735 | 5c437e2d5fe1 |
child 899 | 7b4265c8d324 |
permissions | -rw-r--r-- |
735 | 1 |
-*- mode: outline; coding: utf-8; fill-column: 80 -*- |
154 | 2 |
|
3 |
* Enable swap in file. |
|
4 |
||
5 |
Create large file and set up a Linux swap area, enable file for paging and swapping: |
|
6 |
||
7 |
$ dd if=/dev/zero of=/swapfile bs=1024 count=524288 |
|
8 |
$ mkswap -v1 /swapfile |
|
9 |
$ sudo swapon /swapfile |
|
10 |
$ sync |
|
11 |
||
12 |
Insure that all fine: |
|
13 |
||
14 |
$ dmesg | tail |
|
15 |
... |
|
16 |
$ cat /proc/swaps |
|
17 |
... |
|
18 |
||
19 |
Add line to /etc/fstab: |
|
20 |
/swapfile swap swap defaults 0 0 |