You are not logged in.

#1 2008-05-26 15:18:41

o.besner
Member
From: Quebec, Canada
Registered: 2008-05-26
Posts: 8

"Activating Swap" fails during boot

Hi all,

I've been using Ubuntu for a year, and now I've switched to Arch, mainly because Ubuntu is GNOME-dependant and 80% of the software I use is made for KDE and Kubuntu has the worst package managing I've seen in a KDE distro. The problem is : I'm new to all this "nano abuse" and hand configuration. I installed Arch yesterday, did all the rc.conf configurations, managed to install Kdemod, and now my computer is running smoooothly. rc.conf is really a great idea, and pacman + yaourt is all I need.

One thing irritates me though : I get a "fail" during boot when I have to mount the swap partition. I thought it was a mistake, and that I really had a swap. So I searched on these forums, and found that you should get something when you pipe info into grep from dmesg. Here is what I get :

Adding 1124540k swap on /dev/sda2.  Priority:-1 extents:1 across:1124540k

I also did a mount -l to see if my partition was mounted. here are the resulting lines :

/dev/sda3 on / type ext3 (rw)
none on /dev type ramfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext2 (rw)
/dev/sda4 on /home type ext3 (rw)
/dev/sdb1 on /media/My Book type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower) [My Book]

My swap partition is /dev/sda2, and is absent from mount -l. is this a problem ? Probably is,eh ?

To be certain, I did a free -m

total       used       free     shared    buffers     cached
Mem:          1003        767        235          0         53        422
-/+ buffers/cache:        291        711
Swap:         1098          0       1098

The swap is there, but not in use !!!! (My swap partition is 1098 M.)

So I used the only command I knew in this case, which is "sudo mkswap /dev/sda2" (Ubuntu heritage, I like sudo). Didn't work. Said the "Ressource was busy". So I thought I should unmount it, then mkswap it. I used "sudo umount /dev/sda2". The answer was that the device is not mounted !!!

I'm confused. Anyone knows how I can get this to work ? I used to ask my roomate, who is a Gentoo veteran, but he's gone for the summer.

Offline

#2 2008-05-26 17:06:35

JeremyTheWicked
Member
From: Poland
Registered: 2008-05-23
Posts: 193

Re: "Activating Swap" fails during boot

Could you post your /etc/fstab please? And the UUID number of the swap partition (you can issue the command "ls -l /dev/disk/by-uuid/" and check which UUID points to your swap partition).  When you mkswap the UUID of the swap partition changes so you have to update fstab.


arch(3) adj amused because you think you understand something better than other people ;P

Offline

#3 2008-05-26 17:19:54

o.besner
Member
From: Quebec, Canada
Registered: 2008-05-26
Posts: 8

Re: "Activating Swap" fails during boot

This is my fstab

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0


UUID=371d0069-167c-4f60-b821-e0ec63d5e5b6 swap swap defaults 0 0
UUID=5c98e052-7b32-474c-9071-dceba33687e7 / ext3
defaults,noatime,nodiratime 0 1
UUID=aadb66ea-1b05-48b7-8170-df3fef5d5e48 /boot ext2 defaults 0 1
UUID=e7d20e05-9eb3-4c3c-9540-32b2031e3a1e /home ext3
defaults,noatime,nodiratime 0 1
#/dev/cdrom /media/cdrom   auto    ro,user,noauto,unhide   0      0
#/dev/cdrom1 /media/cdrom1   auto    ro,user,noauto,unhide   0      0
#/dev/dvd /media/dvd   auto    ro,user,noauto,unhide   0      0
UUID=371d0069-167c-4f60-b821-e0ec63d5e5b6 swap swap defaults 0 0
UUID=5c98e052-7b32-474c-9071-dceba33687e7 / ext3
defaults,noatime,nodiratime 0 1
UUID=aadb66ea-1b05-48b7-8170-df3fef5d5e48 /boot ext2 defaults 0 1
UUID=e7d20e05-9eb3-4c3c-9540-32b2031e3a1e /home ext3
defaults,noatime,nodiratime 0 1

And this is what I get from the ls -l /dev/disk/by-uuid command.

lrwxrwxrwx 1 root root 10 2008-05-26 13:15 371d0069-167c-4f60-b821-e0ec63d5e5b6 -> ../../sda2
lrwxrwxrwx 1 root root 10 2008-05-26 13:15 5c98e052-7b32-474c-9071-dceba33687e7 -> ../../sda3
lrwxrwxrwx 1 root root 10 2008-05-26 13:15 DA3F-50D8 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2008-05-26 13:15 aadb66ea-1b05-48b7-8170-df3fef5d5e48 -> ../../sda1
lrwxrwxrwx 1 root root 10 2008-05-26 13:15 e7d20e05-9eb3-4c3c-9540-32b2031e3a1e -> ../../sda4

My UUID seems correct in my Fstab. Could it be something else ?

EDIT: If this can help, I tried to mount/unmount /dev/sda2

this is the error I get :

mount point swap does not exist

How do I make it exist ?

Last edited by o.besner (2008-05-26 17:31:36)

Offline

#4 2008-05-26 17:35:23

lldmer
Member
From: Amsterdam
Registered: 2008-05-17
Posts: 119

Re: "Activating Swap" fails during boot

hmm... do you really have all of your partitions twice is fstab? Or was it a wrong copy/paste? I'm not sure if that could cause the problem though.
Maybe you could try to comment-out # the swap line in your fstab, reboot, and try mkswap again.


For lack of better words: chair, never, toothbrush, really. Ohw, and fish!

Offline

#5 2008-05-26 17:47:05

o.besner
Member
From: Quebec, Canada
Registered: 2008-05-26
Posts: 8

Re: "Activating Swap" fails during boot

Yes, I really have them twice. Should I delete the double entries ?

Offline

#6 2008-05-26 18:03:26

o.besner
Member
From: Quebec, Canada
Registered: 2008-05-26
Posts: 8

Re: "Activating Swap" fails during boot

Done deleting the double entries. Problem solved !

It's wierd, since it's been like that since the installation. I didn't add the double entries !! Bug in the installer ???

Thanks for your help ! I'm a bit ashamed of not finding it myself, but then again I've not seen many fstab in my life smile

Offline

#7 2008-05-26 19:46:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: "Activating Swap" fails during boot

Some additional info: swap is not mounted, it is enabled. It does not show up as a mounted filesystem. The mount/umount commands are of no use here - the equivalents for swap are swapon/swapoff. See the man page for details.

And as well as free, you can look at /proc/swaps for info about your swap status.

Finally, don't be alarmed that your swap is not in use - when your system needs it, it will use it.

Offline

#8 2008-06-02 07:58:27

kevmille
Member
From: Saigon, Vietnam
Registered: 2008-06-02
Posts: 44
Website

Re: "Activating Swap" fails during boot

I also ran into a similar problem last night.  I saw triple entries for swap in fstab.  Obviously there is a bug in the install but I figured it out.  Not sure why swap was not enabled during the install but I had to manually mkswap and swapon for /dev/sda2.

After the reboot, my new Arch system worked quite fine.


My Blog: SaigonNezumi.com
My Company: Orion NewTech
Location: Saigon (HCMC), Vietnam

Offline

#9 2008-06-02 12:12:02

foxbunny
Member
From: Serbia
Registered: 2006-10-31
Posts: 759
Website

Re: "Activating Swap" fails during boot

I had a different problem using the 2008.04rc ISO.

The fdisk -l showed a swap partition correctly, but it won't get activated until I mkswap it manually. Is this a bug in the installer? I installed Arch on wife's laptop using the auto-prepare method for partitioning, but I had the same problem on my desktop using the manual partitioning.

Offline

#10 2008-07-06 05:26:24

SyXbiT
Member
From: Seattle, WA
Registered: 2008-06-28
Posts: 177
Website

Re: "Activating Swap" fails during boot

nice. i had the same problem. definitely a bug somewhere, as I installed today from the 2008-06 disc.
'mkswap /dev/sda3' fixed it for me smile

thanks

Offline

#11 2008-07-06 09:34:42

sirocco
Member
Registered: 2008-03-10
Posts: 149

Re: "Activating Swap" fails during boot

foxbunny wrote:

IThe fdisk -l showed a swap partition correctly, but it won't get activated until I mkswap it manually.

See for the double entries in fstab.

Offline

#12 2008-07-06 23:02:18

foxbunny
Member
From: Serbia
Registered: 2006-10-31
Posts: 759
Website

Re: "Activating Swap" fails during boot

I added the second one _after_ I've discovered the bug, but it seems to have gone away (the bug, that is), at least for me. I've installed from the latest ISO, and it's working very well.

Last edited by foxbunny (2008-07-06 23:02:51)

Offline

#13 2008-09-11 07:03:47

eyemeansit
Member
From: Florida, USA
Registered: 2008-09-05
Posts: 14

Re: "Activating Swap" fails during boot

Removing the double entries in fstab fixed the problem for me as well. Thanks!

Offline

Board footer

Powered by FluxBB