You are not logged in.

#1 2007-10-22 14:09:47

Gruntz
Member
From: Haskovo, Bulgaria
Registered: 2007-08-31
Posts: 291

swapon problem, invalid argument error.

Hello.

I have problem with mounting my swap partition. I tried to compile a new kernel by myself. Well, the kernel did not work, and I am using the old kernel, but from then I am unable to mount my swap partition. Here is some info


#fdisc -l /dev/sda

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2490    20000893+  83  Linux
/dev/sda2            2491       14593    97217347+   5  Extended
/dev/sda5            2491        2614      995998+  82  Linux swap / Solaris
/dev/sda6            2615       14593    96221286   83  Linux

I have the following entry in my /etc/fstab:

/dev/sda5        swap        swap    defaults                0    0

This is the way, I try to mount my swap.

#swapon -v /dev/sda5
swapon on /dev/sda5
swapon: /dev/sda5: Invalid argument

My current kernel is 2.6.22-suspend2
Can someone help me with mounting the swap partition. If you need more info, I will post more.

Last edited by Gruntz (2007-10-22 14:15:14)

Offline

#2 2007-10-22 15:00:42

enrique
Member
Registered: 2005-10-25
Posts: 95
Website

Re: swapon problem, invalid argument error.

Try as root:

mkswap /dev/sda5

And then swapon


Kind regards, enrique

Offline

#3 2007-10-22 15:01:55

Thrillhouse
Member
From: Arlington, VA, USA
Registered: 2007-05-29
Posts: 175

Re: swapon problem, invalid argument error.

I don't get it.  If you have an entry for swap in fstab, why do you need to run the swapon command?

What's the output of df -h and free -m?


For the strength of the pack is the wolf, and the strength of the wolf is the pack.

Offline

#4 2007-10-22 15:18:29

Gruntz
Member
From: Haskovo, Bulgaria
Registered: 2007-08-31
Posts: 291

Re: swapon problem, invalid argument error.

enrique, thank you for your help. It worked.

Thrillhouse, when I type free -m, there was 0 for swap space. It just does not wanted to mount the swap space. But now is OK.

Thank you all.

Offline

Board footer

Powered by FluxBB