Why was pfix=noram removed?

Booting, installing, newbie
Post Reply
Message
Author
Newcrest
Posts: 199
Joined: Sun 04 Mar 2007, 03:19

Why was pfix=noram removed?

#1 Post by Newcrest »

I was looking at upgrading my Puppy version but I am ram challenged and don't understand how a swap partition/file is supposed to improve anything if you are already running a frugal install from a hard disk. Please enlighten me if swap actually does something productive.

So it looks like at about Puppy 4.1 a parameter pfix=copy was added and pfix=noram removed. Then in 4.2 pfix=noram made a brief re-appearance before disappearing thereafter.

Now why was pfix=noram removed as on my system 4.3 (and higher) tries to copy pupxxx.sfs to ram on boot even if there is not enough ram and subsequently crashes?

Am I missing something about what copying pupxxx.sfs to ram and noram means?

Are there any new current Puppy models that still have pfix=noram?
Last edited by Newcrest on Sun 12 Sep 2010, 08:17, edited 1 time in total.

User avatar
CatDude
Posts: 1563
Joined: Wed 03 Jan 2007, 17:49
Location: UK

#2 Post by CatDude »

Hello Newcrest

You may find this thread Add a "pfix=noram" option to your Puppy of interest.

CatDude
.
[img]http://www.smokey01.com/CatDude/.temp/sigs/acer-futile.gif[/img]

Newcrest
Posts: 199
Joined: Sun 04 Mar 2007, 03:19

#3 Post by Newcrest »

Thanks CatDude, but that even makes we wonder more why the option isn't in Puppy by default.

Why was it added at one point and then removed? Perhaps the name is confusing as it has little to do with pfix=ram and maybe should have been called pfix=nocopy to be more consistent with pfix=copy. However, that doesn't explain why it was taken out completely or why the sfs is now copying to ram even when there is no real room.

I think there should be more boot parameters and they should be documented more openly.

Bruce B

#4 Post by Bruce B »

When Puppy (frugal) boots it determines the amount of RAM and
won't copy if there is not enough RAM.

The decision is made while running init which is a file inside initrd.gz

init can be edited to produce the result of say for example, 128 MB
RAM, regardless of the actual amount of RAM.

Then with init operating on the result of 128 MB RAM, Puppy won't
copy the big sfs file.

Anyway, that's how it worked with earlier versions, as for later
versions, I presume the same, but one would have to look at the init
file to know for sure.

Newcrest
Posts: 199
Joined: Sun 04 Mar 2007, 03:19

#5 Post by Newcrest »

Bruce B wrote:When Puppy (frugal) boots it determines the amount of RAM and
won't copy if there is not enough RAM.
Yes that's how it used to work for me but I have tried a couple of recent puplets which are larger than my ram size and it seems to try and copy the sfs into ram regardless.

Now I am trying to put the noram switch in but for some reason I am getting 15MB initrd.gz after edit.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#6 Post by jamesbond »

This was removed at some time (around 4.x I think) because of unionfs/aufs bug ==> the SFS file cannot be in the same filesystem as the union branch, or it will randomly crash. Barry has blogged about this before.

It was fixed around Quirky release I think, when Barry talked to aufs2 author and got this bug fixed. But whether "pfix=noram" get re-instated or not after that, I'm not sure ...
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

Newcrest
Posts: 199
Joined: Sun 04 Mar 2007, 03:19

#7 Post by Newcrest »

Could someone please check the init script that I edited. It simply insists upon loading the sfs file to ram no matter which I try.
Attachments
init.gz
My attempt at adding pfix=noram to Wary 070
(21.43 KiB) Downloaded 216 times

Bruce B

#8 Post by Bruce B »

Newcrest wrote:Could someone please check the init script that I edited. It simply insists upon loading the sfs file to ram no matter which I try.
At line 799 (the only change needed to a new init file)

From calculated value:
RAMSIZE=`free | grep 'Mem:' | tr -s ' ' | cut -f 3 -d ' '` #total physical ram (less shared video).

To arbitrary value where value is Kb RAM:
RAMSIZE=128000

Or for another example; to arbitrary value:
RAMSIZE=64000


Doesn't matter which values, just keep the size low as in the
examples above. The idea is merely forcing the script to behave as
if there isn't enough RAM


This spoofs Puppy to 'calculate' there is not enough RAM to
copy the big .sfs file


Thereafter the pfix=ram and pfix=noram wouldn't have any effect on the copying of the file.
Last edited by Bruce B on Mon 13 Sep 2010, 06:20, edited 2 times in total.

Bruce B

#9 Post by Bruce B »

Newcrest wrote:
Bruce B wrote:When Puppy (frugal) boots it determines the amount of RAM and
won't copy if there is not enough RAM.
Yes that's how it used to work for me but I have tried a couple of recent puplets which are larger than my ram size and it seems to try and copy the sfs into ram regardless.

Now I am trying to put the noram switch in but for some reason I am getting 15MB initrd.gz after edit.
That is a no-no if the initrd.gz size increases much at all.

How are you unpacking and packing it?

~~~~~~~~~~~~~~~~~~~~~~~

As for puplets, who's to say if the puplet provider is a deep thinker?
Just make a bigger .sfs file and ship it off?

~

Newcrest
Posts: 199
Joined: Sun 04 Mar 2007, 03:19

#10 Post by Newcrest »

Thanks Bruce. Your method is easier to implement. I have also got the noram switch working now. I'm not sure if it was meant to do it this way but using pfix=ram nullified the use of the noram switch in these newer Puppies even though I am sure it didn't when I used the 2 series Puppies.
Bruce B wrote:
Newcrest wrote: Now I am trying to put the noram switch in but for some reason I am getting 15MB initrd.gz after edit.
That is a no-no if the initrd.gz size increases much at all.

How are you unpacking and packing it
I was doing it the correct way but on packing the files it went from 2mb to 15mb. It seems that the version of cpio in my Puppy version was the culprit. The same command with a newer version works as it should.

Bruce B

#11 Post by Bruce B »

Newcrest,

I'm inclined to think something is wrong. Here is the premise for my reasoning, or lack thereof.

If a compressed archive such as initrd.gz was unpacked and repacked using the same
technique is used originally it should be about the same size.

Here is how Pizzagood did it with 3.xx and 4.xx
  • To edit initrd.gz from Puppy 3.xx, first copy initrd.gz to someplace on a linux filesystem
    where you can work on it (I like to use /tmp/NewDir). Then open a terminal there and run this:

    mkdir initrd-tree
    cd initrd-tree
    zcat ../initrd.gz | cpio -i -d


    That will make a directory initrd-tree that contains the contents of the initrd.gz file. Go inside and edit away. When you're finished, from inside the initrd-tree/ directory, run these commands:

    find . | cpio -o -H newc | gzip -9 > ../initrd.gz



    That will replace the old initrd.gz file with the new one. Now just copy that into the correct place, and you're good to go.
I use a different technique, but I've used his and it works fine!

~~~~~~~~~~~~~~~~~~

Sidenote: the pfix=ram should work to the extent of not loading a pup_save file, even
though the big sfs is not copied to RAM.'

Curious how this works, please report back, TIA.

Bruce

cthisbear
Posts: 4422
Joined: Sun 29 Jan 2006, 22:07
Location: Sydney Australia

#12 Post by cthisbear »

Fixed.

http://bkhome.org/blog/?viewDetailed=01808

" The question was posted recently about when this kernel boot option got removed from Puppy. I checked, it was taken out back in July 2008."

Chris.

Post Reply