[TESTING]"puppy pfix=recycle" Boot Parameter

A home for all kinds of Puppy related projects
Message
Author
User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#16 Post by ecomoney »

SUCCESS, they both work fine on the testing rig I have here with 4.2.1!!! :D

The origional scripts for 4.1.2 (which luckily I kept a copy of) Ive submitted to the HanSamBen project...which is a kids educational distro like EduPup. I had to tweak the the originals (which Ive attached my copy of below), as HSB uses "pup_412hsb.sfs" as its squash file.

The FRUGAL install should work with 4.x.x series before 4.2..perhaps 3.x series also....the FULL install just for 4.1.2 From what I understand the earlier kernels assign differently named mount points...I gave the scripts a quick try using 2.14r (2.6.18.1 kernel) and the scripts failed through not being able to find files. Some clarification of how this works would be useful, as I know quite a few people are still using 2.xx series on really old computers as they need the earlier kernel.
Last edited by ecomoney on Mon 25 May 2009, 19:52, edited 1 time in total.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#17 Post by rcrsn51 »

Glad to hear that the scripts worked. Here are a few points:

The 4.2.1 version should work on 4.1.2 with one change. On line 48, the GRUB stage files are copied from the folder /usr/lib/grub/i386-pc. But in 4.1.2, they are located in /usr/lib/grub/i386-t2.

For Puppies in the 2 and 3 series, things get more complicated. In the current versions, the hard drive is identified as /dev/sda and the optical drive as /dev/sr0.

In older versions, the hard drive will be /dev/hda and the optical drive could be hdb, hdc or hdd, depending on how the drive is cabled. So you would need to modify the script to search all the drives for the Live CD. Also, old versions may use a zdrv file that must be installed.
Last edited by rcrsn51 on Mon 25 May 2009, 15:39, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#18 Post by rcrsn51 »

I had a look at the download in the HSB thread and the full-install script does not yet have the patch for the .sfs file.

It would be worthwhile to start adding an identifier to the names of any modified scripts, like "frugal-install-hsb"

[Edit] I have updated the attachment on Page 1. It now contains scripts (both frugal and full) that will install Puppy 2.17.1, 3.01, 4.1.2 and 4.2.1. These should act as reasonable templates for creating additional installers.

The full installers now use the PUI to do the actual copying. When it gets to the step for installing GRUB, just cancel.

@ecomoney: Could you please delete the versions that you posted directly above? They may confuse the issue.
Last edited by rcrsn51 on Wed 27 May 2009, 20:27, edited 5 times in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#19 Post by rcrsn51 »

[deleted]
Last edited by rcrsn51 on Wed 27 May 2009, 20:28, edited 1 time in total.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#20 Post by ecomoney »

Have deleted the attachments as requested

Thanks for updating the scripts for previous version. The issue now is how to make them available for "newbies". Perhaps a .pet? Crash, would it be possible to include the routines in the init script?

Perhaps there is time to get them included in Woof?
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#21 Post by rcrsn51 »

Perhaps there is time to get them included in Woof?
This is the wrong strategy. It is unreasonable to expect that a newcomer could take an old computer, get a Puppy CD from somewhere and do a one-click install without having some kind of training.

A more realistic scenario is one where the newcomer gets assistance from an experienced Puppy user, like you. That person would have the Live CD and installer script that matches the hardware.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#22 Post by ecomoney »

It is unreasonable to expect that a newcomer could take an old computer, get a Puppy CD from somewhere and do a one-click install without having some kind of training.
Thats exactly what my partner did with an Ubuntu CD I gave her when we had just met! I gave her the CD to take home for "safe keeping" the first time we met, and said I would install it next time I visited...by this time she had already got her p.c. up, working and on the internet! There is no reason to believe this is un-achievable with Puppy (though its certainly is the case now that a lot of training is required).

Achieving this would just be a matter of designing the right user interface, in the right place for your script, and using the correct, non-technical, language.

There are two IRL scenarios here....

The computer recycler
Needs to take old computers, wipe and recycle/"get working" as quickly as possible. For this a "pfix=recycle" command that would invoke your script (before pup_xxx.sfs was loaded) would be ideal. Crash?

The home user
This would be someone with a spare/old computer to try puppy on. They would require a desktop icon/menu entry on a livebooted puppy, which would (perhaps) offer a choice between the existing "advanced" installer, and the 2 "just works" scripts you have produced. It would need a gtk or similar front end.

In either case, the amount of "training" or "expert help" required would be directly inversely proportional to how many computers that could be recycled/waste reduced. Complexity should then be kept to an absolute minimum.

I suggest, in terms of how quickly that we can get this facility developed and recycling as many waste computers as possible, we should concentrate on the "puppy pfix=recycle" option first, and then get the GUI side (calling the same routines) after that.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
Crash
Posts: 453
Joined: Fri 09 Dec 2005, 06:34
Location: Melbourne, FL

#23 Post by Crash »

rcrsn51-

Thanks for the help in generating this code. I estimate that you saved me about 40 hours of redundant effort. At the rate that I am currently able to devote to Puppy Linux, that equates to about three calendar months!

I think this is possible to do using just the Kernel - well, almost just the Kernel. The trick would be to mount the .sfs file, then use the needed programs like Grub and stage 1, 2 from the mount point. I need to tinker around a bit to see the feasability of using that approach.

Anyway, this is great fun, and as always an excellent learning experience. I'll give you progress reports as I find out things.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#24 Post by ecomoney »

Crash, Im by no means an expert, but I was thinking/hoping it would be possible to implement the script from the "busybox" level, i.e. when the init is loaded but before the pup_xxx.sfs is loaded into memory. This would make the recycling process much faster.

For the frugal install, the pup_xxx.sfs would be copied from the cd onto the hard drive, and for the full, it could be mounted directly from the cd and the files copies/decompressed on the fly to the hard disk.

This may mean a busybox recompile to make to appropriate utilities available at this stage in the puppy boot process.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#25 Post by rcrsn51 »

A couple of comments:

Any missing programs like mke2fs would have to be statically compiled in order to be included in the initrd.gz.

There is a huge advantage to letting a recyclable machine boot to the desktop because you get the opportunity to make the initial hardware configuration. Then after doing the frugal install, you can create a pup_save file for that machine during shutdown. When the new owner boots up, the machine will go directly to the desktop and be ready to run.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#26 Post by ecomoney »

Hmmm....I am coming round to your way of thinking, if it means that the final machine is "ready to ship", and it means that the programming is easier.

Just a quick question while you are on, I notice in the readme script for the latest version of the installers, it says it is compatible with puppies back up to 2.17. What changes would need to be made for 2.15ce/2.14? Ttuxxx is working on an updated 2.14 series puppy aimed at older end kit....and it would be nice to have this in my Ecopup (2.15ce based!).
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#27 Post by rcrsn51 »

I notice in the readme script for the latest version of the installers, it says it is compatible with puppies back up to 2.17. What changes would need to be made for 2.15ce/2.14?
Probably nothing. I only tested as far back as 2.17.1. The significant differences in versions show up with full installs. That is why the installer scripts use the PUI to do the heavy lifting.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#28 Post by ecomoney »

I tested with puppy 2.15ce and the scripts on a pendrive, test rig cyrix 150mhz, 4.3gb HD, 192mb RAM.

In earlier kernels I had heard that the mount points are called different things

dev/sda1 = dev/hda1
dev/sr0 = dev/cdrom

I changed these in the scripts, and hey presto it formatted the drive and copied the files! No grub install though, the reboot just hung at "Booting from IDE 0". I rebooted with "puppy pfix=ram" parameter and installed grub manually using the grubinstaller, and things were perfect.

Any Ideas rcrsn51

I think I may be able to adapt this script to have a gui confirm (GTK?) by borrowing some from the network wizard/ecopup shutdown dialogue...but how would I install Grub?
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#29 Post by rcrsn51 »

I just installed 2.15CE using the most recent posted version of the scripts and it worked fine without modification.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#30 Post by ecomoney »

Perhaps it was down to the clearly ancient hardware...I will do a more thorough test to identify the problem.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#31 Post by ecomoney »

Theres been some more movement on the install script on the HanSamBen education suite thread. Technosaurus came up with this great "just works" snippet.

Code: Select all

#!/bin/sh
RAMSIZE=`free | grep 'Mem:' | tr -s ' ' | cut -f 3 -d ' '` #total physical ram (less shared video).
if [ $RAMSIZE -gt 220000 ]
then
frugal-install
else
full-install
fi
from here

http://www.murga-linux.com/puppy/viewto ... 304#312304

Now we have the "guts" of this installer, the best way to proceed would be to produce a easy frontend (probably just a single form with a warning and one button...probably big and red lol). If the whole thing were packaged as a .pet marked "Alpha" then we could get a lot more feedback about what needs to be changed/updated. By the look of things this would be VERY popular...so I will need to figure some way of getting it up the "install puppy linux" google search rankings. I will also post he .pet on the first post of this thread.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

sidders
Posts: 464
Joined: Wed 23 Jul 2008, 18:47
Location: Bolton, uk

#32 Post by sidders »

I have been playing with your scripts and added a couple to kick it all off. see:
http://www.murga-linux.com/puppy/viewto ... 4&start=99

I tried it and had to go and sort out:
A: Hannah jumping on Sams head
B: Sam biting Hannah
C: Ben kicking off because he's hungry

The script had finished, but i wasnt sure what was what, so i went ahead and rebooted anyway. The install was perfect. I've put ant Xmessage at the end to say reboot.
Am testing and will come back with the code providing it works.

sidders
Posts: 464
Joined: Wed 23 Jul 2008, 18:47
Location: Bolton, uk

#33 Post by sidders »

Tested and it works:

i scrubbed the echo's at the end of the script and inserted for the frugal:

#use xmessage for reboot
asnswer=$(xmessage -bg "#FFFF00" -center -fn "10x50" -title "IMPORTANT" "reboot the PC, at prompt select Save To File accept the defaults:SDA1 and 512mb" -buttons restart -print)
if [ "answer" = "restart" ]
then
wmreboot
fi


The same is for the full install except saying do not save. There is a warning message about 10x50 font something or other.

I will change it to say poweroff and eject the cd then power back on again.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#34 Post by ecomoney »

I tried it and had to go and sort out:
A: Hannah jumping on Sams head
B: Sam biting Hannah
C: Ben kicking off because he's hungry
This is exactly the problem HanSamBen (the Puppy Linux derivitive) is intended to solve, Sidders has put a huge amount of time and effort into developing it to solve this problem for himself and others. The reason it solves these problems so elegantly is undoubtedly due to the fact surrounded himself with his intended audience (however difficult that may make learning BASH scripting) - as well as taking on board the advice of teachers, childcarers, parents, testers, and of course actually physically testing this in pre-schools.

Its a dual purpose, educational derivative of Puppy Linux, which lowers the hardware limits to which a large amount of mainstream linux childrens educational software can be delivered. This essentially allows computers that are several years older than linux's previous technological limits to be used as tools for childrens education, rather than harm them as industrial waste.

Its dual purpose because its intended to be used both as a liveCD, so that parents from underprivileged backgrounds can leave their children on their computers without fear of them "breaking" it and it needing an expensive specialist repair (it has no windows filesystem drivers) or internet access (network drivers have been removed).

It is also aimed at schools, nurseries, playgroups (or parents with second older computer) to them to be able to re-use the computer simply as a dedicated kids computer. These groups of people (specialists in children not technology) have a need to recycle a computer as simply and easily as possible, as they just dont have the time (or the length of attention needed) to learn about bootloaders and linux drive notation. You could say its a "OLPC project for old computers" rather than laptops.

Because of its intended user base, it has a strong requirement therefore to have a graphical, easy to use frontend for this installation script, that will run from a livecd.

Is anyone with the skills reading prepared to step up to the challenge?
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#35 Post by rcrsn51 »

If I understand correctly, you envision HanSamBen being used by children as a Live CD on a working Windows machine.

At the same time, you want a "graphical, easy to use frontend for this installation script, that will run from a livecd."

Can anyone else see a potential problem with this scenario, seeing how the installation script is designed to erase the hard drive?

Post Reply