LinuxQuestions.org
Visit Jeremy's Blog.
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, 11: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, 11: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, 11:33 AM   #3
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
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, 11: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, 10: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, 10:30 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
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, 02: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:19 PM
assigning a swap partition after installation Cinematography MEPIS 3 07-28-2005 12:09 PM
possible to change swap space after installation? hari_mj23 Linux - Software 1 06-17-2005 03:10 PM
Installation gives dual swap partitions timsch75 Slackware 3 03-19-2004 05:03 PM
installation - partition / swap problem catch Linux - Software 3 03-10-2002 05:51 PM


All times are GMT -5. The time now is 07:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration