Page 1 of 1

How to make a swapfile for Puppy 2.14? Solved

Posted: Fri 09 Mar 2007, 07:13
by MikeMT
"How to create a Swap File

These instructions may only be current for Puppy 1.x so revisions to the instructions need to be updated for Puppy 2.x to make sure it works and also be very careful when using dd if=/dev/zero!"

This is the caution at the head of the instructions.

After much searching I cannot find any info on making a swapfile for Puppy 2.14. Can someone give a link or instructions?

Thanks

Posted: Fri 09 Mar 2007, 10:49
by trapster
See Here

Also, the new swap file for 214 should be named pupswap.swp

Posted: Fri 09 Mar 2007, 15:59
by MikeMT
Thanks for the link.

Two things make the solution cloudy: One the link was from 2005 which predates Puppy 2.14, and the solution contains the same code as the caution quoted in my first post.

"dd if=/dev/zero of=/mnt/home/pup.swp bs=1M count=512"

Why should one be careful?

Posted: Fri 09 Mar 2007, 16:21
by J_Rey
Well, I can see that you are obviously referring to http://puppylinux.org/wikka/SwapFile although you never mentioned that in this topic yet.... I'm the one who added that warning to the wiki page because the instructions need updated period. Using "dd if=/dev/zero" together zeros replaces things with zeros, which is good for this case just don't make typos or change the dd command parameters unless you're confident in what you're doing. Using "dd if=/dev/zero of=/mnt/home/pup.swp bs=1M count=512" will create an empty 512MB file next to your pup_save file. The only thing to change would be the 512 to how many MB you want the file. Just don't bother creating a swap file on a NTFS partition cuz it won't be used.

Posted: Fri 09 Mar 2007, 18:29
by MikeMT
I understand the caution.

I found a workable solution. I had a remnant knoppix.swp from DSL. I had read about how Puppy 2.14 can use other swap files. I entered the following: "swapon /initrd/mnt/dev_ro1/knoppix.swp". free showed it worked. I then put that command in rc.local.

Was that a good workaround? or have I missed something?

Thanks for the help.

Posted: Sat 10 Mar 2007, 16:21
by Bruce B
Maybe you aren't missing something. Maybe I am.

I run the mkswap command on the file after I make it. Is this not necessary?

Posted: Sat 10 Mar 2007, 18:22
by MikeMT
Bruce,

As I understand it, the mkswap command makes a swap file or partition. The "swapon /initrd/mnt/dev_ro1/knoppix.swp" activates the swap. I activated a swap file which was already created on my hard drive. Then the mkswap command is not necessary, because the mkswap command had been done when running DSL (Damn Small Linux).