Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: How To use Linux Swap Partition as windows Swap file

  1. #1
    Join Date
    Apr 2006
    Beans
    10

    How To use Linux Swap Partition as windows Swap file

    I came across this neat little trick while researching another issue, installed it and have been running it for about two weeks. That being said, I only use win XP for morrowind, so I can't say I've fully verified this programs functionality.

    How to use linux swap partition as windows swap file:

    1. Go to the website below, and download the swapfs zip file to a windows accessible folder:
    http://www.acc.umu.se/~bosse/


    2. Write down the location of your linux swap partition (for example, mine is the 4th partition on the first drive; /dev/hda4 or (hd0,4). hda=hd0, hdb=hd2, etc... If your drive is sdaX, check your bios settings to determine which drive it is.
    (Do not include extended partitions, only primary and logical).

    3. Extract the contents of the zip file to its own folder, and open up the file "swapfs.reg" for editing, changing the two lines that read "\\Device\\Harddisk0\\Partition1" to the location of your linux swap partition (in my case "\\Device\\Harddisk0\\Partition4").

    4. Copy the driver (swapfs.sys) to "%systemroot%\system32\drivers\".

    5. Reboot, and verify you swap settings under system settings, in the control panel (you may have to turn off the old paging file manually).

    6. Enjoy the extra disk space!



    these instructions are also included with the zip file, along with the source code for the original program. This works great because the swap data contained in linux and windows is forgotten after every reboot, so why not utilize the same space?

    P.S- I didn't write this program, I found it while googling another issue.
    Last edited by jsnipe; August 28th, 2006 at 03:13 AM.

  2. #2
    Join Date
    Jun 2006
    Location
    Germany
    Beans
    Hidden!
    Distro
    Edgy Eft Testing

    Re: How To use Linux Swap Partition as windows Swap file

    I'd definately use this if I still used Windoze
    How about moving it to Howtos? Any mod?

  3. #3
    Join Date
    Apr 2006
    Beans
    10

    Re: How To use Linux Swap Partition as windows Swap file

    I thought about moving it to HowTo's, but it seemed more relevant to the people still using windows (who are for the majority, gamers). If enough people request it I suppose I could move it.

  4. #4
    Join Date
    Dec 2007
    Location
    Philippines, ASEAN Union
    Beans
    204
    Distro
    Lubuntu 12.04 Precise Pangolin

    Talking Re: How To use Linux Swap Partition as windows Swap file

    Move it out from the gaming forums

    Even non-gamers will need that info. There are people who really have no choice but to keep WinXP or WinVista installed - too many factors that prevents us from removing WinXP/WinVista even though we do not use it ourselves. Too many reasons not to.

    I'm just lucky I just know the proper keywords to search and the bots still indexes this thread, so I found this thread

    Thanks for sharing it.. useful. More free space to use now!

  5. #5
    Join Date
    Sep 2008
    Beans
    1

    Re: How To use Linux Swap Partition as windows Swap file

    Thank you for the howto! But I had some problems to determine the partition number. Finally I got it using this method:

    1) On Windows XP select Start->run->"cmd"

    2) run "diskpart"

    DISKPART> list disk


    . Disk n. State Size Free
    . -------- ---------- ------- ---- ...
    . Disk 0 Ready 233 GB 0 B

    DISKPART> select disk 0

    DISKPART> list partition

    . Partition n. Type Size Offset
    . ------------- ---------------- ------- -------
    . Partition 1 Primary 49 GB 32 KB
    . Partition 2 Unknown 178 GB 49 GB
    . Partition 3 Extended 5938 MB 227 GB
    . Partition 4 Logic 5938 MB 227 GB

    DISKPART> exit

    3) Then harddisk number is 0 and the swap partition is the extended one (3)
    Last edited by goldmund99; September 7th, 2008 at 09:32 PM.

  6. #6
    Join Date
    Oct 2005
    Beans
    42

    Re: How To use Linux Swap Partition as windows Swap file

    This should definitely be in the How To section. I for one am not a gamer and still use this trick.

  7. #7
    Join Date
    Oct 2004
    Location
    Denmark - Scandinavia
    Beans
    19,283
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How To use Linux Swap Partition as windows Swap file

    Going to move it then.
    | AMD Ryzen 1700x 3.4 GHz | ASUS PRIME X370-A | 32 GB 2400 Mhz DDR4 |
    | ASUS Nvidia 1070 8 GB | SSD 250 GB | HDD 1 TB |


    My Blog: https://eosvisions.wordpress.com

    Try elementary OS - https://elementary.io

  8. #8
    Join Date
    Jun 2007
    Beans
    30
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: How To use Linux Swap Partition as windows Swap file

    This seems like a great idea, but before I go and do something terrible, could someone just look over this for me please?

    I've got a single hdd. There's Dell utilty partition (FAT) at the start of the drive, then XP in the second, primary partition. Next is my Ubuntu patition (ext3), then an extended partition which contains my Home partition and my Swap partition.

    So am I right in saying that I need to edit the reg file to say disk 0, partition 4 (the extended container)? Even though Ubuntu sees the swap as partition 6?

    . Disk n. State Size Free
    . -------- ---------- ------- ---- ...
    . Disk 0 Online 28 GB 0 B

    DISKPART> select disk 0

    DISKPART> list partition

    . Partition n. Type Size Offset
    . ------------- ---------------- ------- -------
    . Partition 1 OEM 47 MB 32KB
    . Partition 2 Primary 5114MB 47MB
    . Partition 3 Unknown 9GB 5162MB
    . Partition 4 Extended 14 GB 14GB
    . Partition 5 Logical 13 GB 14GB
    . Partition 6 Logical 957 MB 27 GB

  9. #9
    Join Date
    Feb 2009
    Beans
    10

    Re: How To use Linux Swap Partition as windows Swap file

    THREADZURRECTION!

    I used this, rebooted in to windows (haven't booted back in to Ubuntu Karmic yet) and now I have c:/ (20gb) and s:/ (20gb)

    Now i realize that the reg file makes s:/, but why does it trick windows in to thinking that s:/ is a clone of c:/? Is there any way that I can make s:/ accurately display the swap space? There's no change in DISKPART, there's no change in the size of my windows partition displayed in my computer or otherwise.

    What gives?

    Edit: signed in and editing from karmic, no change at all on this side.
    Last edited by CapnBoost; December 7th, 2009 at 11:16 PM.

  10. #10
    Join Date
    Apr 2009
    Beans
    11

    Re: How To use Linux Swap Partition as windows Swap file

    Had just been thinking about this idea and was pleased to find a thread with a potential solution.

    Can anyone confirm that the advice here is still valid for Windows 7 / Lucid?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •