April 17, 201016 yr Hi.Again I find myself attempting to set up a old pc for someone. Based on it's specs, I was going to try installing an older Windows on it, along with a Linux that could run modern programs. (Native Linux, or WiNE)My main question is: Is it possible to set up a shared swap-space/page-file on a separate partition from the OSes? Yes, I know Linux uses a partition, and Windows uses a file on a partition. Would there be some way for me to max out the size of the Windows paging file to the size of the partition, assuming the min & max sizes are the same?
April 18, 201016 yr Yes, I know Linux uses a partition, and Windows uses a file on a partition. Would there be some way for me to max out the size of the Windows paging file to the size of the partition, assuming the min & max sizes are the same?Do you also know which filesystems the two OS actually use? jaclaz
April 18, 201016 yr It is not, or hardly, possible to put a Windows swapfile on a Linux swappartition, because it doesn't contain a filesystem. However, it is possible to use a file as swapspace for Linux. You'll have to add some commands to the Linux startscript, something likemount /dev/hda5 /mnt/hda5mkswap /mnt/hda5/pagefile.sysswapon /mnt/hda5/pagefile.sysI don't know which Windows will do with a swapfile which is used this way.
April 18, 201016 yr Author Yes, I know Linux uses a partition, and Windows uses a file on a partition. Would there be some way for me to max out the size of the Windows paging file to the size of the partition, assuming the min & max sizes are the same?Do you also know which filesystems the two OS actually use? jaclazThey will both recognize the standard fat (16, 32) file systems...I found some rudimentary instructions on the web, but they were tailored towards specific Linux distros (or Windows XP using the NTFS file system).
April 18, 201016 yr I found some rudimentary instructions on the web, but they were tailored towards specific Linux distros (or Windows XP using the NTFS file system).Give pointers to them, they may be easier and faster to adapt to Win 9x/ME, than if we start inventing a method from scratch. Then again... Mijzelf may just have hit jackpot with his idea, which should completely obviate the need for a swap partition... And, BTW, the name of the Win 9x/ME swapfile need not to be always win386.swp, it may be whatever you want: just use the directives exemplified below (add them, if the don't exist) at the [386Enh] section of SYSTEM.INI PagingFile=J:\PAGEFILE.SYS PagingDrive=J:MaxPagingFileSize=1835008MinPagingFileSize=1572864Also, BTW, do read these two pages: Sharing Swap Files and, particularly, Linux Swap Space Mini-HOWTO
April 19, 201016 yr They will both recognize the standard fat (16, 32) file systems...Sure. I was just only hinting what Mijzelf explicited, that the Linux "Swap partition" has actually NOT a filesystem, (the 0x82 ID simply means "don't mess with it" ):http://www.win.tue.nl/~aeb/partitions/partition_types-1.htmlAs you pointed out, traditionally Linux uses this partition space as RAW, whilst you want to set up the Linux install to use a swap file, instead:http://www.linux.com/news/software/applications/8208-all-about-linux-swap-spacehttp://linux.die.net/man/8/mkswapjaclaz
April 20, 201016 yr I was just only hinting what Mijzelf explicited... jaclaz, The Finder, I hereby award you the 2010 trophy for the most transverse hint of the year!!!
April 20, 201016 yr I use swap files instead of swap partitions on all of my Linux installs (the only exception being my first experiment with Linux). And, it is possible to move the Windows swap file to a different partition as dencorso pointed out. So what you are wanting should be possible, provided Linux and Windows don't have a problem using the same file.
April 20, 201016 yr Author It is not, or hardly, possible to put a Windows swapfile on a Linux swappartition, because it doesn't contain a filesystem. However, it is possible to use a file as swapspace for Linux. You'll have to add some commands to the Linux startscript, something likemount /dev/hda5 /mnt/hda5mkswap /mnt/hda5/pagefile.sysswapon /mnt/hda5/pagefile.sysI don't know which Windows will do with a swapfile which is used this way.Okay, two questions about this.What if I already created a swap file through Windows, could I just use that with the swapon command?And... how do I add this file to the startup script, is it the same for every generic Linux?
April 20, 201016 yr What if I already created a swap file through Windows, could I just use that with the swapon command?Yes, after applying mkswap. But I don't know what Windows will do with the -now Linux- swapfile.And... how do I add this file to the startup script, is it the same for every generic Linux?No. Different distro's can use different ways to boot. But in many cases you can add the commands to /etc/rc.local or /etc/rc.d/rc.local
April 20, 201016 yr Author What if I already created a swap file through Windows, could I just use that with the swapon command?Yes, after applying mkswap. But I don't know what Windows will do with the -now Linux- swapfile.I loaded up the Windows 9x after doing this, and it seems to be fine.And... how do I add this file to the startup script, is it the same for every generic Linux?No. Different distro's can use different ways to boot. But in many cases you can add the commands to /etc/rc.local or /etc/rc.d/rc.localFound it, thanks. (See above)BTW - Is there any way for me to check to see if it's working properly, like a utility/command to see if it's being used? Edited April 20, 201016 yr by HardDriv'n
April 20, 201016 yr BTW - Is there any way for me to check to see if it's working properly, like a utility/command to see if it's being used?cat /proc/swaps
April 20, 201016 yr @HardDriv'n: once you're satisfied its working OK, you might put toghether a Mini How-To here, for others having the same need.
Create an account or sign in to comment