Installing swap in Mint Debian edition (Solved)

Archived topics about LMDE 1 and LMDE 2
Locked
madmedic

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Oscar799
Level 20
Level 20
Posts: 10404
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
seeley

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
markcynt

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.
User avatar
spsf64
Level 1
Level 1
Posts: 29
Joined: Thu Jan 01, 2009 10:15 am
Location: Florida

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
pongo

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.
flygon250

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

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
thermodynamics4

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...
jackmule

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

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”