From: msb@cats.ucsc.edu (Maurice S Barnum) Subject: Re: Linux and MS Windows 3.1 (yuck) swap space. Date: 16 Sep 1993 06:33:03 GMT
In <KREJ.93Sep15232016@eat.electrum.kth.se> krej@electrum.kth.se (Kristian Ejvind) writes:
>6) Save and compress the swap partion to a file:
>dd if=/dev/hda4 | gzip -9 > /.winswap
you don't actually need to save the WHOLE partition. there are a
number of DOS utilities that can tell you where the start of the
data is on a partition. save all of the sectors up to that one,
and that one also. (for example: I had a setup where the fat took
the first 23 sectors, so I saved 24, using
dd if=/dev/hda4 of=/etc/dos.swp bs=512 count=24
and
dd if=/dev/hda4 of=/etc/linux.swp bs=512 count=24
of course, the first dd was done after setting up the windoze
swap file, the second, after running "mkswap" on the
partition.
>/bin/mkswap /dev/hda4 5967
becuase I also saved the first set of sectors when the partition
was set up for linux, I restore with
dd of=/dev/hda4 if=/etc/linux.swp bs=512 count=24
instead. faster than mkswap
>8) These commands will destroy the dos partion and the windows swap
>file and must be restored before windows can be used. I do this when I
>reboot linux automatically with this script which I have named
>/etc/reboot and with a link to it from /etc/halt:
>----/etc/reboot-----snip-----8<--------
[...]
>----end /etc/reboot-----snip-----8<----
>and I have moved the original /etc/reboot and /etc/halt to
>/etc/.hidden/reboot and /etc/.hidden/halt
I did something similar, then realized that, if using the sysvinit
package, I was being silly. If I had to do it again (different
setup now, don't do stuff like above currently), I'd just modify
/etc/brc to look something like: