From: Henrik Lund (lund@diku.dk)
Date: 09/15/93


From: lund@diku.dk (Henrik Lund)
Subject: Re: Linux and MS Windows 3.1 (yuck) swap space.
Date: Wed, 15 Sep 1993 13:47:46 GMT

broman@schroeder.nosc.mil (Vincent Broman) writes:

>cbeauch@xenon asked:
>> I have a 12Mb Linux swap partition - is this possible to be used as both a
>> Linux and a Windows swapfile?

>If you use the partition under Linux as a swap _partition_, then each
>time you boot DOS to run MS-Windows, you'll have to format the partition
>and recreate the MS-Windows swap file by hand (thru menus and mouse clicks).
>If someone knows what bytes are expected to be present in the swap file
>when MS-Windows starts up, then one could easily write a DOS program
>to create it. Then we get a batch file like...

> format d:
> mymkswap d:\
> win

>I have tried to mount a dos file system under Linux and use a large file
>in that file system (whether the MS-Windows swap file or another)
>as a Linux swap _file_, but without success. After the mkswap run,
>the swapon program complains that it cannot find the right swap signature
>in the file. Anyone know why? Something to do with CRLF != LF?

>Vincent Broman, code 572 Bayside Phone: +1 619 553 1641
>Naval Command Control and Ocean Surveillance Center, RDT&E Div.
>San Diego, CA 92152-6147, USA Email: broman@nosc.mil

This question has been asked before (in the FAQ ?).

It goes something like this (haven't tried it, can't remember all of it).

From dos/windows set up the swap partition and leave.
From Linux gzip the partition. (I think like dd if=/dev/disk37 | gzip file)

Then you can include mkswap,swapon in a file run at boottime.

When you wan't to use windows just swapoff, gunzip, reboot.

This comes with NO WARRANTY , it's the best I can do for yo all.

Cheers Henrik Lund lund@diku.dk