LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-19-2004, 09:38 PM   #1
jasontn
Member
 
Registered: Feb 2004
Location: Malaysia
Distribution: Fedora Core 2
Posts: 60

Rep: Reputation: 15
Share swap partition - Linux and Windows XP


I have 256MB of RAM and have both Red Hat 9 and Win XP living on the same hdd.

Both require swap spaces. Can they share the same space/partition?

Isn't it an awful waste of space to devote nearly 1 GB for swap only?
 
Old 02-19-2004, 09:56 PM   #2
KDE4me
Member
 
Registered: Apr 2003
Location: Australia
Distribution: RedHat 9.0 / Slackware 9.0/ FreeBSD 4.8 / Solaris 8 x86 / Mandrake 9.0
Posts: 90

Rep: Reputation: 15
No.
Linux Swap is the linux type
and I always thought that NT used swap files on their partition.
Anyway they are incompatible.

And 1GB total is a lot.
I't's highly unlikely that you'll really need that amount of swap space in total, you could probably get away with 250M-500M (as long as you are going to use it for normal use) if you are that concerned - as your machine seems fairly recent, if you did this though in future you might have to resize your disk - no big deal or just create a swap file for linux if you don't want to resize partitions.
 
Old 02-19-2004, 10:22 PM   #3
jasontn
Member
 
Registered: Feb 2004
Location: Malaysia
Distribution: Fedora Core 2
Posts: 60

Original Poster
Rep: Reputation: 15
(256 * 2 for Linux) + (256 * 2 for WinXP) = waste

:-(
 
Old 02-20-2004, 01:12 AM   #4
harshavardhana
LQ Newbie
 
Registered: Nov 2003
Posts: 22

Rep: Reputation: 15
repartion your swap space 1gb is not required for a 256MB RAM .
and win-xp can't share swap bcoz it's a linux type
----------------------------------------------------------------------------------
Q^R^ready ^### init sequence
 
Old 02-20-2004, 02:18 AM   #5
jasontn
Member
 
Registered: Feb 2004
Location: Malaysia
Distribution: Fedora Core 2
Posts: 60

Original Poster
Rep: Reputation: 15
I do understand your replies, i.e. possibly 512MB swap partition and the 512MB (I always change to static sized virtual mem in windows) swap FILE in windows.

Thanks.

What would happen in Linux if insufficient memory? Will it dump core? Abend?
 
Old 02-20-2004, 07:33 AM   #6
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
There is a howto on sharing swap with Windows ( www.tldp.org ). You make a FAT32 partition and tell Windows to make it's swapfile there, then tell Linux to use the swapfile too.
As for what happens when there is insufficient memory, I think it just abruptly closes the memory hogging app.
 
Old 02-20-2004, 07:49 AM   #7
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
1 GB is not a waste in windows unless you either have a tiny harddrive or never use any memory-intensive applications. With 768mb swap file in Windows, and 512mb ram, I've seen times when Win still had to resize (3D Studio Max was the culprit). In Linux I've never seen much swapping.
 
Old 02-20-2004, 07:58 AM   #8
jasontn
Member
 
Registered: Feb 2004
Location: Malaysia
Distribution: Fedora Core 2
Posts: 60

Original Poster
Rep: Reputation: 15
Thanks for the pointer.

http://www.tldp.org/HOWTO/Swap-Space.html

I read about this ages ago but have not come across it lately. Back then, RAM size is quite small, requiring little swap space. However, the procedure looks very tedious. Is it possible to do this with WinXP?

--- from the how-to ---
What if the swap partition is a FAT32 ? No, you can't have a swap partition with a FAT32 file system. First of all, Linux can use a maximum of 128MB of swap space on a single swap partition. Thus, if your swap partition is larger than 128MB, you are wasting your disk space. And Windows will refuse to convert a partition of 128MB into a FAT32 file system.
-----

Is the max linux partition of 128MB still valid (say RH9)?
 
Old 02-20-2004, 08:52 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,716

Rep: Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751
Quote:
Originally posted by jasontn

Is the max linux partition of 128MB still valid (say RH9)?
Nope. Max single swap partition size is 2GB. You can have up to 8 swap partitions or swap files for a total swap of 16GB.

The one time I ran out of memory due to a program with a memory leak the OS just crashed.

The amount of swap space is really dependent on what apps you run. For most desktop users 512mb is plenty. I've never tried to share swap between windows and linux. A linux swap partition is faster then a swap file and FAT32 isn't as efficient as a native linux filesystem. Unless you have a small hard drive 512mb isn't much space.
 
  


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
Windows/Linux Fat32 Share partition problem Halsafar Linux - General 1 09-23-2005 07:17 PM
Windows/Linux swap Partition scripts Linux - Software 1 06-23-2005 02:36 PM
How do I partition so Red Hat and SuSE share the same swap file. sjia Linux - Newbie 3 01-31-2004 08:26 AM
Share partition between windows and linux david@aber Linux - Newbie 4 11-20-2003 09:22 AM
Can I share a swap partition between mdk and rh? mark_umr Linux - General 7 10-31-2002 07:50 AM


All times are GMT -5. The time now is 05:54 AM.

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