[TESTING]"puppy pfix=recycle" Boot Parameter

A home for all kinds of Puppy related projects
Message
Author
User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#41 Post by Aitch »

Hi Rob

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

http://www.murga-linux.com/puppy/viewto ... 94d628377f

also remaster express

http://www.murga-linux.com/puppy/viewto ... 55&t=38707

Aitch :)

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

#42 Post by Crash »

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...

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

#43 Post by Crash »

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.

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

#44 Post by Crash »

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.

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

#45 Post by ecomoney »

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

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 [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

#46 Post by Crash »

Yes, making the new .iso is as simple as replacing initrd.gz. I used the shell script I posted earlier to make it. I saw that other post and it generally agrees with my experience. Thus at present I'm shying away from IsoMaster and just doing the .iso assembly brute force.

I don't mind uploading a .iso file of this version, since it actually works. I already have one ready to go, since I made it to burn to a CD for testing.

To tell you the truth, I have never uploaded anything to an ftp site, just downloaded. If the information needed to access it is private, you can PM the information to me. I'll send up the .iso file along with its md5 checksum.

Let's see, three and a half months to produce the first working copy. Probably equates to one line of code per day! I guess I'd better not quit my day job.

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

#47 Post by ecomoney »

Crash has uploaded the full ISO to my server (cheers).

http://ecomoney.eu/puppy/recycle/

Testing required :D

Aitch, thanks for the post, but only one OS is installed with this, so GRUB isnt necessary. Thanks for bringing it to my attention though.
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

#48 Post by sidders »

I am keeping my beady eye on this post. I have a few things to look at, but i will get round to this.

Just to clarify Is it ok just to take the initrd.gz and stick it into any ISO (along with any other scripts needed)?

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#49 Post by Sylvander »

At 1st post on this thread:

QUOTE:
"Simply burn the CD, and invoke the installer with "puppy pfix-ram" to start the installer."
Shouldn't that read:
puppy pfix=ram ?

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

#50 Post by Crash »

You should type "puppy pfix=recycle" when booting from a live CD.

GRUB v0.97 is indeed installed on the hard drive. However, only the binaries are copied. Kind of a GRUB install without GRUB.

The initrd.gz is specific to Puppy Linux V4.2.1. However, if you want to roll your own, it should work in a variety of releases. Just do similar steps as the README says, but modify your own init. The changes to init are minimal:

Code: Select all

diff init_orig init_new

179a180
>    recycle)    RECYCLE="yes";;         #do an install directly from Kernel (recycle old computers)
301a303,318
> # Added Recycle code:
> if [ "$RECYCLE" = "yes" ];then
>  echo " "  >/dev/console
>  echo  "Executing an install from the Kernel." >/dev/console
>  echo  "Dropping out to initial-ramdisk console..." >/dev/console
> # echo " "  >/dev/console
>  /bin/sh  fruscr_init >/dev/console
>   echo "Finished attempting install. Type anything to continue boot." >/dev/console
>   echo  "For developers type 'quit' to drop out to console." > /dev/console
>   echo  "Type ctl-alt-del to reboot, or hold down power button to turn off." > /dev/console
>   read drop_to_console
>   echo > /dev/console
>   [ "$drop_to_console" = "quit" ] &&  exec /bin/sh >/dev/console
> fi
> # End Added Recycle code.
>
/// Edited 10 hours later:
Oops, we'll get the command right yet. 'Course it shouldn't be too hard to forget - the name of this post is "puppy pfix=recycle"
Last edited by Crash on Wed 09 Sep 2009, 01:33, edited 2 times in total.

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

#51 Post by ecomoney »

Fixed - You have sharp eyes Sylvander...if your not a coder already you should be!
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

Post Reply