Re: Swap doesn't work

Alex Riesen (fork0@users.sourceforge.net)
Sun, 27 Oct 2002 10:23:37 +0100


> I've made my linux-from-scratch with latest stable (2.4.19) kernel, made
> swap, turned it on but it doesn't work. It seems it does but when there's
> not enough memory, the system crashes. Either it kills the application
> desiring more memory (gcc or something) or crashes the kernel with memory
> dump. Neither the 2.4.20-pre5-ac3 helped.

Does your swap partition show up in /proc/swaps? It has to contain
something like this:

Filename Type Size Used Priority
/dev/hda6 partition 506008 0 -1

Btw, do you see something swap-related in dmesg? Like:

Unable to find swap-space signature
Unable to handle swap header version ...
Swap area shorter than signature indicates
Empty swap-file

And do you actually see something like this:
Adding Swap: 506008k swap-space (priority -1)

How did you initialized the swap partition? Recent kernels support both
v1 and v2 swaps, which is can be set for mkswap using -v0 (-v1).
Actually i mean did you initialized it at all? 8)

-alex
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/