Solved

swapon at bootup

Posted on 1997-03-14
1
376 Views
Last Modified: 2013-12-15
Right now I do my swapon command manually after bootup.
In what file would I place this command to get the swap
activated automatically at boot?
0
Comment
Question by:jaanders
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
timc earned 50 total points
ID: 1626990
It may depend on your flavour of Linux.

Using SysV style inits, the /etc/rc.d/rc.sysinit script contains some lines just after the network configuration call which say:

# Start up swapping.
echo "Activating swap partitions"
swapon -a

This is typical of your RedHat Linux's ...

If it's Slackware, perhaps look in /etc/rc.d/rc.S.  After the path statement, you can swapon there, e.g.

#!/bin/sh
#
# /etc/rc.d/rc.S:  System initialization script.
#

PATH=/sbin:/usr/sbin:/bin:/usr/bin

# enable swapping
/sbin/swapon -a

 etc ...

Does that help?

0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question