You are not logged in.

#1 2014-02-02 01:00:48

lucacerone
Member
From: Spain
Registered: 2012-05-04
Posts: 144
Website

[SOLVED] Swap mount on /dev/sda2 fails at boot

When I boot I get an error saying that mounting swap on /dev/sda2 fails.
I think I followed correctly the procedure explained in the Beginners Documentation, but apparently I didn't.
How can I diagnose the problem and fix it?

Thanks a lot in advance for the help!

Solution: remove the line related to the swap partition from your /etc/fstab file. The swap partition will still get mounted by systemd.

Last edited by lucacerone (2014-02-04 08:34:01)

Offline

#2 2014-02-02 01:41:14

wankel
Member
From: Iowa, USA
Registered: 2008-05-30
Posts: 218
Website

Re: [SOLVED] Swap mount on /dev/sda2 fails at boot

I believe your issue is related to the following:

https://bbs.archlinux.org/viewtopic.php?id=169984&p=2

Offline

#3 2014-02-04 00:07:03

lucacerone
Member
From: Spain
Registered: 2012-05-04
Posts: 144
Website

Re: [SOLVED] Swap mount on /dev/sda2 fails at boot

Hi Wankel, thanks for your reply!
While I am a bit confused by how disabling the line in fstab fixes the issue, the FAILED message is now gone.

Before I mark the thread as solve, can you please confirm me that

swapon -s
Filename				Type		Size	Used	Priority
/dev/sda2                              	partition	4193256	0	-1

means that the swap is active and working as intended? What does Priority -1 mean?

Thanks again for the help!

Offline

#4 2014-02-04 00:23:09

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Swap mount on /dev/sda2 fails at boot

systemd has the ability to detect and handle a certain GUID automatically for swap.  I think that it was intended such that the fstab would override the autodetection, but in practice this does not seem to be the case.  The special GUID for the /home partition can also be used in this way by systemd.

Still, this questions has been asked over and over and over again in these forums recently.  It would have been nice if you had done a quick search before posting.

Offline

#5 2014-02-04 00:30:12

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Swap mount on /dev/sda2 fails at boot

man swapon wrote:

       -p, --priority priority
              Specify the priority of the swap device.  priority is  a  value  between  -1  and  32767.
              Higher  numbers  indicate  higher priority.  See swapon(2) for a full description of swap
              priorities. Add pri=value to the option field of /etc/fstab for use with swapon -a.  When
              priority is not defined it defaults to -1.

Offline

#6 2014-02-04 08:29:06

lucacerone
Member
From: Spain
Registered: 2012-05-04
Posts: 144
Website

Re: [SOLVED] Swap mount on /dev/sda2 fails at boot

WonderWoofy wrote:

Still, this questions has been asked over and over and over again in these forums recently.  It would have been nice if you had done a quick search before posting.

I did.. but searching for "swap fail boot" don't seem to bring to any related post, at least reading the topics ( https://bbs.archlinux.org/search.php?se … 1413802352 )
this thread is not even listed...

Offline

#7 2014-02-04 08:52:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Swap mount on /dev/sda2 fails at boot

You can't link to search results, they're visible only to you (and I think they expire too).
I did search for 'swap fail boot' and this thread was listed as the first one.

Last edited by karol (2014-02-04 08:54:45)

Offline

#8 2014-02-04 09:21:01

lucacerone
Member
From: Spain
Registered: 2012-05-04
Posts: 144
Website

Re: [SOLVED] Swap mount on /dev/sda2 fails at boot

Yes, they expire smile

Offline

Board footer

Powered by FluxBB