From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) Subject: Re: "Memory exhausted" problem in X solved Date: 20 Sep 1993 00:24:25 +0300
hancu@crim.ca (Marius Hancu) writes:
> Following his advice on a related query, I inserted the following
> lines in my /etc/rc file:
>
> mkswap -c /dev/hda2 16500
> swapon -a
Only the swapon command should be needed in /etc/rc; the mkswap needs
to be only once for each swap area (the mkswap doesn't really hurt,
except it takes a little while to run, and if you ever use /dev/hda2
for something else and forget to remove the mkswap from /etc/rc,
you're screwed).
> Would someone comment on why I had to insert these lines in those
> files? I would have expected to get by just by the commands at
> partitioning time. Don't they have a lasting effect?
The mkswap program writes a `swap area signature' to the file, in
addition to doing some other stuff (I'm not sure exactly what, but
that is irrelevant). This has a ``lasting effect''.
The swapon tells the operating system that it can use a particular
swap area. This has to be done each time the system is started, and
that's why the command has to be in /etc/rc (which is run when the
system starts).