Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 16 Nov 2018, 01:47
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
[TESTING]"puppy pfix=recycle" Boot Parameter
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 4 [51 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Thu 04 Jun 2009, 07:31    Post subject:  

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:

#!/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/viewtopic.php?p=312304#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 Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
sidders

Joined: 23 Jul 2008
Posts: 470
Location: Bolton, uk

PostPosted: Fri 05 Jun 2009, 16:52    Post subject:  

I have been playing with your scripts and added a couple to kick it all off. see:
http://www.murga-linux.com/puppy/viewtopic.php?t=41454&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.
Back to top
View user's profile Send private message 
sidders

Joined: 23 Jul 2008
Posts: 470
Location: Bolton, uk

PostPosted: Fri 05 Jun 2009, 19:08    Post subject:  

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.
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Fri 05 Jun 2009, 21:23    Post subject:  

Quote:
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 Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
rcrsn51


Joined: 05 Sep 2006
Posts: 12324
Location: Stratford, Ontario

PostPosted: Fri 05 Jun 2009, 22:41    Post subject:  

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?
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Fri 05 Jun 2009, 23:27    Post subject:  

Yes...that is why the key combination required to launch the installer was made to wide for little hands to reach! Cool HSB does not have a taskbar enabled by default, it is simply a desktop with icons. The "launch key combination" will be documented in the manual.
_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
sidders

Joined: 23 Jul 2008
Posts: 470
Location: Bolton, uk

PostPosted: Sat 06 Jun 2009, 05:33    Post subject:  

After poncing about with it, i have added this to the end of your script:
Code:
#Finish up
sync
umount /mnt/sda1
umount /mnt/cdrom
#xmessage to finish installation.
answer=$(xmessage -bg "#FFFF00" -center -title "Thats It Shutdown and eject the CD" "
All Done. Please Click on the ShutDown button and eject the CD to finish the installation.
When shutting down you will be prompted to 'Save To File', Select Do Not Save and press enter.
" -buttons ShutDown -print)
if [ "$answer" = "ShutDown" ]
then
wmpoweroff
fi



With the Frugal install, i dont save anything after the initial install, i'll have to check again as the seed of doubt is a big one.

I've one this on the Full fat version, i suppose that its designed to put on old machines. The Lite version i will build in another check on the script along the lines of "Are you sure!"
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Sun 07 Jun 2009, 17:18    Post subject:  

There is a file called "PUPSTATE" in /etc/rc.d, this basically is a numeric code that tells puppy whether it is livebooted, installed to hard drive, running in RAM or such like.

to avoid being asked to create a save file on shutdown...simply change this to tell it that puppy is *already* running from a save file...and the routine to create one will not be invoked at shutdown.

It may also be a good idea to have the script check the pupmode, to ensure that puppy is definetely running in livecd mode before the script is ran. This way, there is no chance someone will use it and inadvertantly wipe everything off their computer.

The reading material for this is here

http://www.puppylinux.com/development/howpuppyworks.html

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Crash


Joined: 09 Dec 2005
Posts: 445
Location: Garland, TX

PostPosted: Sat 11 Jul 2009, 18:28    Post subject:  

This is an intermediate report on progress... I'll bet you thought I'd be done by now! Nope, but this is a very good learning experience for me. What I have posted here "almost" works, and maybe shows proof of concept, or maybe not...

First, I found that simply adding the "recycle" code to init is probably not a good thing, since it adds a lot of code that really is unrelated to the boot process. Instead, the final architectural approach was to do minimal changes to init, and add another program to initrd.gz that I called fruscr_init. Fruscr_init is an adaptation of fruscr for use by initrd.gz. Thus there are two files attached. You need to replace init with the attached one, then add fruscr_init to initrd.gz. Also attached is the entire initrd.gz with all the files in it, in case you don't want to do the process manually.

One of the issues I came upon early was how to test intermediate versions. I found quickly that it wasn't too environmentally friendly to keep burning live CDs, only to throw them away when they didn't work. So I added some other options to allow the source and destination devices to be chosen by the user. These options are hidden to the casual user, and shouldn't interfere with anything. Essentially, the first "YES/NO" question can also be answered with three more levels of debug capability:

"VERBOSE" : Prints out a lot more internal information. Useful to figure out which devices are which, etc.

"DEBUG": Includes the VERBOSE listing, and adds options to re-define the source and destination devices. I did a lot of testing with this option, using two USB thumb drives as the source and destination devices.

"STEP": Really painful debug option that does the VERBOSE and DEBUG stuff, but also stops at each major intermediate step and jumps to the shell. This allows you to observe the success or failure of each step, then return to the program by typing "exit".

Also, I added a second "YES/NO" step just before the point where you will really trash a hard drive. Is is kind of like saying "Are you really, really sure?"

What doesn't work:

"mke2fs" doesn't work. I'm still chasing down its dependencies.

"grub setup" doesn't work. I'm still chasing down its dependencies too.

So the way I know the rest works is that I can go up to the point where those commands are attempted, then execute those two commands from a GUI, then proceed. Everything else is OK.

This version doesn't do a full install, only a frugal one. I want to get the frugal install to work fully before I tackle the full install. This version was last edited June28. It has taken me this long to verify its functionality.

One other note: I am having worse and worse luck editing the Puppy .iso file with ISO Master - keep getting checksum errors. Makes for lots of Frisbees. An alternative, UltraISO, works fine, although it is a Windows product. I finally just made a shell script to save the edited iso directory:

Code:
mkisofs -o /mnt/home/p421_recycle.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V "recycle" /root/Crash/iso


This creates the file "p421_recycle.iso" in the home directory from the files that I put in the "/root/Crash/iso" directory. (This is a frugal install).
fruscr_init.tar.gz
Description  Added "recycle" code.
gz

 Download 
Filename  fruscr_init.tar.gz 
Filesize  2.26 KB 
Downloaded  379 Time(s) 
init.tar.gz
Description  Slightly modified init from Puppy 4.2.1 initrd.gz that recognizes "pfix=recycle" and passes off control to fruscr_init.
gz

 Download 
Filename  init.tar.gz 
Filesize  17.54 KB 
Downloaded  379 Time(s) 
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Sun 12 Jul 2009, 09:28    Post subject:  

Great stuff seeker!

Would you upload it as a full iso, that way I know I am not doing anything wrong when I am testing.

Cheers

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Aitch


Joined: 04 Apr 2007
Posts: 6815
Location: Chatham, Kent, UK

PostPosted: Mon 13 Jul 2009, 08:57    Post subject:  

Hi Rob

Don't know if catdude's graphical boot gui may be useful for this?

http://www.murga-linux.com/puppy/viewtopic.php?t=27471&sid=cf75571b0c5df997d1b66194d628377f

also remaster express

http://www.murga-linux.com/puppy/viewtopic.php?search_id=1297655855&t=38707

Aitch Smile
Back to top
View user's profile Send private message 
Crash


Joined: 09 Dec 2005
Posts: 445
Location: Garland, TX

PostPosted: Wed 15 Jul 2009, 00:51    Post subject:  

I'm not going to post the entire .iso file. I can work up a shell script that makes it pretty easy to insert initrd.gz into the .iso, but that's about it. After all, the total non-redundant information content would be the minimal changes I did to init, plus the 6 1/2 k bytes that are used for fruscr_init. I even had to think a while before posting the initrd.gz file, since almost all the information in it is redundant.

Also, I want the program to be fully functional before going any farther, and I have more work to do before I get there. I did the post mainly because a lot of time elapsed, and you probably were wondering if I had given up on it or not.

Anyway, I've been reading up on "Dependency Hell", and conclude that the more proper technical term is "Dependency Purgatory", since in theory you are only there for a limited amount of time. If I don't come back, you will know I was wrong...

As Dante reads the road sign "Abandon all hope ye who enter here".

/// Edited July 17

It looks like mke2fs can be included in Busybox, so that's good. But that would make initrd.gz bigger. Not sure how much bigger until I try it. More to come...
Back to top
View user's profile Send private message 
Crash


Joined: 09 Dec 2005
Posts: 445
Location: Garland, TX

PostPosted: Sun 23 Aug 2009, 21:15    Post subject:  

Here is today's version of the recycle code. The mke2fs problem is solved,
thanks to technosaurus (see post elsewhere in forum). The only thing left is
to get the GRUB boot code working, but that is easy compared to all that's
been done so far. Even though there will be one more version, I'm posting this
to show the direction it is going. The resulting initrd.gz is about 100K larger
than the original, but in my opinion the size increase is worth it.

Some excerpts from the README file:

This code allows a frugal install using just the Puppy Linux Kernel. To use the
added code, simply type the line "pfix=recycle" at the boot.

*** WARNING !!! This code COMPLETELY OVERWRITES the contents of the
hard drive!!! Its primary use is if you are very, very tired of all that stuff on
your hard drive and want to start over ***

*** Recommended usage: Edit the Puppy 4.2.1 .iso file, replacing initrd.gz
with the one in this tarball. Boot up as A LIVE CD. ONLY HAVE ONE HARD DRIVE
IN YOUR COMPUTER THAT DOESN'T HAVE ANY DATA THAT YOU CARE ABOUT. You
can have more media attached, but DO IT AT YOUR OWN RISK (I should know - I'm
the proud owner of a brand new 500 GB hard drive that has a backup of Windows
Vista for exactly this reason). ***

*** Based on Puppy Linux 4.2.1 Not tested on any other version (although
it will probably work on any 4.xx version) ***

*** Everything works except the installation of GRUB to the master boot
record. I'm still working that ***

In this tarball:

init: modified init file that allows execution of "fruscr_init" shell script.

fruscr_init: Adaptation of rcrsn51's fruscr script for use by initrd.gz. It
goes through the process of installing Puppy Linux to the hard drive.

mke2fs: A stand-alone diet libc based static binary version of mke2fs,
posted by technosaurus, that works well with the Puppy Linux kernel.

initrd.gz: The whole thing in case you don't want to modify initrd.gz yourself.

README: This README file.


/// EDITED AUG. 27

In case you are wondering what changed in init and fruscr_init between this post and the July 11 post, it is very minor:

Init didn't change at all.

Fruscr_init only has one line change:

from:
/mnt/pup_image/sbin/mke2fs /dev/$HPART

to:
mke2fs /dev/$HPART

This causes the Kernel to simply look through the normal directories (/bin, etc.) to find mke2fs rather than looking on the mounted CD file system.

The real significant change is adding the new mke2fs to the /bin directory inside initrd.gz.
Back to top
View user's profile Send private message 
Crash


Joined: 09 Dec 2005
Posts: 445
Location: Garland, TX

PostPosted: Sat 05 Sep 2009, 16:47    Post subject:  

Here is the first fully functional version of the code. I'd be interested to know
if others have success with it. It works well for me.

Everything contained in the attachment is GPL.

The GRUB binaries were generated using GRUB installer, dd, hexdump, and diff.
Good background about the physical placement of GRUB can be found at the
following two links:

http://www.geocities.com/thestarman3/asm/mbr/GRUB.htm

http://www.pixelbeat.org/docs/disk/

From the README file:

In this tarball:

init: modified init file that allows execution of "fruscr_init" shell script.

fruscr_init: Adaptation of rcrsn51's fruscr script for use by initrd.gz. It
goes through the process of installing Puppy Linux to the hard drive.

/bin/mke2fs: A stand-alone diet libc based static binary version of mke2fs,
posted by technosaurus, that works well with the Puppy Linux kernel.

/sbin/grub_mbr.bin: The GRUB Stage 1 code that goes into the Master Boot Record.

/sbin/s15patch.bin: A patch to GRUB Stage 1.5.

initrd.gz: The whole thing in case you don't want to modify initrd.gz yourself.

README: This README file.
Back to top
View user's profile Send private message 
ecomoney


Joined: 25 Nov 2005
Posts: 2183
Location: Lincolnshire, England

PostPosted: Sun 06 Sep 2009, 19:57    Post subject:  

I wonder now which is the fastest linux to install in the top ten Linux's at Distrowatch? Very Happy

I look forward to testing this code, it will be particularly useful for those processing large batches of older computers. Is it just a matter of replacing the initrd.gz on the puppy CD with the one in the attachment above? If so there is a problem editing iso's in Puppy 4.

Seeker, did I give you and ftp account yet? Perhaps I could trouble you further to upload a pre-prepared ISO for the installer there (its well worth the bandwidth Wink ).

_________________
Puppy Linux's Mission

Sorry, my server is down atm!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Display posts from previous:   Sort by:   
Page 3 of 4 [51 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1383s ][ Queries: 12 (0.0362s) ][ GZIP on ]