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 wanted to remove the warning when starting Ubuntu (Continue to wait, press S to skip or M for manual recovery). I did it! But what I did not want to do was removing my swap partition. I am not sure if I have really removed it, I only removed the line in /etc/fstab file. This solved my problem with warning, but on the other side, I've lost my swap partition.

Is there any way to recover the swap partition (I think I did not remove it, only unmounted?) ? Or at least getting the old one's UUID? I do not understand file systems in Linux with Home folders and so completely.

Thanks for the answers.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

From what I'm reading, I don't think that you have removed the swap partition. Getting the swap partition's UUID is easy by typing in a terminal: blkid. One of the lines should contain the word swap. That line should look something like this:

/dev/sda5: UUID="e911d747-0add-49dc-a37d-7b6b16656c2f" TYPE="swap" 

Now, edit /etc/fstab by typing in the terminal: sudo gedit /etc/fstab. Add a line saying:

UUID=swap's-uuid-number none swap sw 0 0

So, in my case, it should be:

UUID=e911d747-0add-49dc-a37d-7b6b16656c2f none swap sw 0 0

Save the file, reboot. You should have your swap partition mounted automatically again.

If blkid doesn't show a swap partition, you should create a new one. I'd advice you to do that via the tool gparted. Install it via sudo apt-get install gparted or via the Software Center, then run it. In gparted, select an unused area, then click on the new partition button (it looks like a document with a green plus sing on it), and make sure you format it as linux-swap or swap, can't really remember what it's called again. A good swap partition should be 2 times the size of your RAM. So if you've got 2GB of RAM, make sure that your swap partition's size is 4GB. When you've done that, blkid should show have a line containing swap. Continue using the instructions above.

share|improve this answer
    
blkid doesnt show any swap. Does that mean my swap is gone? I think it was another partition and I really only removed the line in fstab. –  PLANTROON Jul 20 '12 at 19:58
    
I'm sorry to tell you, but yes. However, it's really easy to make a new one. I'll edit my answer to tell you how. –  Exeleration-G Jul 20 '12 at 20:26
    
Thank you for your help :) –  PLANTROON Jul 20 '12 at 21:13

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.