What is the safest way to remove a swap partition?

Posted by user212062 on Ask Ubuntu See other posts from Ask Ubuntu or by user212062
Published on 2013-11-06T17:49:58Z Indexed on 2013/11/06 22:08 UTC
Read the original article Hit count: 272

Filed under:
|
|
|

I am running Ubuntu 12.04 on a 64-bit HP laptop with a 16 GB flash drive. I do not have a working hard drive right now. When I installed Ubuntu, I created a 2 GB swap partition on sdb1. I have since learned that swap partitions are generally a bad idea on flash drives, so I would like to use my swap space for my other partitions. You can see my partition scheme in the link below.

GParted Screen

I have read that I just have to comment sdb1 out of the fstab file, boot from a GParted live CD, select swapoff for sdb1, delete/merge with other partition, and everything's good.

But, I've also read that messing with sdb1 can change the UUID of sdb2 or sdb3 and cause problems. Is this true? Does initramfs use swap at all?

Also, when I get Ubuntu running on my laptop with an internal hard drive, does the swap partition help that much? I have 6 GB of DDR3. Does the rule of 1.5xActual RAM still apply? It seems like quite a bit to me.

Thanks for the help!

UPDATE: I have removed swap. The process I followed is:

  1. Right click swap partition in GParted and selected swapoff.
  2. Used # to comment the swap partition out of fstab.
  3. I tried to boot from a live GParted CD, but I kept getting an error, so I ran GParted in Ubuntu.
  4. Deleted swap partition in GParted.
  5. Unmounted /windows.
  6. Expanded /windows to take the remaining space.
  7. Mounted /windows.

The / and /windows partitions each kept their own names and UUIDs, and everything is running fine. I have never seen any swap space being used before, and I don't intend to use the hibernate function, so I think removing swap was a good idea.

© Ask Ubuntu or respective owner

Related posts about 12.04

Related posts about partitioning