LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-10-2006, 10:17 AM   #1
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Rep: Reputation: 32
can i set the swap after installation


hello all

any one here know hwo can i set the swap size after installation and how to know the size of it

cuz i did installation with automatic option and i want to make aswap how can i do that and i will

be thankful .

notice am working on Suse linux Enterprise desktop
 
Old 11-10-2006, 10:28 AM   #2
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
chances are big that there is already a swap partition.

you can see this by typing "cat /etc/fstab" or "mount".
If you see a line with the word swap then you have already one.

But you can also create a swap file after the installation or make a bigger swap partition.

I dont know exactly what commands are needed but Im shure you need swapon (to turn it on & swapoff) (pls look in google, will be easy to find)
 
Old 11-10-2006, 10:33 AM   #3
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Create a partition on your HDD if you don't already have one. Assume that this partition is /dev/hda2, do this
Code:
mkswap /dev/hda2
swapon /dev/hda2
Add a line to /etc/fstab so you don't have to manually turn on swap everytime you boot.
 
Old 11-10-2006, 10:38 AM   #4
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
If you have a swap partition you can do
Code:
mkswap /dev/hdX1
and
Code:
swapon /dev/hdX1
.
 
Old 11-11-2006, 09:01 AM   #5
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
thanx for all

so how can i set the swap size howa can i set it as 1024 MB and thanx again
 
Old 11-11-2006, 09:30 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Do you presently have a swap partition? As previously posted look in your /etc/fstab file and an automatic install should of created a swap partition The console command free will show swap space. If total space is greater then zero your swap is active. How much memory do you have installed in this computer and how much swap is being used?

How much swap space required is determined by what you use the computer for and what applications you run. For the typical basic user 512mb is sufficient. Adding additional swap space might be difficult. An automatic install will use all available space and I assume the automatic install created an LVM partition. So it should be possible to resize but it might not be something you may not be willing to undertake.

Here is an eample to create a 128mb swap file.
dd if=/dev/zero of=/tmp/swapfile bs=1024 count=131072
chmod 600 /tmp/swapfile
mkswap /tmp/swapfile
swapon swapfile
To automatically use the file add an entry to your /etc/fstab file
/tmp/swapfile swap swap defaults 0 0

If your /tmp is automatically cleaned at boot then use another directory.
 
Old 11-11-2006, 01:35 PM   #7
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
thanx alot i found that he swap automatically created by set up and thanx for you explination
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New installation needs Swap and I can't partition it alxr SUSE / openSUSE 2 11-12-2005 05:19 PM
assigning a swap partition after installation Cinematography MEPIS 3 07-28-2005 11:09 AM
possible to change swap space after installation? hari_mj23 Linux - Software 1 06-17-2005 02:10 PM
Installation gives dual swap partitions timsch75 Slackware 3 03-19-2004 04:03 PM
installation - partition / swap problem catch Linux - Software 3 03-10-2002 04:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration