I found out that the procedure mentioned in v1.4 of this document was a bit buggy. If you have used v1.4 procedure to set up a shared swap space between Linux and Windows and found out that if you happen to check drive X: for errors with ScanDisk, it gives errors, follow the following procedure to get things correct.
First of all, start Linux, and just comment out the line in rc.sysinit file which calls the swapinit.sh script and the line in halt file that calls the swaphalt.sh script. In effect, no swap partitions will be activated when you start Linux the next time. If your system RAM is low consider creating a swap file for temporary use. For details, refer to the section "A couple of notes".
Next, shut down Linux, start Windows, press F8 at start and then select Command prompt only from the startup menu. Now type at the command prompt:
C:\>SCANDISK X:
ScanDisk will tell that the folder RECYCLED
or some other folders
are damaged. Tell it to correct the errors. It may also find some lost
cluster chains. Tell it not to save them. In short, repair your drive X:
and make sure that ScanDisk does not touch the win386.swp file. You may
consider keeping a note of the size of win386.swp before and aftre
ScanDisk. If ScanDisk does modify the size of win386.swp, add anything
rubbish or delete data from the file to restore it's size.
Clean the X: drive so that it contains only win386.swp file. Delete all
other files and the RECYCLED
folder. Type the following command
to delete RECYCLED
folder:
C:\>X:
X:\>ATTRIB -R -H -S RECYCLED
X:\>DELTREE RECYCLED
Start Linux. Log in as a root and give the following command:
# dd if=/dev/winswap bs=512 count=XXX | gzip -9 > /etc/winswap.gz
where XXX are the now familier total special sectors.
Now uncomment the commands for swapinit.sh and swaphalt.sh in the respective files and also remove any command that you added for using the swap file. You system is now ready for use.