You are not logged in.

#1 2008-04-12 16:22:50

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

How to remedy minor breakages (general approach) [SOLVED, swap]?

I tried to enable hibernation on my notebook via KDE Control Center - Battery. It didn't really work, and I disabled it again. Everything works fine, but on startup I now see something like that: "Activating Swap: [FAILED]". Sounds dangerous, but is probably an artifact, as nothing else malfunctions. Looks ugly, sure. What am I to do when confronted with a situation like this? With Windows it's reinstalling, but a Linux is supposed to be totally maintainable (the more so if it's Arch smile ) and ought to survive indefinitely. What is the recommended approach to a minor trouble like this?

Last edited by Llama (2008-04-12 17:29:36)

Offline

#2 2008-04-12 16:38:38

Dirhael
Member
From: /cold/north
Registered: 2008-03-12
Posts: 46

Re: How to remedy minor breakages (general approach) [SOLVED, swap]?

Check the output of:

fdisk -l | grep swap

(as root)
and make sure that the partition it shows is listed in your /etc/fstab.

It should look something like this:

/dev/sdXY swap swap defaults 0 0

Where X is a letter and Y a number. It will be /dev/hdXY is you don't have SATA.

Last edited by Dirhael (2008-04-12 16:39:09)

Offline

#3 2008-04-12 17:09:12

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: How to remedy minor breakages (general approach) [SOLVED, swap]?

You probably have remnants of an old hibernation trial on your swap partition. Just 'mkswap <partition>' should fix this. Then 'swapon -a' if you want to start using it right away.

Offline

#4 2008-04-12 17:10:25

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: How to remedy minor breakages (general approach) [SOLVED, swap]?

Everything's present and correct smile . Probably works, too, as 256M RAM isn't too much. But why the message?

Offline

#5 2008-04-12 17:24:38

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: How to remedy minor breakages (general approach) [SOLVED, swap]?

bender02, you are one kind magician! Your method works like a charm. Do you care to explain the mechanics of it? How any "remnants" can be left on the swap? I used to think that holding - well, "remnants" is the job of the swap partition. The lack of understanding could be a bit unnerving, you know...

Offline

#6 2008-04-12 17:29:52

elliott
Member
Registered: 2006-03-07
Posts: 296

Re: How to remedy minor breakages (general approach) [SOLVED, swap]?

Hibernation dumps the RAM to the swap partition, if hibernation doesn't work properly it can corrupt the swap. The mkswap command basically cleans and formats the swap partition again and swapon just reactivates the swap so the OS can use it. No magic involved.

Last edited by elliott (2008-04-12 17:30:18)

Offline

#7 2008-04-12 17:39:59

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: How to remedy minor breakages (general approach) [SOLVED, swap]?

Yea, no magic. elliott explained it pretty well.

Offline

Board footer

Powered by FluxBB