Categories




PreviousNext
How do you create and use a swapfile in Linux 2.6?    
 Send mail Views:226
Belongs to : Linux
Facebook Bookmarkbookmark this pageStumbleupon Bookmark 

How do you create and use a swapfile in Linux 2.6?


Make the swapfile as big as the internal memory.

root@host:/# dd if=/dev/zero of=/swapfile bs=1M count=256
root@host:/# mkswap /swapfile

Edit /etc/fstab, add:
/swapfile none swap defaults 0 0

root@host:/# swapon -a

Be sure to mount the swapfile after regular file systems is mounted (in your startup scripts):
/bin/mount -n -o remount,rw
/bin/rm -f /etc/mtab*
/bin/mount -a -O no_netdev
swapon -a

funny pictures and videos
funny pictures and videos
online games
embed code


By - Geethalakshmi, On - 2010-05-30
Send This
PreviousNext

User Comments


Add NEW Feedback:

Name :     Email :

Website Monitoring Web hosting by Hiox India Contact Us   Privacy Policy   Terms and Conditions