Dotan Cohen wrote:
On 10/30/05, Robert Nichols <rnicholsNOSPAM@xxxxxxxxxxx> wrote:
Dotan Cohen wrote:
On 10/29/05, Bruno Wolff III <bruno@xxxxxxxx> wrote:
I think it is probably better to add the entry to /etc/fstab and use swapon -a
so that you can just make changes to /etc/fstab and not have to muck with
rc.local after every swapfile change.
Thanks. I dont intend to change swapfiles ever again! So in that sense
I will add the line to /etc/fstab, and add "swapon -a" to the end of
rc.local. I just want to hear someone say "You wont break anything"
before I do that.
"swapon -a" uses /etc/fstab to find swap files and partitions. If you
don't want to put an entry in /etc/fstab, then you have to give swapon
an argument that explicitly identifies the swap file or partition.
Bob Nichols Yes, "NOSPAM" is really part of my email address.
I have no problem modifying fstab, I just want to know that I'm not
causing any damage. I'm no system admin here, and I would have no way
of fixing it if I broke something and couldn't boot if I couldn't post
here. So I'm double checking before I break something.
OK, I guess I got a bit confused reading through the whole thread. It's
pretty unlikely that you will break anything. If swapon doesn't find
a properly formatted swap file (you did run "mkswap" on the file,
right?), it will just complain and refuse to use it.
The only real danger is running "mkswap" on a partition (e.g.,
"mkswap /dev/hda6") when what you wanted to do was format a swap file
on the file system within that partition (e.g., "mkswap /dir/sfile").
That's a really quick way to clobber the superblock on a filesystem.
(The damage is recoverable, once you've recovered from your panic
attack.)
--
Bob Nichols Yes, "NOSPAM" is really part of my email address.