Installing swap in Mint Debian edition (Solved)

Archived topics about LMDE 1 and LMDE 2
Locked
madmedic
Level 1
Level 1
Posts: 7
Joined: Sat Dec 26, 2009 7:38 pm

Installing swap in Mint Debian edition (Solved)

Post by madmedic »

First of all apologies. I have searched for an answer for this to no avail....and even though I used to do this frequently many years ago.....I have over time become de skilled :oops:


I have created two partitions on my system.

/dev/sda1 is my main partition for all things installed and is mounted as /. My second partition is /dev/sda2 ...... is 4g and is formated as linux swap.
I have no mount point for this. When I boot int o the system everything runs blisteringly fast, but when I check the processes using top......I am told that I have zero swap.

How do I make my system recognise the swap partition?

Many thanks.


Brian
Last edited by madmedic on Mon Sep 13, 2010 1:53 pm, edited 1 time in total.

User avatar
Oscar799
Level 19
Level 19
Posts: 9948
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Re: Installing swap in Mint Debian edition

Post by Oscar799 »

I moved this here from Installation & Boot
Seemed like a better home for it
oscar799
Forum Admin
Image

User avatar
seeley
Level 7
Level 7
Posts: 1867
Joined: Sun Mar 07, 2010 7:20 am

Re: Installing swap in Mint Debian edition

Post by seeley »

Hi Brian!
Please read this first: http://forums.linuxmint.com/viewtopic.php?f=141&t=54927
Afterwards, if you have questions, post them!
seeley
seeley @ Linux multiboot

User avatar
markcynt
Level 6
Level 6
Posts: 1115
Joined: Sun May 17, 2009 10:53 am
Location: Lakeland Florida

Re: Installing swap in Mint Debian edition

Post by markcynt »

Add this line to /etc/fstab
/dev/sda2 none swap sw 0 0
Then reboot. Swap should now work.
Image
P5N-E SLI, Core2Duo E6850 3GHZ X 2
2 GB DDR2 800MHZ
EVGA 8800GTS 320MB
2x320GB Hitachi
Arctic Cooling Freezer 7 Pro

User avatar
spsf64
Level 1
Level 1
Posts: 29
Joined: Thu Jan 01, 2009 10:15 am
Location: Sao Paulo, Brazil

Re: Installing swap in Mint Debian edition

Post by spsf64 »

Easiest way... 1, 2, 3

1- Open gparted (menu/administration/gparted)
2- Select your swap partition and right click on it
3- Select "swapon" !!

To check; open terminal and type "free"

Hope it helps!
Sergio

User avatar
pongo
Level 2
Level 2
Posts: 51
Joined: Sun Jan 10, 2010 3:30 pm
Location: The great emptiness -- Nevada, USA

Re: Installing swap in Mint Debian edition

Post by pongo »

This looks like a bug in the installer. I ended up in the same (easily fixed for experienced folks) no swap situation in a two hard disk system with a swap space on each disk. You're used to installers just automatically recognizing and mounting already-existing swaps.
miles quondam et Sinese

flygon250
Level 1
Level 1
Posts: 21
Joined: Sun Sep 12, 2010 6:41 am

Re: Installing swap in Mint Debian edition

Post by flygon250 »

spsf64 wrote:Easiest way... 1, 2, 3

1- Open gparted (menu/administration/gparted)
2- Select your swap partition and right click on it
3- Select "swapon" !!

To check; open terminal and type "free"

Hope it helps!
I think that method only activates it for a single session, though. I know because I did it that way first after realizing I forgot to tell the installer to mount my existing swap partition which I had from a previous Linux install during my LMDE install.

When I started the computer again, however, I realized that the swap was turned off again thanks to the system monitor, so I edited the /etc/fstab file like marksynt said, changing the partition number to match the partition which had the swap and it was still mounted after I restarted.

So go with marksynt's advice. it might be a little more technical, but you only have to do it once and never worry about it again.

madmedic
Level 1
Level 1
Posts: 7
Joined: Sat Dec 26, 2009 7:38 pm

Re: Installing swap in Mint Debian edition (Solved)

Post by madmedic »

Many thanks to everyone.

I went with Markcynt's solution and all is now perfect :D

Brian

User avatar
thermodynamics4
Level 1
Level 1
Posts: 38
Joined: Thu Sep 09, 2010 3:50 pm
Location: Mexico

Re: Installing swap in Mint Debian edition

Post by thermodynamics4 »

markcynt wrote:Add this line to /etc/fstab
/dev/sda2 none swap sw 0 0
Then reboot. Swap should now work.
Worked for me, and is working after reboot, thanks! The swapon in Gparted only works in the session... I use virtual machines so it's important for me to have it always on...
Thinkpad Lenovo T400 Core 2 Duo CPU P8400 2.26Mhz. 2G HD 250G. GM 4500 HD.Intel Pro Wireless Link 5100 AGN, Alfa 1000mw. LMDE, BackTrack and XP.

Thinkpad lenovo X61 T7500 2.2Mhz. 3Gb, HD 320G. Wireless 8191SE, Intel 3945, bluetooth. Debian 6.0, LMDE.

jackmule
Level 1
Level 1
Posts: 11
Joined: Fri Aug 06, 2010 12:50 pm

Re: Installing swap in Mint Debian edition

Post by jackmule »

spsf64 wrote:Easiest way... 1, 2, 3

1- Open gparted (menu/administration/gparted)
2- Select your swap partition and right click on it
3- Select "swapon" !!

To check; open terminal and type "free"

Hope it helps!
This worked for me. Thanks, it couldn't have been easier.

jackmule

Emad78
Level 1
Level 1
Posts: 4
Joined: Tue Aug 25, 2009 9:04 pm

Re: Installing swap in Mint Debian edition

Post by Emad78 »

markcynt wrote:Add this line to /etc/fstab
/dev/sda2 none swap sw 0 0
Then reboot. Swap should now work.

This part worked perfect for me also. Thanks a bunch. I'm fully up and running!

Eli

Locked

Return to “LMDE Archive”