init development

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
Hugh
Posts: 138
Joined: Sat 24 Jun 2006, 21:53
Location: Imperial Warmongering Dystopia of Amerika

init development and grub menu.lst for options

#41 Post by Hugh »

Crash and vg1:

Your work on this 'project' answers a lot of questions and sheds some very important 'light' on how to do something that has been befuddling me for the past couple of months. Very well done to both of you!!

The ability to direct Puppy to a specific bootup among several options is to me invaluable; and there is no doubt in my mind that numerous others will find your work a god-send.

This forum and its very capable developers/debuggers/innovators is truly amazing!

Thanks again guys!

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#42 Post by ICPUG »

Crash,

Can I ask for clarification just to see if I have got it right.

Just one line of code has to be added to the init of the standard 4.2 Puppy.

That code is as per your post of Sat Apr 25, 2009 5:58 am.

The attachment is in effect the initrd.gz of standard Puppy 4.2 (released by WhoDo) modified by the one line of code.

If that is all correct I just need to understand that line of code now! I thought it set PSUBDIR to "" if PSUBOK is TRUE but not sure how that works when you quite clearly have a PSUBDIR and PSUBOK=TRUE in your menu.lst. Time to look at my Bash manual I think.

Thanks.

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

#43 Post by Crash »

ICPUG,

Yes, that is exactly right, and the posted INIT is taken directly from the Puppy 4.2 distro with just the one line added.

The code that makes use of PSUBDIR and PSUBOK has already been executed before the added line. The added line is placed just in front of the original PSUBDIR code, and causes the original PSUBDIR code to be bypassed. That was the code that didn't allow more than one partition to be used. In general, when modifying someone else's code, I like to make minimal changes to the original code - I figure that the person who wrote the original code did it for a reason. So if you don't use the PSUBOK parameter, the code I added is bypassed and the original code functions as written. When PSUBOK is set to TRUE, the code I wrote is executed, then the original code is bypassed.

Hugh,

Thanks for the good words. Working on this stuff is a lot of fun, and the support and help from the rest of the community is what makes the Puppy project so enjoyable.

vg1
Posts: 142
Joined: Sun 02 Dec 2007, 18:56

#44 Post by vg1 »

Crash,

it all works as you laid out. I made a setup similar to yours with:

sda3: pup_save420.2fs
sda2: pup_save420.2fs & pup_save420b.2fs
sda7: pup_save420sda7.2fs

All your variations worked:

psave=b - boots pup_save420b.2fs on on sda2
psave=420.2 - choice of sda2 & sda3 pup_save420.2fs files
psave=sda2 - choice of sda2 psave files
psave=7.2 - boots pup_save420sda7.2fs on sda7

I tried one more:
psave=420 - choice of all pup_save420 files on all partitions, in puppy4/420
ie the choice was presented for all pup_saves with 420 in their name, if located in puppy4/420 on any partition. In my case I got the four of them.

As long as psave contains something unique identifying a specific pup_save it works. With short psave names, as above, puppy pauses a bit to figure it out. With a full pup_save name specified it boots a bit faster. The difference is a few seconds on my pc, could be more on a slower one.

regards
vg

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#45 Post by WhoDo »

Crash wrote:Yes, that is exactly right, and the posted INIT is taken directly from the Puppy 4.2 distro with just the one line added.
Top stuff, Crash. Downloaded for inclusion in Puppy-4.2.1 due for release shortly. Thanks for your efforts, mate. They are much appreciated.
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

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

#46 Post by Crash »

vg1,

I feel more comfortable knowing your results are consistent with mine. I figure it takes at least two people to get repeatable results before something can be declared a success.

WhoDo,

I'm pretty happy with this latest small change. I'm still testing and haven't broke it yet.

This was a good exercise for me, because it gave me some incentive to re-acquaint myself with GRUB. I'm beginning to see why so many people prefer GRUB over alternative boot loaders. The DOS version is good for a beginner. It contains a very helpful menu.lst template that was easy to modify for these tests. Besides, when all else fails, it can drop back to DOS. Then I can go back to my old standby programs to figure out what is going on (I still have my floppy distros of Xtree and Norton Utilities in the garage).

This testing session also gave me incentive to take Puppy Version 4.2 out for a test drive. I had been using V4.12 up until now. The newer versions always bring something new and refreshing. Version 4.2 didn't disappoint.

I'm also getting more familiar with using Linux at the command prompt level, so when the GUI doesn't load I don't panic so much now. I'm not sure if it will ever replace DOS. But then again, I eventually weaned myself off of CP/M, so maybe there is some hope.

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

#47 Post by ecomoney »

Crash, your work with the init script is very impressive...it is a very complicated piece of engineering work. It is now possible to launch different users from the Grub menu on a computer...with an attractive graphical frontend!

If you would relish a further challenge, there is a need for a further enhancement/boot parameter of the init script, to help Puppy meet its objectives.

Code: Select all

puppy pfix=recycle
BarryK wrote: Puppy Linux Mission Statement:

* Puppy will easily install to USB, Zip or hard drive media
* Booting from CD, Puppy will load totally into RAM so that the CD drive is then free for other purposes
* Puppy will be extremely friendly for Linux newbies
* Puppy will boot up and run extraordinarily fast
* Puppy will have all the applications needed for daily use
* Puppy will just work, no hassles
* Puppy will breathe new life into old PCs
The last point is particularly relevant

Currently our new users find it very difficult/complicated to install GRUB and get their computers booting without the CD. There is also a "lockout" barrier to installing puppy on really old pc's...correct me if any of my details are not quite accurate, from my research

To boot puppy in liveCD mode you need at least 48mb of ram, to be able start the (very complicated) installer. Puppy has been reported to work on just 24mb or RAM. 32mb is a very common figure.

Many people when they try puppy, they just want to install puppy to the hard disk, and pass their cd onto someone else to use....currently many continue to use the CD because the installation (GRUB Install/Puppy Universal Installer) is so difficult to use. This stops many more people from trying puppy.

Recycling operations for charity or to avoid landfill (which many people on here use puppy for) need a way to recycle their old computer donations with a minimum of training. For them TIME is their most valuable resource. Most computers just have a single hard drive, and on older ones the data already on them is expendable....in fact its often very welcome to be able to wipe this off easily before giving the computer to a new owner. Gparted/grub config/Puppy universal installer is "overkill" for this.

An install routine in "init", triggered by "pfix=recycle", which runs before the pup_4xx is loaded into RAM would make recycling a computer very fast (and worthwhile), and bypass the minimum ram requirement on very old hardware. It would run from the console.

The script might have these steps...

1. Explain to the user/recycler what was about to happen (all data wiped), and confirm
2. Format 2 partitions - a 250mb swap, and the reminder to ext2
3. set the partition "bootable", or write to the MBR
4. Install GRUB to the hard disk
5. Copy the initrd.gz, vmlinuz, files to the hard disk from the CD
6. Ask the user to choose between a (well explained) choice of FULL or FRUGAL install, and perhaps even check the available RAM to give a recommendation.
7. If FRUGAL, copy the pup_4xx.sfs from the CD to the ext2 partition, if FULL, extract it to it.
8. Create a grub menu.lst files *with the file locations in the right place*
9. Eject the CD (this would be "nice") and ask the user to reboot

Much of the code for this already exists in the existing rc.shutdown scripts/universal installer.

I would be happy to work with you to design the screen, and the "newb english" (newblish?) needed to make it usable. I could also provide testing for it, by asking for it to be included it in the HanSamBen I am working with at the moment, plus the puppy 2.14ce "Phoenix" I will be working on.

This would make puppy available to many more people than it currently is, with a lot less "hassle". How big a pile of old computers can you image? You would save that 8)

Many thanks for your work so far.
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

#48 Post by Crash »

Ecomoney,

What you suggest is potentially very useful, and kind of dovetails into two other action items I've been looking at:

"Missing pup_save.2fs file error dialog - what to do next", and "Investigate problem with PUI and Grub not installing properly".

I think a good way for me to start this is to just make another separate script file that I can test using an existing Puppy install from the GUI. Once that is working, it should be able to be incorporated into INIT. The test platform that I have that most closely resembles what you are interested in is a K6-2 Baby AT computer. I have run it with as little as 128 MB, but I can probably find even smaller memory chips to do further testing. It has a hard drive, floppy, CR-RW, and USB. Very cute computer in a small, low profile case, and fairly "green".

As always, don't hold your breath for the final product. But this would be a pretty modular project, and I can probably give periodic reports when I reach certain milestones.

Thanks everyone for your support and suggestions. As I have said before, Puppy Linux is a wonderful teaching resource, and I continue to have a fresh learning experience every time I use it. We have both Barry to thank for his origination of the project and all the Forum members to thank for their continued support.

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

#49 Post by ecomoney »

This has made me :D

I have about 47 Pc's at my disposal at the moment, all of various ages/specs 8)

This includes two P233/96mb/4.3mb machines with EDO ram I use for demonstration purposes.

Qemu/other virtual machine may help you with the "first draft". Let me know where I can help.

In your own time Crash, this feature has been waited for a long time. Perhaps another thread would be appropriate. Would you like me to write up the "requirements/spec" (similar to above) to start things off?
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

#50 Post by Crash »

Ecomoney,

This does indeed deserve a separate thread. The primary task for this thread, "specify pup_save file from boot loader", I believe has been accomplished. Further, I like your description of what needs to be done. We also have a great Vision Statement: "Puppy will easily install", "Puppy will be extremely friendly for Linux newbies", and "Puppy will breathe new life into old PCs".

Note that for the first iteration, I am not committing to "install to USB, Zip or hard drive media", just to a hard drive. The USB and possibly Zip can be added later, but the hard drive install is essential.

So if you can start another thread essentially repeating what you said back a couple of posts, that is a great starting point. Although when taken as a whole this looks like a big project, each one of the parts is easily bounded and well understood. Once an initial product is developed, we could go into some test and evaluation to see if anything else would be worthwhile to add. I'm a believer in sticking to the original specs and creating a product to those specs rather than iterating the specs during development. Then after evaluation, maybe other features could be added. This falls probably under the definition of "Spiral Development".

Actually, I'm surprised someone else hasn't done this previously. But it's never too late to start.

Also, I welcome others to suggest additional features that could be integrated into what you have already laid out. I'll actually be working on what you have already suggested, as I think no matter what, all the tasks you present are worthwhile.

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

#51 Post by ecomoney »

Thank you crash, Im glad your aware of different software development methodology...Im just about to go on a "family day out" to a local fiddle festival, :roll: and havnt got the time now to write a thorough spec, I will do it when I get in. I will start it in "Puppy Projects section"?

I dont believe that anything other than hard drive installation (by far the most common type) would be necessary...and we still have the PUI for that. Offering too many option would confuse the user. This would be more aimed at new Linux users who want their computer to "just work", and recyclers who will "breathe new life" into new machines.

Im very much looking forward to working with you Crash
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:

#52 Post by ecomoney »

Hi Crash, Ive been busy at the cybercafe...will get those specs to you soon though.

Heres the current procedure :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
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

specify pup_save file from boot loader

#53 Post by charlie6 »

Hi,
how do the 5 lines code in the init file (see page 1) look with the current initrd.gz versions (for later Puppies lucid, raring, wary, wheezy etc...)?

Their pupsave files names syntax indeed are no longer written as for puppy_4.12 and 4.20.

Thanks for any help, Charlie

edited:
i tried the Psave parameter as documented here
http://puppylinux.org/wikka/BootParametersPuppy
without success:
my /boot/grub/menu.lst looks like

Code: Select all

...
kernel /slaktin/vmlinuz pmedia=ATAHD psubdir=slaktin pfix=fsck psave=wheezysave-work.3fs
...

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#54 Post by mikeb »

psubdir perhaps .... but you would get more help posting in the users help section of the forum

mike

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#55 Post by technosaurus »

This thread is too outdated to be relevant to the current state of init. You probably want a new thread in the users section.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#56 Post by charlie6 »

@mikeb and Technosaurus,
many thanks for the advice !
post moved here:
http://murga-linux.com/puppy/viewtopic. ... 408#737408

Post Reply