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 Mon 20 Nov 2017, 21:16
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
"bootspecs" - an alternative to boot parameters
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [37 Posts]   Goto page: 1, 2, 3 Next
Author Message
gyro

Joined: 28 Oct 2008
Posts: 1406
Location: Brisbane, Australia

PostPosted: Sat 17 Sep 2016, 08:58    Post subject:  "bootspecs" - an alternative to boot parameters
Subject description: A utility to manage the content of the BOOT_SPECS file in "initrd.gz"
 

Bootspecs is a utility to provide user access to the BOOT_SPECS file in "initrd.gz".
The BOOT_SPECS file is a new facility provided by the new "init" script in new puppies based on the woof-ce 'rationalise' branch.
It can contain variable definitions to overide the ones usually set by boot parameters.

Edit, 22 Sep 2016:

"bootspecs-0.4.sfs" is attached.
This is meant to be the final version in this concept development phase.
It's useable enough to indicate if such a utility is worth pursuing.

The "Create as boot parameter line" processing has been enhanced:
It now includes some validation of parameters, this validation could be extended. Only valid parameters are passed on.
It now generates a "do nothing" file if the "OK" button is clicked with an empty text line.
The "OK" button process now displays a "Done." message when it is finished.

The "Store Boot configuration file in initrd.gz" "OK" button process now displays a "Done." message when it finishes.

The online help file, (click the "Help" button), has been significantly updated.

The sfs now contains a "bootspecs.desktop" file so "Bootspecs" appears in the "System" menu.

Old post follows.
==============================================================================
To specify the boot parameter "pfix=nocopy", you could do the following:
1. In a terminal enter "bootspecs".
2. In the menu screen that opens, click on "Create as boot parameter line".
3. In the dialog that opens, enter the text "pfix=nocopy" (without the quotes). Then click the "OK" button.
4. In the menu screen, click on "Edit as boot configuration file" to browse/edit the file created by the previous step. Close the editor.
5. In the menu screen, click on "Store Boot configuration file in initrd.gz".
6. In the "Select file dialog" that opens, navigate to, and select, the "initrd.gz" file that is to be modified. Click on the "OK" button and the new BOOT_SPECS file will be written into the selected "initrd.gz".
7. "Quit" the utility.
On reboot, the puppy sfs's will not be copied into memory, just as if you had added a "pfix=nocopy" parameter to you boot entry.

Clicking on the "Help" button will open a help page in the defaulthtmlviewer. This contains information about the "boot parameters" and "init variables" supported by this utility.

This is pre-alpha, "proof of concept" code. It could be replaced with a much more sophisticated utility, e.g. one that presents the "pfix=" options as a series of check boxes.
It is an attempt to show a possible way to make puppies "boot parameters" more accessible.

I have attached an sfs file. Load it as an extra sfs or as an adrv.

For anyone interested in the code:
This does not use gtkdialog, since I can't get gtkdialog to work with gtkbuilder and glade.
The interface is provided by custom C code using glade gtkbuilder xml gui definitions. Each C program drives a single screen based on command line parameters and returns the resultant data on standard output. A bit like my own "zenity" except that the look of the screen can be controlled by glade.
The sfs contains both 32bit and 64bit versions of the C programs. The "bootspecs" script should automatically use the appropriate ones.

Note: The package also conatins a script called "file2initrd" which could be generally used to update "intrd.gz". Just run "file2initrd" without any parameters to see usage.

Edit:
Now have "bootspecs-0.2.sfs".
This release produces error messages if it does not recognise a boot parameter.
If you get it wrong, just click on "Create as boot parameter line" again, and have another go.

Edit 2:
Now have "bootspecs-0.3.sfs"
On first run, this version sets the default "initrd.gz" to be that of the current puppy, if it finds it in the normal place.

gyro
bootspecs-0.4.sfs.gz
Description  remove fake ".gz" to produce the sfs file.
gz

 Download 
Filename  bootspecs-0.4.sfs.gz 
Filesize  28 KB 
Downloaded  58 Time(s) 

Last edited by gyro on Thu 22 Sep 2016, 00:32; edited 3 times in total
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 2007
Location: Germany

PostPosted: Sat 17 Sep 2016, 19:42    Post subject:  

Ok.

I did not have a look into the new woof ce nor did I have a look into the bootspecs program.

Though, I think you are kidding the Puppy users.

A GUI to modify a file in intrd.gz to set e.g. pfix=nocopy and then to rebuild the initrd.gz.

Laughing Laughing Laughing

Oh well.

You must be kidding!

Sorry, but I can't stop laughing!!! Laughing Laughing Laughing Laughing Laughing Laughing Laughing

A GUi to modify a file in initrd.gz to have a (or even some more) boot option, that is easily modified directly in the text based menu.lst

What drugs are you on?

Laughing Laughing Laughing Laughing

Ich lache mir 'nen Ast!!!

Laughing Laughing Laughing

with the bootspecs program wrote:
To specify the boot parameter "pfix=nocopy", you could do the following:
1. In a terminal enter "bootspecs".
2. In the menu screen that opens, click on "Create as boot parameter line".
3. In the dialog that opens, enter the text "pfix=nocopy" (without the quotes). Then click the "OK" button.
4. In the menu screen, click on "Edit as boot configuration file" to browse/edit the file created by the previous step. Close the editor.
5. In the menu screen, click on "Store Boot configuration file in initrd.gz".
6. In the "Select file dialog" that opens, navigate to, and select, the "initrd.gz" file that is to be modified. Click on the "OK" button and the new BOOT_SPECS file will be written into the selected "initrd.gz".
7. "Quit" the utility.
On reboot, the puppy sfs's will not be copied into memory, just as if you had added a "pfix=nocopy" parameter to you boot entry.

without the bootspecs program wrote:
To specify the boot parameter "pfix=nocopy", you could do the following:
1. Open file menu.lst in text editor
2. Change the appropriate entry in menu.lst
3. store menu.lst

Wink Laughing

_________________
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) Laughing

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! Wink
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 8659
Location: qld

PostPosted: Sun 18 Sep 2016, 00:29    Post subject:  

LazY Puppy wrote:
Ok.

I did not have a look into the new woof ce nor did I have a look into the bootspecs program.


Why waste your time posting then? Rolling Eyes

I will take a look in due course.

_________________
Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1287

PostPosted: Sun 18 Sep 2016, 01:09    Post subject:  

@LazY Puppy: I think the idea was inspired by this thread?
http://www.murga-linux.com/puppy/viewtopic.php?p=923227#923227
http://www.murga-linux.com/puppy/viewtopic.php?p=923278#923278

edit: Or maybe not. If it addresses sunburnt's problem maybe we should post a link to this thread there too?
Back to top
View user's profile Send private message 
jlst

Joined: 23 Nov 2012
Posts: 571

PostPosted: Sun 18 Sep 2016, 01:24    Post subject:  

.
Last edited by jlst on Sun 18 Sep 2016, 07:17; edited 1 time in total
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 2007
Location: Germany

PostPosted: Sun 18 Sep 2016, 07:09    Post subject:  

jlst wrote:
You have nothing of value to add to this thread... your TOPLESS app is shit..

Yes, it's that big one shit.

It has made me up to stop doing remasters to store very many settings that are usual stored in save files and/or at remasters. I love that shit, as it lets me use puppies from unicorn, vivid, tahr etc.pp. modified to my needs including to boot directly into German language, setup preferred wallpapers (one for each desktop, 10 desktops with different icons on it) and themes for icons, gtk, jwm, sounds, preloaded .sfs files (at boot up) up to 120 out of the box (including to load them to a top layer or just to a default layer) with menu pipes to external files at boot partition and/or two more partitions (that I'm calling parallel partitions).

Hassle of save files, hassle of remastering - BEGONE!

And do you know what?

I'm controlling this by boot options in menu.lst, so if there are 10 or even 50 or even 100 different config files, I can boot 10 or even 50 or even 100 different setup puppies based on just a single installation without to use a save file or doing remasters (which usually breaks some stuff).

What a shit!

Love it! Laughing Very Happy

augras wrote:
Hi, EUREKA ! it works !
So i can see all your menus and icons and make a better translation.
You have made a real great work and i think it's the better way for a puppy.

_________________
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) Laughing

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! Wink

Last edited by LazY Puppy on Sun 18 Sep 2016, 07:23; edited 1 time in total
Back to top
View user's profile Send private message 
jlst

Joined: 23 Nov 2012
Posts: 571

PostPosted: Sun 18 Sep 2016, 07:18    Post subject:  

I can't believe mods allow trolling in the cutting edge area!!
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1406
Location: Brisbane, Australia

PostPosted: Sun 18 Sep 2016, 07:20    Post subject:  

@LazY Puppy,
I'm glad you got a laugh, Puppy is supposed to be fun.

Obviously, this utility is not designed for you.

Strangely, I find it a little more convenient than editing my menu.lst directly.

But more than that, the file that gets added to initrd.gz, actually contains init variables, so it has the capability to preset any variable in init, not just the ones set by boot parameters.
The utility provides ready access to that file. The boot parameters interface in the utility, is just that, an interface using the more documented parameters.
Although not implemented yet, the utility provides an opportunity to do some validity checking of the parameters.

So, I don't think I've gone completely tropo.

gyro
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 2007
Location: Germany

PostPosted: Sun 18 Sep 2016, 07:25    Post subject:  

jlst wrote:
I can't believe mods allow trolling in the cutting edge area!!

So, why did you remove the content of your post I'd replied to?

Removing posts content or changing it after a reply has done to such posting is the real troll behaviour.

So, you're the troll here? Laughing Wink

augras wrote:
Hi, EUREKA ! it works !
So i can see all your menus and icons and make a better translation.
You have made a real great work and i think it's the better way for a puppy.

_________________
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) Laughing

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! Wink
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1997
Location: In The Way

PostPosted: Sun 18 Sep 2016, 08:48    Post subject:  

Any useful new addition is welcome, imo.

It looks useful and 'easy' to use, to me! I don't know if it will work with JL64 700 initrd.xz, or FatDog initrd, but I will give it a go. I can see the 'quick' benefit and other potentials this might offer!

It's not as comprehensive as topless, and it's not as big either!

I will test it out too!

stemsee
Back to top
View user's profile Send private message MSN Messenger 
mavrothal


Joined: 24 Aug 2009
Posts: 2908

PostPosted: Sun 18 Sep 2016, 10:25    Post subject:  

Quick test.
Code:
# bootspecs
File '/root/.config/bootspecs/BOOT_SPECS' not found
# ls /root/.config/bootspecs/
bootspecs_as_params.txt  bootspecs.conf

Indeed initrd.gz is unchanged.
Does it require an initrd with a BOOT_SPECS file already in it?

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1406
Location: Brisbane, Australia

PostPosted: Sun 18 Sep 2016, 11:05    Post subject:  

mavrothal wrote:
Indeed initrd.gz is unchanged.
Does it require an initrd with a BOOT_SPECS file already in it?
No, initrd.gz was unchanged because it found no file to copy into it.
There should have been a /root/.config/bootspecs/BOOT_SPECS file created, which is the file that gets copied into the initrd.gz.
The question is why did /root/.config/bootspecs/bootspecs_as_params.txt get created, but not /root/.config/bootspecs/BOOT_SPECS?

Edit later:
The script parses the entered line for puppy boot parameters.
If the line does not contain any valid puppy boot parameters, then no
/root/.config/bootspecs/BOOT_SPECS is produced.

Hmm.., some room for improvement.

gyro
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2908

PostPosted: Sun 18 Sep 2016, 13:29    Post subject:  

gyro wrote:

Hmm.., some room for improvement.

Given that this utility can render a system unusable I think it might be better to only provide menu driven options, verify that the DISTRO_SPECS in the system and target initrd are the same as well as the location of the initrd (maybe from from the BOOTCONFIG).
Finally you might want to include an init parameter to ignore bootspecs for the times when user ingenuity breaks best intentions.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1406
Location: Brisbane, Australia

PostPosted: Sun 18 Sep 2016, 21:04    Post subject:  

mavrothal wrote:
I think it might be better to only provide menu driven options
I agree, but the chance of me doing that much gui programming in Puppy are highly unlikely.
mavrothal wrote:
verify that the DISTRO_SPECS in the system and target initrd are the same as well as the location of the initrd (maybe from from the BOOTCONFIG).
The whole idea of having a "Select file dialog" for "initrd.gz" is so that the "initrd.gz" file that needs to be modified can be modified from any running Puppy.
Though it might be an idea to preset the default to the current "initrd.gz", if it's in the usual place.
mavrothal wrote:
Finally you might want to include an init parameter to ignore bootspecs for the times when user ingenuity breaks best intentions.
If a modified "initrd.gz" is mucking up a puppy, then replace it with the "initrd.gz" from the iso.
If we want to save puppy users from themselves, then we shouldn't be running them as "root".

gyro
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2908

PostPosted: Mon 19 Sep 2016, 00:52    Post subject:  

gyro wrote:

mavrothal wrote:
Finally you might want to include an init parameter to ignore bootspecs for the times when user ingenuity breaks best intentions.
If a modified "initrd.gz" is mucking up a puppy, then replace it with the "initrd.gz" from the iso.
If we want to save puppy users from themselves, then we shouldn't be running them as "root".

I do not know about you but I have made my fair share of typing mistakes or just oversights.
When suddenly your system says puppysfs is not found because you mistyped sda21 instead of sda12, you do not even know what is going on before you start looking for the original initrd from the original iso.
Similarly because you modified superpup-123 in the removable sdc1 instead of sda1
or just because you want to test something and want to change variables for that one run etc.
Regarding root you may want to consider that the most common puppy diagnostic advise is "boot with pfix=ram" and any root effects are gone (assuming not a full install) Wink
So having
Code:
if [ -f /bootspecs -a "$PBIGNORE" = "" ]; then . /bootspecs; fi
might not be such a big trouble.
_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [37 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.0688s ][ Queries: 14 (0.0056s) ][ GZIP on ]