Page 1 of 1

How to tell if Puppy uses my swap?

Posted: Thu 20 Oct 2005, 00:27
by gliezl
when I type free i only get the amount of RAM I have in my system. When you're running live CD, does Puppy uses swap space or something?

What I did is to create a swap file. First I mounted a partition and using the dd if=/dev/zero of=linux.swp bs=1024 count=262144 command & parameter to create the file. After that, I typed mkswap -c linux.swp then swapon linux.swp.

Will Puppy use this one?

Posted: Thu 20 Oct 2005, 01:29
by Flash
Does MUT see the swap file you created?

Jady

Posted: Thu 20 Oct 2005, 01:50
by raffy
Rev Jady is the expert on this - making swap AS A FILE (not a partition) - see this.

Posted: Thu 20 Oct 2005, 02:25
by GuestToo
is your swap file on the mounted partition, or is it in /root? (it probably should not be in /root)

probably you would put your swap file where your pup001 file is, because that partition is already mounted ... then you would put this in /etc/rc.d/rc.local so that the swap file is mounted when Puppy boots:

swapon /mnt/home/linux.swp

if you want to use a swap file on, for example, /mnt/hda5, you would create the swap file on hda5, then you would put something like this in rc.local so the swap file will be used when Puppy boots:

mkdir /mnt/hda5
mount -t ext3 /dev/hda5 /mnt/hda5
swapon /mnt/hda5/linux.swp

(change it to work properly with your system)

Posted: Thu 20 Oct 2005, 06:13
by gliezl
if I installed Puppy to hard drive, do I need to edit /etc/fstab or /etc/rc.local?
Which of the two you would recommend?

Thank you guys! :)

Posted: Thu 20 Oct 2005, 06:26
by GuestToo
it's probably just as easy to edit rc.local ... you can edit one or the other, you do not need to edit both

fstab may get overwritten when Puppy boots ... rc.local whould not get overwritten, even if you upgrade

Posted: Mon 14 Nov 2005, 22:09
by kelewax
I have a problem creating and using a swap file on an NTFS Harddisk
I followed the steps outlined in
http://puppylinux.org/wikka/SwapFile
to create c:\pup.swp, then I boot off windows XP and boot Puppy
Then from Rxvt I typed
mkswap /mnt/home/pup.swp

The response I got is as follows

setting up swapspace version 1, size=511995KB
Mkswap : unable to write signature page

When I typed
Swapon /mnt/home/pup.swp

The response I got is as follows

Swapon : /mnt/home/pup.swp : invalid argument


Please somebody help me out.

problem with swap file on NTFS

Posted: Sat 26 Nov 2005, 15:47
by JaDy
First, my disclaimer: Although I own the SwapFile wiki page and documented the NTFS procedure from another Puppian, I don't have an NTFS system so I can't test it. So, the following is speculation, after much research.

Found this at http://www.ussg.iu.edu/hypermail/linux/ ... /0501.html:
I just noticed that I can do
mkswap foo; swapon foo
which fails, ("Unable to find swap-space signature"), while
mkswap foo; sync; swapon foo
succeeds.
That may work and is probably safe. But, I wonder, does the file need to be zeroed out, like with this:
dd if=/dev/zero of=/mnt/home/puppy.swp bs=1024 count=512k
Be cautious, the Microsoft NTFS is fragile.

Another thought. Found this at microsoft.com:
you must be logged on as an administrator [to use fsutil]
So, I wonder if the fsutil you used really did something. In WindowsXP, do you see the pup.swp file in the same folder (should be the root folder of drive C) as your pup001 file?
kelewax wrote:I was logged on as an administrator before I created pup.swp file in the same location as pup001.
Yes fsutil created the pup.swp file because I am able to see it from both windows and puppy.
I think fsutil is working well because I have used it several times to enlarge my pup001
P.S. Tell me more about your system. Windows version. Puppy version. Memory and disk sizes.
kelewax wrote:I am using Windows XP professional Version 2002 Service Pack 2, v.2096
The system is a HP Laptop with Celeron CPU 1.60GHz and 224 MB or RAM
The harddisk is 30GB but I have only about 5GB free.
Let's see if someone else has better ideas.

Posted: Sat 11 Feb 2006, 00:37
by jessiepup
JaDy: appreciate the advice, first of all. This thing is kicking my butt too.

My story is much the same - followed the directions, fsutil'ed a pup.swp file in DOS, get "mkswap: Unable to write signature page". Swine mkswap. :wink:

I did try the dd command above to zero it out, but that gives me operation not supported:

Code: Select all

# dd if=/dev/zero of=/mnt/home/pup.swp bs=1024 count=1024k
dd: opening `/mnt/home/pup.swp': Operation not supported

Code: Select all

# ls -l /mnt/home/pup.swp
-rwxrwxrwx    1 root     root    1024000000 Feb  4 16:25 /mnt/home/pup.swp
Puppy 1.0.7 Live-CD, 3.6Gig pup001 file on a XP/NTFS partition (hda2). hda1 is a 5gig NTFS partition that the manufacturer put there for my Windows XP software because they are too cheap to give us CDs. It has no space.

I was wondering if kelewax got his to work?

swap file in xp

Posted: Sat 27 May 2006, 19:05
by kelewax
I was wondering if kelewax got his to work?
No I never got it to work. I have tried all sort of things.