LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 11: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, 12:06 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
"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, 12:07 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,930

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
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 12:08 PM.
 
Old 11-12-2005, 12:31 PM   #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, 12:49 PM   #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, 03:00 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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, 01:35 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,151

Rep: Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203
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


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


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