WIN95 Linux share a swap partition from new linux install?

WIN95 Linux share a swap partition from new linux install?

Post by Klaas Hemst » Fri, 10 Nov 1995 04:00:00




Quote:>    Situation: I have Win95 on hda1, a 20meg hda2 for swap, and linux
> just freashly installed on hda3. I would not mind re-installing Linux and
> hda2 to do this.
>    Want to do:
>    Make Win95 use drive "D" the hda2 for it's swap partition, as
> well as have linux use it. And be able to go back and forth from win95 to
> linux without complicated mecanations.
>    I have heard that this is possible, but my linux CD-ROM has no
> text files on it about that subject, and I don't know enough about Linux
> to want to try this on my own.
> Any help gladly accepted.
>    TIA,
>            Jay
> P.S.-Please email as well as post, I will condense/repost into mini-faq.

You can do it best like this (please don't quote me on the exact names
of commands and locations, it's been a while since i installed it on
my Linux box, it has been running without a problem):

1) Make the D drive empty and temporarely do NOT use it as a swap
   drive for Win95. So Drive D should be empty and formatted correctly
   with MS-DOS
2) Go into Linux
3) In linux save the first few blocks (128K or so) from /dev/hda2 with
   dd if=/dev/hda2 bs=512 count=256 | compress > /etc/hda2_copy.Z
4) Put in your rc.local a mkswap command (or what was it) for
   /dev/hda2, and and swapon (or what was it)
5) Put the restore of the hda2_copy.Z file in the appropriate rc file
   (don't remember which) so that it is executed when you shutdown the
   system (i do that with CTRL-ALT-DEL).

Then Windows 95 will see an empty drive D on which to put its swap.
Linux will recreate its swap space each time it boots. It's is fast
enough :-)

If you want a permanent swap file tou should set that up first, then
save the file in Linux. You don't have to save more than 128K or so
because the contents of the Swap-file is not important information,
only the header containts some critical information.

I am using this mechanism for a shared swapfile between Windows 3.11
and Linux.

Klaas

 
 
 

1. Installing Win/Linux shared swap on old swap partition

I need to convert my swap partition into a shared win/linux swap partition,
without having to touch the other partitions. This is my setup (Slackware
2.0):

chromace:~# df
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/hdb1             169268  141720    19085     88%   /
/dev/hdb3              47190   41829     3002     93%   /mnt
/dev/hda1             239064  214524    24540     90%   /dos-c
/dev/hdb4             100106   74974    25132     75%   /dos-d
/dev/sbpcd            662038  662038        0    100%   /cdrom

chromace:~# more /etc/fstab
/dev/hdb1        /              ext2         defaults
/dev/hdb2        none           swap         sw
/dev/hdb3        /mnt           ext2         defaults
none             /proc          proc         defaults
/dev/hda1        /dos-c         msdos        defaults
/dev/hdb4        /dos-d         msdos        defaults
/dev/cdrom       /cdrom         iso9660      ro

Basically I think I know what to to do; I've got the latest mini-howto I could
find (April '94) but I have 2 questions:

1... is there anything I should know that isn't in the howto -- later
     version, recent discoveries/bugs/problems etc?

2... I assume that if I go into Linux, swapoff /dev/hdb2, and remove
     the line "/dev/hdb2        none           swap         sw"
     from my fstab, I can then boot DOS, and proceed with every step
     except number 1: create the partition (which is already there), rather
     I'll create a DOS partition in that same space, give it a drive number
     and label it SWAP SPACE. And when I boot Linux nothing nasty will happen
     b/c something's looking for a non-exisant swap partition.

When I come back into Linux I presume I try to do my editing/symlnks with low
memory usage tools. Does this all sound about right? Or have I missed
something crucial (it's a few months since I installed and played with all
this stuff. I've checked the docs but am still wary of missing something; can't
afford any cock-ups right now).

--                                            

2. Bluetooth & GPRS

3. Win95 shares SWAP partition with Linux?

4. getting machine names

5. Problem with PATH

6. Adding a swap partition to a Linux/Win95/OS2 setup (& HPFS from linux)

7. Userid in .htaccess or .nsconfig

8. How can I have win95 and RH5.2 share swap partition

9. Sharing swap between win95 and linux...

10. Win95+Linux swap-sharing

11. Sharing swap - Linux & Win95

12. partitioning Win95+Linux: reusing swap and home