Swap not turning on by default?

6 Antworten [Letzter Beitrag]
onpon4
Offline
Beigetreten: 05/30/2012

I'm really confused why this happens. A screenshot of GParted is attached which shows how my partitions are set up. Now, previously, GParted didn't detect the first partition, which is a linux-swap partition, as swap, so I reformatted it. As of then I can turn on swap in GParted just fine, but it doesn't happen automatically when I boot. So, two questions:

1. Any idea why this would happen?

2. How can I make it activate swap automatically when I boot, like it should?

AnhangGröße
Screenshot from 2015-03-11 17:44:30.png38.07 KB
Legimet
Offline
Beigetreten: 12/10/2013

Put in /etc/fstab something like:
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0

You can get the UUID by running blkid on the partition as root (e.g. sudo blkid /dev/sda1).

Magic Banana

I am a member!

I am a translator!

Offline
Beigetreten: 07/24/2010

You need no find the UUID. I have that line in /etc/fstab:
/dev/sda1 none swap sw 0 0

SuperTramp83

I am a translator!

Offline
Beigetreten: 10/31/2014

funny - this happened to me on both laptops (I recently repaired one lappy a friend wanted to ditch and installed Trisquel on it just yesterday!) when installing Trisq encrypting the home folder.

This is how I fixed it. I opened up gparted and formated the swap partition and then I took note of its uuid. in fstab I copied that uuid over the previous one and changed the /crystal/swap/.. to /dev/sda5
p.s - not sure if it was /crystal/swap but it was something like that.. and also the line of my swap partition in fstab was preceded by a # which I obviously removed..
I guess this is a known bug. If it is not someone should report it.
cheers!

onpon4
Offline
Beigetreten: 05/30/2012

Huh. So apparently, encrypting the /home partition causes the configuration to be screwed up somehow. I also noticed that there was a commented-out line that would have enabled swap... how odd.

Anyway, I've got it fixed. Thanks, guys!

SuperTramp83

I am a translator!

Offline
Beigetreten: 10/31/2014

ohh. you too? so it is a bug? nice you have fixed it!

Kromaz
Offline
Beigetreten: 06/07/2014

This has been a known bug for some time now. Can read more about the bug here https://bugs.launchpad.net/ubuntu/+source/ecryptfs-utils/+bug/953875