Just a quick one here. Need swap? Not sure why you would if you have an awesome computer, but here's the method anyway. I've just tried this, and my computer crashed. I'm guessing that I don't really need swap, although I was intrigued at the idea that "you need swap if you want to be able to Suspend/Hibernate your computer". Anyways...
This method can be found here.
1) Create an empty file - didn't know you could to that!:
sudo dd if=/dev/zero of=/swap_file bs=1M count=1000
count=1000 can be replaced with whatever filesize you wish. It has also been noted that there is an optimum ratio for RAM/Swap space so don't make it too big as it might just do the opposite of what you want it to do. of= is essentially the location and name of the file, of=/home/person/swap_file is another example.2) Change permissions so the file is safe from others:
sudo chown root:root /swap_file
sudo chmod 600 /swap_file
3) Tell the computer that you want this file to be swap space:
sudo mkswap /swap_file
4) Turn it on - that's what she said!:
sudo swapon /swap_file
Next is the steps to make it run on bootup. I wouldn't advise this unless you have tested the swap first, and know that it is working nicely with your system.
5) Open up /etc/fstab:
sudo gedit /etc/fstab
6) And whack this on the end:
/swap_file none swap sw 0 0
So I thought that this was a nifty way to add swap space, much easier than partitioning a HDD - wouldn't be so hard if I had some free space on my HDD...I'll test out and see how my system runs. See ya!
No comments:
Post a Comment