howto: swap file sharing in windows and linux

Status
Not open for further replies.

infra_red_dude

Wire muncher!
a small that tells u howto share swap file between linux and windows. this is something i found out after researching the net for many many dayz. finally i found out that it was a piece of cake while i was getting confused over wot was given in various sites!

1) let windows swapfile reside on a separate partition wid fat32 file system and let it be of a fixed size preferably.
2) boot into linux and ensure that the partition is automounted at boot. note down the partition number.
3) create a suitable mount point for it say, /mnt/swap
4) issue the command: mkswap /mnt/swap/pagefile.sys (assuming pagefile.sys is the windows' swap file)
5) then issue the command: swapon /mnt/swap/pagefile.sys
6) there u haf it, a system that shares the swap file between linux and windows!

u might want to add the last two lines as a startup script. put the scrip in the init.d folder and make sure that the partition is mounted before the script is executed!

i was going crazy looking at complicated steps given at various sources...but somehow i figured out this method...which is something which even a n00b can perform!

cheers!
 

vignesh

Wise Old Owl
Nice tip.....

I don`t think its a good practise to have a swap file on a mounted partition..Have it on /tmp or something..
 
OP
infra_red_dude

infra_red_dude

Wire muncher!
ok! but my intention was to share swap file b/w linux and windows to save that half a gb of space...

anyways i did find out other things on the net..but they were like too messy...i find this method quite viable! :)
 
OP
infra_red_dude

infra_red_dude

Wire muncher!
these are some of those:

*tldp.org/HOWTO/Swap-Space-6.html
*www.ibiblio.org/pub/linux/docs/faqs/Swap-space-FAQ
*www.ibiblio.org/pub/Linux/docs/HOWTO/unmaintained/Swap-Space
 
Status
Not open for further replies.
Top Bottom