Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've done several installations of different Ubuntu versions on my machine one over the other from a CD or live usb, and now I have a mess of swap partitions (something like 10 of them), so I need to eliminate all those and create a new one.
I also need to know how to tell the system that the new partition is the one for swap -- otherwise the system won't recognize it.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

You can use Gparted to edit partitions. Delete the unwanted swap partitions and add a new one. Try to avoid moving existing partitions, as this operation takes a long time, although in-place resizing is usually pretty fast. Basically, if the tan part moves, it'll take a while. And back up everything important first.

Swap partitions tend to be recognized automatically, but you can edit /etc/fstab to tell it to use that as a swap. First right-click on the swap partition and select "information", and copy or write down the UUID. Next edit /etc/fstab:

gksu gedit /etc/fstab

Remove any lines whose third field is "swap" (be conservative; if you're not sure what to do, leave a line alone) and add a new line like this:

UUID=uuid     none     swap    0     0

Replace those spaces with tabs, and replace the lowercase string "uuid" with the UUID you copied or wrote down earlier.

share|improve this answer

Dude, clone ur system in a USB or Portable HD and then, format the device. It works much better! :P To clone ubuntu u can install Garfio or Ddrescue! see more here

share|improve this answer

Your Answer

 
discard

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.