You are not logged in.

#1 2011-06-04 03:34:03

julian516
Member
Registered: 2011-06-04
Posts: 20

[solved] New Archer, new install, swap file not working

This is my first post on the forum.  I am installing Arch by following the first-rate Beginner's Guide.  I chose to do a net install and that has seemed to go very well.  But I have a gremlin in the works.

I followed the Guide closely save that I did not install GRUB.  Since I also run Debian 6.0 I decided to have Debian add Arch to its Grub2 boot menu.  This worked perfectly.  So I took a break.

When I returned and rebooted,  Arch appeared to come up just as it should, but as things scrolled by I noticed:

"activating swap        [failed]"

Oops!  (Deep technical language for Oh @##%!)

/etc/fstab looks like this:

# /etc/fstab: static file system information

<file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
/dev/sda swap swap defaults 0 0
UUID=59d93a99-54da-4a6a-9360-b97f370288c1 swap swap defaults 0 0
UUID=a97613b1-621c-44c0-a118-96ace77a64b7 /home ext4 defaults 0 1
UUID=b0a358f7-25d7-485e-aad3-c6927d378c84 / ext4 defaults 0 1

This looks right - almost.  I have used fdisk -l and blkid to verify the swap partition location on sda7 and the UUID for that partition.

This looks much like the /etc/fstab for my Debian 6.0 system with the exception that the fstab file there does not show the line:

/dev/sda swap swap defaults 0 0

Should this line be where it is in the Arch /etc/fstab?  Should I remove it?

If I do swapon -a that returns:

/dev/sda: read swap header failed: Invalid argument

If I do swapon -s that returns:

/dev/sda7 partition 6602676 0 -1

Because I use suspend on my laptop my swap file is set at a bit better than 2X RAM, so the size shown above is right.

I do not understand the "priority" setting.  Is the -1 priority right?  If not how do I change it?

One last question:  Does the order of mounting in /etc/fstab make a difference?  I see that the order is to mount swap, then /home and finally /.  Is this appropriate?

I did locate the Arch wiki piece on the fstab file.  In terms of examples given there my fstab file looks to be in order.  But the fact remains that Arch evidently cannot mount and use it.

Thank you for your help.

Last edited by julian516 (2011-06-05 02:53:27)

Offline

#2 2011-06-04 03:50:13

rayjgu3
Member
From: Chicago IL usa
Registered: 2004-07-04
Posts: 695

Re: [solved] New Archer, new install, swap file not working

julian516 wrote:

/dev/sda swap swap defaults 0 0


there should be a number after  /dev/sda#
to indicate which partition is swap

Offline

#3 2011-06-04 05:27:03

julian516
Member
Registered: 2011-06-04
Posts: 20

Re: [solved] New Archer, new install, swap file not working

Thank you!  I looked at that and thought "Surely it is not trying to assign the entire sdfa7 as swap???"  But I was confused by the entry because it seemed swap was being defined by its UUID as the first entry in the list just below.

So I'll fix this ASAP and be a smarter Archer for the experience.

Offline

#4 2011-06-04 21:48:10

julian516
Member
Registered: 2011-06-04
Posts: 20

Re: [solved] New Archer, new install, swap file not working

Sad to say the suggestion made by rayjgu3 did not work, though I thank him for his idea.  On boot the swap file still is not on and operational.  So at the moment I am studying the Arch wiki piece on /etc/fstab on more time so that my own file appears as similar to the examples given as possible.  Then we'll see how that tests.

Offline

#5 2011-06-05 02:36:02

rayjgu3
Member
From: Chicago IL usa
Registered: 2004-07-04
Posts: 695

Re: [solved] New Archer, new install, swap file not working

try only 1 entry for swap
also is the type correct in cfdisk it is 82 I believe
is it  formated properly?

Offline

#6 2011-06-05 02:52:41

julian516
Member
Registered: 2011-06-04
Posts: 20

Re: [solved] New Archer, new install, swap file not working

Good questions.  The swap at sda7 has been used by a number of distros, each of which has found and used it without a problem.  I suspect Arch would have done so as well and that I made some sort of error as I did my configuration.  In the end I did two things after consulting the Arch wiki piece on /etc/fstab.

1.  I completely eliminated the line in fstab which read:

/dev/sda swap swap defaults 0 0  (I tried /dev/sda7 ...)

So your suggestion was right; just list the swap partition once.

2.  Necessary or not I changed the order of listings in that file from swap, /home, / to /, swap, /home.

On reboot swap was activated as it should be with no problems.

Thanks for staying with this, much appreciated!

Offline

Board footer

Powered by FluxBB