How to Create a Swap Partition after installation
Or
How to increase size of Swap Partition
Check swap by:
·
#swapon –s
·
#cat /proc/swaps
There are two following methods for same
Method I:--
By Partition:
- Create
partition with partition ID 82 (which is ID of Linux swap)
- Make swap that
partition by: #mkswap
/dev/sdaX
- On swap for
use on that partition by: #swapon
/dev/sdaX
- Add same entry in
fstab file like: /dev/sdaX swap swap default 0 0
Method II:--
By File:
- Create big
file by: #dd if=/dev/zero of=/swapfile
bs=1M count=1000 (creates 1GB & File size=bs*count)
- Make swap that
partition by: #mkswap /swapfile
- On swap for
use on that partition by: #swapon /swapfile
- Add following entry
in fstab file like: /swapfile swap swap default 0 0
No comments:
Post a Comment