[solved] how to make swap partition permanet

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

[solved] how to make swap partition permanet

Postby Linux n00b on Wed Jan 05, 2011 5:11 am

I have a large swap partition, but LMDE doesn't use it. If I set swap on after boot, it will use for the session only. I suspect this is the problem.

If I run sudo vim /etc/fstab, I can see this:

# swap was on /dev/sda2 during installation
UUID=c6876978-438f-4a1e-ae53-dacdf22d1e4a none swap sw 0 0

The UUID doesn't math any I can find. I know my swap partition is /dev/sda2, if I replace the UUID with /dev/sda2, would it fix the problem?
Last edited by Linux n00b on Wed Jan 05, 2011 9:14 am, edited 1 time in total.
The difference between genius and stupidity is that genius has its limits.
-- Albert Einstein
User avatar
Linux n00b
Level 3
Level 3
 
Posts: 144
Joined: Sat Jul 05, 2008 9:55 am

Linux Mint is funded by ads and donations.
 

Re: how to make swap partition permanet

Postby Aging Technogeek on Wed Jan 05, 2011 7:48 am

Ideally, your OS will not use swap at all. The swap space is there as a place to temporarily store data and instructions if the available ram is all in use. Using swap will slow down your computer .

If you have a newer computer with over a GigaByte of ram, your system should seldom, if ever, use the swap space. Many people with multi GB of ram, do not even install a swap space. I'm sort of a traditionalist. On my desktop with 8 GB of ram I have a token swap space of 256 MB. This is never used, and everything works well.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4603
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: how to make swap partition permanet

Postby Linux n00b on Wed Jan 05, 2011 8:11 am

my test laptop is not ideal. It has only 1G RAM, and sometimes OS has to swap (eg. I have multiple tasks running). I already have a partition there, I'd like to use it. Plus, I trust swap partition better than swap file in this case.
The difference between genius and stupidity is that genius has its limits.
-- Albert Einstein
User avatar
Linux n00b
Level 3
Level 3
 
Posts: 144
Joined: Sat Jul 05, 2008 9:55 am

Re: how to make swap partition permanet

Postby tdockery97 on Wed Jan 05, 2011 8:40 am

I believe the way you mentioned will work. What I personally to is open gparted, right-click the swap partition and select "information". It will display the UUID. I just replace the old bad number in fstab with this number and it works from then on.
Image
Mint 16 Cinnamon
HP Pavilion 17 Notebook, 8GB DDR3, 2.5GHZ A10-APU, Radeon HD 8650G
Registered Linux User #520972
User avatar
tdockery97
Level 13
Level 13
 
Posts: 4742
Joined: Sun Jan 10, 2010 8:54 am
Location: Salem, Oregon

Re: how to make swap partition permanet

Postby asymmetros on Wed Jan 05, 2011 8:47 am

I just added that line

/dev/sda2 none swap sw 0 0

in the end of fstab file and it just worked.
Nothing else needed.

Also, the # symbol in front of a line, "deletes" it, inactivates it by turning it in a comment.
But as i just said, dont bother with this, add the line i suggested and reboot
Sid Mint Xfce -32, Openbox, KDE, Enlightenment, Liquorix Kernel
HP Compaq Presario cq71, Intel Core 2 Duo T4400 @ 2.2 GHz, 3 GB DDR2 RAM, Nvidia Geforce G 103M
asymmetros
Level 4
Level 4
 
Posts: 310
Joined: Tue Jun 01, 2010 5:34 pm
Location: athens

Re: how to make swap partition permanet

Postby Linux n00b on Wed Jan 05, 2011 9:13 am

Thanks, it did the trick.
The difference between genius and stupidity is that genius has its limits.
-- Albert Einstein
User avatar
Linux n00b
Level 3
Level 3
 
Posts: 144
Joined: Sat Jul 05, 2008 9:55 am


Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 3 guests