5

Howto expand swap space by adding a swap file in Ubuntu

view full story
linux-howto

http://ubuntuguide.net – This post shows how to supplement your swap partition with a swap file.Quote from a thread in Ubuntuforums post by jdong. First, create a 1000M swap file: sudo dd if=/dev/zero of=/swap_file bs=1M count=1000 recommend size of swap is half of RAM,so replace 1000 with the size of the swap file desired, in MB. You can also put the swap_file in a different location if desired. Next, we’ll secure the swapspace, so ordinary users cannot read the contents: sudo chown root:root /swap_file sudo chmod 600 /swap_file Then,turn it into swap space, and turn it on: sudo mkswap /swap_file sudo swapon /swap_file Finally,make it turn on at every bootup, open up /etc/fstab: sudo gedit /etc/fstab add this line to the end of the file: /swap_file none swap sw 0 0 Thanks,jdong from:http://ubuntuforums.org/showthread.php?t=89782 Share Related posts: Manually adding/removing entries to Grub 2 Menu Fix system only boots into memtest after install Ubuntu 9.10(Karmic) Clean up cache,useless file/kernel to free disk space by Ubuntu-Tweak (HowTos)