LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-12-2005, 10:46 AM   #1
zahadumy
Member
 
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226

Rep: Reputation: 31
Stupid question about swap partitions


I know linux uses swap partitions like Windows uses RAM memory. Correct me if I'm wrong. The question: is it possible to have more than one distribution of linux and only one swap partition? Because it is possible to have more than one Windows and only one RAM memory . I suppose it isn't, because everybody has a swap partition for every distro installed. Can you tell me why? Thank you.
 
Old 11-12-2005, 11:06 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
"linux uses swap partitions like Windows uses RAM memory" erm.... absolutely not. try "linux uses swap partitions like Windows uses pagefiles". and either way the answer is yes. just tell them both to use the same one, nothign more to it than that. in actual fact you can make windows use it to, but that's a proof on concept rather than somethign actually worth doing.
 
Old 11-12-2005, 11:07 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Actually, windows (>NT) uses a swap file called pagefile.sys. linux can use either a swap partition or a file. A swap partition is faster and more efficient then a file.

Yes, all linux distributions can share a single swap partition.

Even though memory management is different between windows and linux the basic function of swap is the same.


Last edited by michaelk; 11-12-2005 at 11:08 AM.
 
Old 11-12-2005, 11:31 AM   #4
zahadumy
Member
 
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226

Original Poster
Rep: Reputation: 31
I'm surprised to hear this. So, if i have 2 distributions and I want them to use only one swap partition, all i have to to is edit the /etc/fstab, right? And after that I can erase one swap partition and save that space for something else? Is it that simple?
 
Old 11-12-2005, 11:49 AM   #5
Xena
Member
 
Registered: Nov 2005
Posts: 84

Rep: Reputation: 15
Probably even easier. When installing the second distribution you can probably tell it to use the existing swap partition.

And there are no stupid questions, so ask away
 
Old 11-12-2005, 02:00 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
It is an urban myth that there is no such thing as a stupid question. Just like there's no such word as an't. all lies.

but yes either install the second distro and use the existing swap, or if for some bizarre reason that's not possible (it will never be impossible) you can just install without one at all and add it after
 
Old 11-14-2005, 12:35 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
You see, both of those distros will not be running at the same time. Only one of them will be running and will have access to the swap-partition. (If this is not so, it will not work!) The file-formats used on the swap partition by the various distros are the same. So, all of them can recognize and use the space. They will all know, when they see the partition-type in the partition table, that "this partition is 'linux swap.'"
 
  


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
Stupid, stupid question; I lost Klaptop. :( Surfrider Slackware 2 08-31-2005 09:12 PM
/ and swap partitions (but want more) How to? acummings Slackware 3 07-17-2004 12:33 AM
Do I need 2 swap partitions? CloudBuilder Linux - Newbie 2 11-14-2003 03:09 PM
swap partitions chappy011 Linux - Newbie 2 03-18-2002 01:44 PM
swap partitions rakemup Linux - Software 5 12-10-2001 09:24 PM

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

All times are GMT -5. The time now is 02:43 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