Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While installing Ubuntu 11.10 a months ago I had not allotted any swap space, I now came to know that there would be no Hibernate option without Swap space.

Is it possible to do it Now?, What if the drives mess up? I have 4 gigabytes of ram, a 500 GB disk and I'm dual-booting with Windows 7.

share|improve this question
up vote 2 down vote accepted

You can use gparted to resize your partitions and make some space to a new swap partition. Although this works pretty good according to my own experience, before doing it, you should make a backup of all your files just in case.

share|improve this answer

Make a backup of all your important data before attempting this.

You need to boot from your installation media and use the Gparted application to shrink the filesystem, it is generally recommended to have a swap partition double the size of your RAM. Once you have shrunk the filesystem you should right-click on the now "unallocated space" and format it as swap. Once done, hit the "Apply all operations" button and reboot.

Now you should be back in your main Ubuntu system.

You need to run the gksudo gedit /etc/fstab command and add a line like this:

/dev/sdXY swap swap defaults 0 0

Of course, change the XY to the correct settings for the system.

Finally, reboot or run sudo swapon /dev/sdXY to use the swap without rebooting.

share|improve this answer
isnt there any Sure Shot to this? do i really need to take a backup? – kernel_panic Dec 1 '11 at 16:55
Of course, you really do not need to make a back-up. You can resize your partitions without backing up first. It is your choice but if something goes wrong you must take responsibility for the loss of data that may happen. In the past I have resized my partitions and I have not needed to use the back-ups that I have made but it is still a wise thing to do. It is easier to back up your data than to recover corrupted data. We do not want your next question to be: "I lost all my files. How do I get them back?" – grahammechanical Dec 1 '11 at 18:42
As explained above . To follow the steps you can refer to [this article][1] I found on ubuntubuzz. [1]: – Abhishek Gupta Apr 1 '13 at 14:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.