How to tell if Puppy uses my swap?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
gliezl
Posts: 322
Joined: Sat 06 Aug 2005, 22:30
Location: Manila

How to tell if Puppy uses my swap?

#1 Post 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?

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

Does MUT see the swap file you created?

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

Jady

#3 Post by raffy »

Rev Jady is the expert on this - making swap AS A FILE (not a partition) - see this.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post 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)

User avatar
gliezl
Posts: 322
Joined: Sat 06 Aug 2005, 22:30
Location: Manila

#5 Post 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! :)
[color=blue][i]"If you have knowledge, let others light their candles in it."
~Margaret Fuller[/i][/color]

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#6 Post 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

User avatar
kelewax
Posts: 41
Joined: Fri 04 Nov 2005, 16:26
Location: Nigeria

#7 Post 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.
Which of the favours of your Lord can you deny?

JaDy
Posts: 159
Joined: Wed 04 May 2005, 15:59
Location: SE PA USA
Contact:

problem with swap file on NTFS

#8 Post 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.
Felicitations & Facilitations, Rev. John G. Derrickson
Wrote fast. Goofs happen. Tell me.

jessiepup
Posts: 1
Joined: Sat 21 Jan 2006, 18:19

#9 Post 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?

User avatar
kelewax
Posts: 41
Joined: Fri 04 Nov 2005, 16:26
Location: Nigeria

swap file in xp

#10 Post 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.
Which of the favours of your Lord can you deny?

Post Reply