Revision [17685]

This is an old revision of SwapFile made by darkcity on 2011-08-25 05:26:08.

 

HomePage > Components and HowTos

Automatic creation of a swap file when R.A.M.≤256MB


"How to manually create a swap file==== With Puppy 2.//x// and later when using a pup_save file, Puppy will use these files for swap on boot if in same directory as the pup_save file : WIN386.SWP, PAGEFILE.SYS, pup.swp and, with Puppy 2.01, pupswap.swp. Puppy 2.01 and later will create a swap file if needed in same dir as pup_save if needed, unless using 2.02 or later which won't create one if not one of the following file systems: msdos (FAT12/16), vfat (FAT32), ext2, ext3, reiserfs, minix <table cellpadding="2" cellspacing="2" border="1"
style="text-align: left; width: 100%;" bgcolor=#ffffcc>
<tbody>
<td style="vertical-align: top;">
This is a procedure for building a swap file, that is, simply a file rather than a partition.
Puts the swap file on the same partition that holds the personal data file (pup<i>xxx</i> or pup_save*.3fs).
This has been tested on
Win98SE and a different procedure is needed for WinXP.
</td>
</tbody>
""

Note: For
WinXP which uses NTFS, replace the dd step with:
if /mnt/home is an NTFS drive, do not use dd (writing to your NTFS drive can corrupt the file system)
... boot to Windows and create the file by typing something like:
fsutil file createnew C:\pup.swp 512000000
then boot Puppy again

Short on memory? Under 128MB is. Then build a swap file.
Go to Start > Run > Rxvt
Type, then press Enter:
dd if=/dev/zero of=/mnt/home/puppy.swp bs=1024 count=800k
Be patient. This will take several minutes.
That 800k translates to 800MB (819,200KB).
So decrease according to available disk space.

Type, then press Enter:
mkswap /mnt/home/puppy.swp
Type, then press Enter:
swapon /mnt/home/puppy.swp
Go to Start > File Managers > uXplor
Drill down to /root/.etc/rc.d/rc.local and right-click and select edit.
Add this line to the bottom:
swapon /mnt/home/puppy.swp
Save the file. This will turn on the swap file upon next boot.



alternative description
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki