Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 11574  / 2 Years ago, sat, june 25, 2022, 2:34:25

I am dual booting my system with Ubuntu 12.04 and Windows 7. I have created the special swap partition for Ubuntu while installing (as recommended).



Can Windows use this swap area/partition--as its own swap/page file--when I boot from Windows?


More From » 12.04

 Answers
0

It's possible, but probably only as an experiment:



Note: This is a what-if answer and is not recommended, especially if you are using hibernate from Ubuntu!




  • In theory, yes, Windows should be able to use your swap partition for its page (swap) file with some clever scripting on the Linux side.



  • I'm not going to do a step-by-step because I haven't tried it and if you can't figure out how to implement this you shouldn't be trying it either :)



    1. Format the partition as NTFS from within Windows and set up Windows to use that drive exclusively for its swap file (nothing on C:)



    2. Have a startup/upstart script to format the partition as Linux swap on Ubuntu startup and enable swap (swapon).



    3. Have a shutdown script to swapoff and reformat the partition as ntfs.






Alternative (still not recommended) option:


You can create a swap file by following this guide on the NTFS partition, provided the NTFS partition is large enough for both swap files.


However this alternative is not recommended because:



  • Swapping on an NTFS(3G) partition would be extremely CPU-heavy.

  • And to make things worse, since the file can/will be fragmented, that would also cause a performance hit.


[#37516] Monday, June 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
taigysel

Total Points: 33
Total Questions: 136
Total Answers: 114

Location: Singapore
Member since Wed, Jan 13, 2021
3 Years ago
;