Sharing a Swapfile/partition b/w OS/2 & Linux

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by ch.. » Wed, 28 May 1997 04:00:00



Right, Hello everybody!

I have read the FAQ on doing this with Windows and Linux. But has anybody any experience
on doing this with OS/2 & Linux.

I'm going to try it. I'm running out of disc space, and that 30/40 mb is valuable to both!!

My thoughts on this are!

Make a swap file on a extfs partition. Compress this and gzip-d when booting Linux. OS/2 will
just recreate the swapfile. (Note this is possible using a ext2fs driver for OS/2)

OR, Trying the same except using a FAT partition for OS/2 and then compressing this
back for Linux.  (Not sure about this one!!!!)

If anybody has any ideas, please post. (note this is crossposted to two groups!) or email
what ever you prefer. If I have any success, I'll post a digest of posts/solutions etc...

Cheers
Chris

--
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 Chris H. Lindley                                                                        
 Madrid, Espaa            
 E-mail: lindley''''''''''******'''''''''redestb.es    

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by Dale Ponti » Wed, 28 May 1997 04:00:00




Quote:> Right, Hello everybody!

> I have read the FAQ on doing this with Windows and Linux. But has anybody any experience
> on doing this with OS/2 & Linux.

> I'm going to try it. I'm running out of disc space, and that 30/40 mb is valuable to both!!

> My thoughts on this are!

> Make a swap file on a extfs partition. Compress this and gzip-d when booting Linux. OS/2 will
> just recreate the swapfile. (Note this is possible using a ext2fs driver for OS/2)

> OR, Trying the same except using a FAT partition for OS/2 and then compressing this
> back for Linux.  (Not sure about this one!!!!)

> If anybody has any ideas, please post. (note this is crossposted to two groups!) or email
> what ever you prefer. If I have any success, I'll post a digest of posts/solutions etc...

I'm interested in the same thing. At the moment I haven't pursued it
because I'm not yet short on disk space. This too shall pass, and I'll
be in the same boat as you.

I've read the document on sharing for Win/Linux, too, and I suspect
the same technique can be used for OS2/Linux. It may be a bit easier,
since OS/2 is capable of re-creating the swap file on demand where
you have to save it for Windows. The real issue will be saving and
restoring the partition formatting, but FAT/HPFS and raw swap.

If you're having Linux swap to a raw partition, there's no need to
make it ext2fs when OS/2 is swapping to it. I'd just make it either
HPFS or FAT. Linux doesn't seem too hung up about partition types,
so I suspect you can use a type-7 (FAT), for raw partition swap, for
instance.

I suspect the Win/Linux method will work pretty much as-is.

Dale Pontius
(NOT speaking for IBM)

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by Cedric Wa » Wed, 28 May 1997 04:00:00






>> Right, Hello everybody!

>> I have read the FAQ on doing this with Windows and Linux. But has anybody any experience
>> on doing this with OS/2 & Linux.
[8<]
>I suspect the Win/Linux method will work pretty much as-is.

I missed the original posting, but both of you seem interested...

I tried the method described in the HOWTO before, and had no difficulty
to set it up. I used a FAT partition, so I only needed to restore the
first few sectors with dd during Linux shutdown, but maybe you can do
a mke2fs instead. Makes me a little nervous, but then it shouldn't be
more dangerous than a dd...

                        Good luck,
                        Cedric.

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by Dale Ponti » Wed, 28 May 1997 04:00:00




Quote:> Right, Hello everybody!

> I have read the FAQ on doing this with Windows and Linux. But has anybody any experience
> on doing this with OS/2 & Linux.

> I'm going to try it. I'm running out of disc space, and that 30/40 mb is valuable to both!!

> My thoughts on this are!

> Make a swap file on a extfs partition. Compress this and gzip-d when booting Linux. OS/2 will
> just recreate the swapfile. (Note this is possible using a ext2fs driver for OS/2)

> OR, Trying the same except using a FAT partition for OS/2 and then compressing this
> back for Linux.  (Not sure about this one!!!!)

> If anybody has any ideas, please post. (note this is crossposted to two groups!) or email
> what ever you prefer. If I have any success, I'll post a digest of posts/solutions etc...

I'm interested in the same thing. At the moment I haven't pursued it
because I'm not yet short on disk space. This too shall pass, and I'll
be in the same boat as you.

I've read the document on sharing for Win/Linux, too, and I suspect
the same technique can be used for OS2/Linux. It may be a bit easier,
since OS/2 is capable of re-creating the swap file on demand where
you have to save it for Windows. The real issue will be saving and
restoring the partition formatting, but FAT/HPFS and raw swap.

If you're having Linux swap to a raw partition, there's no need to
make it ext2fs when OS/2 is swapping to it. I'd just make it either
HPFS or FAT. Linux doesn't seem too hung up about partition types,
so I suspect you can use a type-7 (FAT), for raw partition swap, for
instance.

I suspect the Win/Linux method will work pretty much as-is.

Dale Pontius
(NOT speaking for IBM)

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by Cedric Wa » Wed, 28 May 1997 04:00:00






>> Right, Hello everybody!

>> I have read the FAQ on doing this with Windows and Linux. But has anybody any experience
>> on doing this with OS/2 & Linux.
[8<]
>I suspect the Win/Linux method will work pretty much as-is.

I missed the original posting, but both of you seem interested...

I tried the method described in the HOWTO before, and had no difficulty
to set it up. I used a FAT partition, so I only needed to restore the
first few sectors with dd during Linux shutdown, but maybe you can do
a mke2fs instead. Makes me a little nervous, but then it shouldn't be
more dangerous than a dd...

                        Good luck,
                        Cedric.

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by hhaft.. » Thu, 29 May 1997 04:00:00


Here is one way to share swapspace:
Here is an idea for shared swap areas:

Create a FAT partition for os/2, and put the swapfile there.
Don't put any permanent files there.  Temporary
files is ok, but no directories!

Use some utility (norton utilities maybe) and find out
exactly where on the disk the data portion of the FAT partition
starts.  I.e. after the boot sector, FAT table and root directory.

Create another overlapping partition, starting at the beginning
of the data portion of the FAT partition and the same size.
Use this partition as a linux swap partition.  (Or use SWAPPER.DAT as
a swap file under linux - if that is possible)

You may optionally use partition magic or something to change the FAT
partition to the largest possible cluster size
and smallest possible root directory size.  This will give you
more swap space & less overhead.

This will work because linux won't overwrite the directory or allocation
information, only the swapfile contents.  Os/2 doesn't care what the
swapfile
contains during startup, it is overwritten anyway.

Nothing special has to be done when starting or shutting down either os.

Helge Hafting

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by ch.. » Thu, 29 May 1997 04:00:00







>>> Right, Hello everybody!

>>> I have read the FAQ on doing this with Windows and Linux. But has anybody any experience
>>> on doing this with OS/2 & Linux.
>[8<]
>>I suspect the Win/Linux method will work pretty much as-is.

>I missed the original posting, but both of you seem interested...

>I tried the method described in the HOWTO before, and had no difficulty
>to set it up. I used a FAT partition, so I only needed to restore the
>first few sectors with dd during Linux shutdown, but maybe you can do
>a mke2fs instead. Makes me a little nervous, but then it shouldn't be
>more dangerous than a dd...

Cedric,

You mean you tried the HOWTO method of sharing Linux/Win swap
files, OR there is a HOWTO on Sharing b/w OS/2 and Linux!!

I so, do you know where?

Cheers
Chris

--
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 Chris H. Lindley                                                                        
 Madrid, Espaa            
 E-mail: lindley''''''''''******'''''''''redestb.es    

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by hhaft.. » Thu, 29 May 1997 04:00:00


Here is one way to share swapspace:
Here is an idea for shared swap areas:

Create a FAT partition for os/2, and put the swapfile there.
Don't put any permanent files there.  Temporary
files is ok, but no directories!

Use some utility (norton utilities maybe) and find out
exactly where on the disk the data portion of the FAT partition
starts.  I.e. after the boot sector, FAT table and root directory.

Create another overlapping partition, starting at the beginning
of the data portion of the FAT partition and the same size.
Use this partition as a linux swap partition.  (Or use SWAPPER.DAT as
a swap file under linux - if that is possible)

You may optionally use partition magic or something to change the FAT
partition to the largest possible cluster size
and smallest possible root directory size.  This will give you
more swap space & less overhead.

This will work because linux won't overwrite the directory or allocation
information, only the swapfile contents.  Os/2 doesn't care what the
swapfile
contains during startup, it is overwritten anyway.

Nothing special has to be done when starting or shutting down either os.

Helge Hafting

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by ch.. » Thu, 29 May 1997 04:00:00







>>> Right, Hello everybody!

>>> I have read the FAQ on doing this with Windows and Linux. But has anybody any experience
>>> on doing this with OS/2 & Linux.
>[8<]
>>I suspect the Win/Linux method will work pretty much as-is.

>I missed the original posting, but both of you seem interested...

>I tried the method described in the HOWTO before, and had no difficulty
>to set it up. I used a FAT partition, so I only needed to restore the
>first few sectors with dd during Linux shutdown, but maybe you can do
>a mke2fs instead. Makes me a little nervous, but then it shouldn't be
>more dangerous than a dd...

Cedric,

You mean you tried the HOWTO method of sharing Linux/Win swap
files, OR there is a HOWTO on Sharing b/w OS/2 and Linux!!

I so, do you know where?

Cheers
Chris

--
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 Chris H. Lindley                                                                        
 Madrid, Espaa            
 E-mail: lindley''''''''''******'''''''''redestb.es    

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by Cedric Wa » Fri, 30 May 1997 04:00:00


[Posted and mailed]


[8<]

Quote:>You mean you tried the HOWTO method of sharing Linux/Win swap

Yes, exactly. IIRC, it works nearly as-is. The only difference I remember
is the way you specify the swapfile in OS/2 (SWAPPATH in CONFIG.SYS, as
opposed to, er, Control Panel in Windows?)

And no, there is no Linux-OS/2 swap HOWTO, but you can submit the slight
changes to the author of the Linux-Win one, if you want. That would make
a Linux-Win-OS/2 swapping-HOWTO...

                        Have fun,
                        Cedric.

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by Dale Ponti » Fri, 30 May 1997 04:00:00




Quote:> Here is one way to share swapspace:
> Here is an idea for shared swap areas:
>...
> Create another overlapping partition, starting at the beginning
> of the data portion of the FAT partition and the same size.
> Use this partition as a linux swap partition.  (Or use SWAPPER.DAT as
> a swap file under linux - if that is possible)
>...

I thought once about doing that, but:

1: I don't have any tools capable of writing a partition table. My
   wife got me a big enough drive for Christmas (3.26G) that I
   haven't had to worry about space, yet. So I haven't bothered to
   fiddle any further.
2: Logical drives in an extended partition are daisy-chained, so
   if the Linux swap partition is "within" the data space of the
   OS/2 swap file, the partition record for the swap partition
   will get overwritten by OS/2 swapping. (Have you actually DONE
   this, or is this just an idea?)
3: With a "jimmied" partition setup like this, I can't believe
   that other tools, OS/2 FDISK being one of them, won't complain
   about it.

Dale Pontius
(NOT speaking for IBM)

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by Cedric Wa » Fri, 30 May 1997 04:00:00


[Posted and mailed]


[8<]

Quote:>You mean you tried the HOWTO method of sharing Linux/Win swap

Yes, exactly. IIRC, it works nearly as-is. The only difference I remember
is the way you specify the swapfile in OS/2 (SWAPPATH in CONFIG.SYS, as
opposed to, er, Control Panel in Windows?)

And no, there is no Linux-OS/2 swap HOWTO, but you can submit the slight
changes to the author of the Linux-Win one, if you want. That would make
a Linux-Win-OS/2 swapping-HOWTO...

                        Have fun,
                        Cedric.

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by Dale Ponti » Fri, 30 May 1997 04:00:00




Quote:> Here is one way to share swapspace:
> Here is an idea for shared swap areas:
>...
> Create another overlapping partition, starting at the beginning
> of the data portion of the FAT partition and the same size.
> Use this partition as a linux swap partition.  (Or use SWAPPER.DAT as
> a swap file under linux - if that is possible)
>...

I thought once about doing that, but:

1: I don't have any tools capable of writing a partition table. My
   wife got me a big enough drive for Christmas (3.26G) that I
   haven't had to worry about space, yet. So I haven't bothered to
   fiddle any further.
2: Logical drives in an extended partition are daisy-chained, so
   if the Linux swap partition is "within" the data space of the
   OS/2 swap file, the partition record for the swap partition
   will get overwritten by OS/2 swapping. (Have you actually DONE
   this, or is this just an idea?)
3: With a "jimmied" partition setup like this, I can't believe
   that other tools, OS/2 FDISK being one of them, won't complain
   about it.

Dale Pontius
(NOT speaking for IBM)

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by ch.. » Sat, 31 May 1997 04:00:00



<snip>

Quote:>> Use this partition as a linux swap partition.  (Or use SWAPPER.DAT as
>> a swap file under linux - if that is possible)

I think I'm going to try this idea, well nothing can go drastically wrong yes!!

I'll just "swapon swapper.dat"  (or do I need to mkswap first!)

Also any ideas on how slower A swapfile will be on FAT or ext2fs!!

Quote:>I thought once about doing that, but:

<snip>

Quote:>2: Logical drives in an extended partition are daisy-chained, so
>   if the Linux swap partition is "within" the data space of the
>   OS/2 swap file, the partition record for the swap partition
>   will get overwritten by OS/2 swapping. (Have you actually DONE
>   this, or is this just an idea?)
>3: With a "jimmied" partition setup like this, I can't believe
>   that other tools, OS/2 FDISK being one of them, won't complain
>   about it.

Well I was going to reply to the original poster, but you seemed to have answered my
question for me!.

I thought the idea of two overlapping partitions sounded, well not odd, but
beyond my knowledge of disc partion structures!!!<grin>

Cheers
Chris
--
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 Chris H. Lindley                                                                        
 Madrid, Espaa            
 E-mail: lindley''''''''''******'''''''''redestb.es    

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

 
 
 

Sharing a Swapfile/partition b/w OS/2 & Linux

Post by ch.. » Sat, 31 May 1997 04:00:00



<snip>

Quote:>> Use this partition as a linux swap partition.  (Or use SWAPPER.DAT as
>> a swap file under linux - if that is possible)

I think I'm going to try this idea, well nothing can go drastically wrong yes!!

I'll just "swapon swapper.dat"  (or do I need to mkswap first!)

Also any ideas on how slower A swapfile will be on FAT or ext2fs!!

Quote:>I thought once about doing that, but:

<snip>

Quote:>2: Logical drives in an extended partition are daisy-chained, so
>   if the Linux swap partition is "within" the data space of the
>   OS/2 swap file, the partition record for the swap partition
>   will get overwritten by OS/2 swapping. (Have you actually DONE
>   this, or is this just an idea?)
>3: With a "jimmied" partition setup like this, I can't believe
>   that other tools, OS/2 FDISK being one of them, won't complain
>   about it.

Well I was going to reply to the original poster, but you seemed to have answered my
question for me!.

I thought the idea of two overlapping partitions sounded, well not odd, but
beyond my knowledge of disc partion structures!!!<grin>

Cheers
Chris
--
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 Chris H. Lindley                                                                        
 Madrid, Espaa            
 E-mail: lindley''''''''''******'''''''''redestb.es    

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

 
 
 

1. Linux & OS/2 sharing same swap partition

Hello

I'd like to try out Linux, and have ftp'd the Slackware version
from ftp.cdrom.com.
Currently I am running OS/2 2.1, and I'm aware that it is possible
to safely delete the swapper.dat file used by OS/2 as long as it's
done from a boot to a floppy or another partition.

I'd like to set up a 20 MB swap partition that can be used by both Linux
and OS/2, depending on what I've booted to. I would envision a
way to delete the OS/2 swapper.dat during the Linux boot, and a
similar command in the OS/2 config.sys to delete the Linux
swap file, perhaps just before the OS/2 swapfile is assigned.

Does anybody know if this can be done?

If it matters, my system is a 486-50 with 8 MB RAM; I know that the
20 MB partition may seem large, but if the new Lotus products
for OS/2 are an indication of things to come, I'll need it.

Thanks,
Mike Harlos

---------------------------------------------------------------------

Winnipeg, Manitoba, Canada.
---------------------------------------------------------------------

2. floppy mount

3. comp.os.linux, comp.os.linux.misc, comp.os.linux.security, comp.os.linux.networking

4. DHCP doesn't work in Old Network card?

5. ** Sharing partitions btwn OS/2 2.1 and Linux

6. Upgraded RH7.2->7.3 GRUB didn't work, trashed my Windows C:, HELP!

7. OS/2 and LINUX sharing the same partition

8. Dual processors supported?

9. Sharing linux swap partitions with OS/2 ?

10. Urgent , add swapfile but reboot server failed (PROD server) OS : Linux

11. Share swapfile between Linux and MSWindows?

12. Sharing Linux and Win31 swapfile

13. Sorry-Need help sharing swapfiles btwn linux/windows