SOLVED: Any way NOT to load Puppy in RAM at boot ??

Using applications, configuring, problems
Message
Author
GeexBoxer
Posts: 17
Joined: Thu 22 Nov 2007, 17:35

#16 Post by GeexBoxer »

Pizzasgood wrote:The kernel line, and it's 'pfix=noram', at least in 4.1.2. So in your case, it would look like this:

Code: Select all

title Puppy Linux 4.1.2
kernel (hd0,0)/puppy412/vmlinuz PMEDIA=idehd PDEV1=sda1 psubdir=puppy412 pfix=noram
initrd (hd0,0)/puppy412/initrd.gz
boot 
puppy is still being copied to ram even after I added the command. so is there any other way to prevent puppy from being copied to ram?

if initrd.gz has to be edited how can it be done for puppy linux for 4.1.2?

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#17 Post by rjbrewer »

Not sure if it makes a difference; but pfix=noram should be
at the end of the kernel line.

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#18 Post by Pizzasgood »

It looks like if Puppy realizes you use an internal harddrive and that you have more than 280MB of ram, then it decides to ignore your wishes and copy into ram anyways.

If you really don't want it to, you could edit the initrd.gz file to adjust it.

To do that, you need to make an empty directory somewhere out of the way. I like to use /tmp/NewDir. Copy the initrd.gz file into that. Open a terminal inside that directory by either pressing the backquote key (up at the top left, just below the Esc key), or by right-clicking and going to "Window->Terminal here".

In that terminal, run these commands:

Code: Select all

mkdir initrd-tree
cd initrd-tree
zcat ../initrd.gz | cpio -d -i
That will create a directory named 'initrd-tree', and if you go inside it you'll see all the files that were in the initrd.gz file. We're interested in the one named "init". Open that with a text editor. Press <CTRL><F> to bring up the "Find" box. Type "definitely worth" and press enter. That should bring you to the lines of code responsible. Change this:

Code: Select all

 #v405 fast media plus more than 256MB ram then definitely worth copying to ram...
 [ "`echo -n "$FASTPARTS0" | grep "$PUPSFSDEV"`" != "" ] && [ $RAMSIZE -gt 280000 ] && COPY2RAM="yes"
to this:

Code: Select all

 #v405 fast media plus more than 256MB ram then definitely worth copying to ram, unless the user doesn't want to.
 [ "`echo -n "$FASTPARTS0" | grep "$PUPSFSDEV"`" != "" ] && [ $RAMSIZE -gt 280000 ] && [ "$PNORAM" != "yes" ] && COPY2RAM="yes"
Now save the file. Open a terminal inside the initrd-tree directory, where the init file is. Run these commands:

Code: Select all

rm ../initrd.gz
find . | cpio -o -H newc | gzip -9 > ../initrd.gz
That will remove the copy of the initrd.gz file you made earlier and replace it with a new one including the changes you just made. Go back to the directory where you placed the initrd.gz file and copy that one over the original one that Puppy uses (you might want to back up the original first). Now reboot, and the pfix=noram option should work. I haven't tested this myself though, so there might be another line causing problems too. So let me know if it doesn't work and I'll look deeper.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#19 Post by rjbrewer »

Uh

He added Solved to his post after correcting the kernel linejavascript:emoticon(':lol:')

GeexBoxer
Posts: 17
Joined: Thu 22 Nov 2007, 17:35

#20 Post by GeexBoxer »

rjbrewer wrote:Uh

He added Solved to his post after correcting the kernel linejavascript:emoticon(':lol:')
what? dude I didn't added solved to the post. This is not even my post, my question was related to this post so I asked it here. too much posting posts. :mrgreen:

GeexBoxer
Posts: 17
Joined: Thu 22 Nov 2007, 17:35

#21 Post by GeexBoxer »

Pizzasgood wrote:It looks like if Puppy realizes you use an internal harddrive and that you have more than 280MB of ram, then it decides to ignore your wishes and copy into ram anyways.

If you really don't want it to, you could edit the initrd.gz file to adjust it.
I haven't tested this myself though, so there might be another line causing problems too. So let me know if it doesn't work and I'll look deeper.
First of all, thank you for writing very detailed instructions. I did what you told me to but puppy still copies to ram. btw I didn't create a pup_save file yet. could that be a problem? or maybe I should add pfix=noramsfs?

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#22 Post by Pizzasgood »

Yeah, I think that the lack of a pup_save.2fs file might be the problem. I'm saying that from foggy memory, without looking at the code. There are a number of exemptions scattered around, and one of them had to do with the first boot.

I'll look into it tomorrow evening and try to get it working on my end.

It definitely isn't pfix=noramsfs. I just checked (using grep) and the string 'noramsfs' doesn't occur at all in the init script.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

GeexBoxer
Posts: 17
Joined: Thu 22 Nov 2007, 17:35

#23 Post by GeexBoxer »

You are right Pizzasgood. It was the lack of pup_save file and now it is working. Thank you for your help, I appreciate it.

So the rough procedure was
1) edit initrd.gz file
2) adding "pfix=noram" to menu.1st file at the end of the kernel
3) make sure pup_save file exists.

Post Reply