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 Wed 23 Jul 2014, 02:05
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
How do we deploy an empty pupsave at 1st boot in frugal?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 5 [75 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
mikeb


Joined: 23 Nov 2006
Posts: 8023

PostPosted: Sun 09 Feb 2014, 20:34    Post subject:  

Quote:
Maybe I need new glasses, but I couldn't find anything close to the subject in the
Nimblex docs


pretty sure it was a boot option in extended boot menu... but don't quote me.

mike

have fun with the init...
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4226
Location: Gatineau (Qc), Canada

PostPosted: Sat 15 Feb 2014, 13:08    Post subject:  

Hello, people!

On the other hand, there is a way to put a pupsave-create script in /root/Startup that is
executed only if you do not have a pupsave file. It could end with a "reboot", and there
you go, you have a 100 % chance of getting your pupsave file created on 1st boot.

On 2nd boot, this script is ignored and you've got a flaming new frugal Puppy all ready
for you.

So maybe fiddling with the init is not necessary. The above is less elegant, but it does
the job.

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 8023

PostPosted: Sat 15 Feb 2014, 13:26    Post subject:  

I would think rc.sysinit would be a better idea.... indeed thats where creating a swap file used to occur ....suppose you want a shiny gui for it though Smile

Auto or manual its like the slax way of create a file and use on reboot which works just fine...

mike
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4276

PostPosted: Sat 15 Feb 2014, 20:52    Post subject:  

Its been a while since I tried it, but the process went something like:

1. use dd to create a file full of zeroes using /dev/zero as the input file
2. format the file to your filesystem (ext2,3,4 for puppy, but it could be others)
3. use bzip2 to compress the file (it works the best for zero-files)
4. repeat steps 1-3 for different save file sizes
5. modify init to bunzip one of the image files to the save file location if one isn't found (feel free to add boot parameters for this)

^6... if you have time, remove all of the insane crap dealing with the old, stupid way

NOTE: Using bzip an empty multiple gigabyte filesystem compresses down to a couple kb and decompression to disk is extremely faster than generating the filesystem on the fly. ... of course this will take more time up front for whoever does it, but it will make the Puppt experience much better thereafter.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2217

PostPosted: Sun 16 Feb 2014, 04:13    Post subject:  

"remove all of the insane crap dealing with the old, stupid way" HeHe, that means starting with a completely blank filesystem in the case of puppy.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2399
Location: New Zealand

PostPosted: Sun 16 Feb 2014, 04:28    Post subject:  

I feel that every puppy should boot into ram as a default (rather than requiring pfix=ram) and that it should ask during the boot process if the user intends to continue as live only, or intends to create a savefile and keep the puppy.

Maybe as follows:
1) If no savefile currently exists boot as Live only
2) Ask the user if they definitely want to create a savefile, or if they want to pick up a savefile from elsewhere (bring up a file manager to find it...), or if they want to delay their choice till later. (some value in offering a small basic savefile maybe? 32 or 64MB for starters maybe?)
3) Carry on with the boot.

It has always struck me as odd that the newby user has to understand the value of pfix=ram long before there is any way for them to know what the heck it even means.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8023

PostPosted: Sun 16 Feb 2014, 06:49    Post subject:  

Well the slax way of setting in the boot parameter the save mode used and whether to go to x or not does make for a very simple non quirky boot process.
The default therefore is eqivalant to a pfix=ram session with vesa video.

I just compromised and simplified the choose at shutdown and guess at boot method for pups which is more akin to the version 2 approach which was significantly simpler, less quirky and faster. The archive save method is also much faster than creating a save file since only new data is stored which might be as low as a few hundred k for a first run.

I also changed the first run shutdown to default to do nothing with a 8 second time out...ie no save config ...especially handy if the framebuffer presents you with a blank terminal.

mike
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4226
Location: Gatineau (Qc), Canada

PostPosted: Sun 16 Feb 2014, 10:10    Post subject:  

Many thanks for your interest, guys.

Hopefully we can offer a friendly solution to all newbies on this important item.

Here's something alpha. It's not an "init" solution. Rather, you'd link the wrapper in
/root/Startup. You'll see that there a "0" un-tested section for when the Puppy would be
started from CD, hence this script is still in alpha.

Feel free to chew over it and suggest your own improvements or alternatives.

Many brains are better than one! Smile

BFN.

~~~~~~~~~~~
EDIT, Feb. 17, 2014 -- I've attached an update, v. 01, as a pet attachment.
This one checks the PUPSTATE, and proceeds from there. In other words,
it offers the choice NOT to create a pupsave if the user wants to use Puppy
in multisession mode from CD/DVD.

I'll call it a "beta1" version, since it does the job well, but there is still room to
grow, for ex. by incorporating some of the interesting suggestions elsewhere
on this page.

Also, the problem remains: if the user gets stuck creating his/her pupsave
with BK's script, how do we tell her/him that there is an alternative?

BTW, tested on Precise 5.7.1-retro. YMMV, and if so, I'd appreciate knowing
about it.

Anyway, it's a step in the right direction, and as long as we put one foot after
the other, there's progress! Smile

BFN.

musher0
SauvPerso-0.1.pet
Description  First pet for this script. Supersedes the bz2 archive below.
pet

 Download 
Filename  SauvPerso-0.1.pet 
Filesize  3.08 KB 
Downloaded  77 Time(s) 
SauvPerso.tar.bz2
Description  Goes in /root/my-applications/bin. The wrapper should have a link in /root/Startup.
bz2

 Download 
Filename  SauvPerso.tar.bz2 
Filesize  2.22 KB 
Downloaded  88 Time(s) 

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)

Last edited by musher0 on Mon 17 Feb 2014, 18:10; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 523
Location: nyc

PostPosted: Mon 17 Feb 2014, 00:42    Post subject:  

greengeek wrote:
I feel that every puppy should boot into ram as a default (rather than requiring pfix=ram) and that it should ask during the boot process if the user intends to continue as live only, or intends to create a savefile and keep the puppy.

Maybe as follows:
1) If no savefile currently exists boot as Live only
2) Ask the user if they definitely want to create a savefile, or if they want to pick up a savefile from elsewhere (bring up a file manager to find it...), or if they want to delay their choice till later. (some value in offering a small basic savefile maybe? 32 or 64MB for starters maybe?)
3) Carry on with the boot.

It has always struck me as odd that the newby user has to understand the value of pfix=ram long before there is any way for them to know what the heck it even means.


that sounds great. would make it easier to move around save files (i find they'e not always found) when needed.

which brings up something i've been wondering about. if you move a save file onto a f2fs partition, is it on the media as f2fs and in ram as the ext(s) commonly offered? does the format of the virtual file system matter much?

anyway, it would be great to be able to reinstall new/old puppies to use with various save files whenever and wherever. and that does sound a bit cleaner for first boot--just add the options for full save and frugal save to partition (still not exactly sure that those two are in fact not the same thing).
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 8023

PostPosted: Mon 17 Feb 2014, 09:00    Post subject:  

Quote:
which brings up something i've been wondering about. if you move a save file onto a f2fs partition, is it on the media as f2fs and in ram as the ext(s) commonly offered? does the format of the virtual file system matter much?

the format within the save file is totally independant of the format of the partition it resides on which is why such as NTFS can be used. (some may chime in with journalling stipulations but that depends on whether you believe theory or practise)
Bear in mind of course that the kernel in question has to have support for whatever partition you wish to subject it to.

The format within tends to matter in terms of reliability ..at least in terms of the features offered buy ext2, ext3 and unjournalled ext4.
Not standard for puppy, but such as reiserfs and XFS could be used as well as long as its posix compliant.

mike
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4226
Location: Gatineau (Qc), Canada

PostPosted: Mon 17 Feb 2014, 18:11    Post subject:  

Hello.

I've updated the script. Please see above,
http://murga-linux.com/puppy/viewtopic.php?p=758938&sort=lastpost#758938

Thanks.

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
dejan555


Joined: 30 Nov 2008
Posts: 2646
Location: Montenegro

PostPosted: Tue 18 Feb 2014, 09:26    Post subject:  

I had a script back on puppy 3.x and 4.x series to make blank pupsave, should still work but naming of pupsave maybe needs change and formating of pupsave

http://www.murga-linux.com/puppy/viewtopic.php?t=43553

Maybe something will be usefull, don't remember fully how it's coded anymore.

_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
musher0


Joined: 04 Jan 2009
Posts: 4226
Location: Gatineau (Qc), Canada

PostPosted: Tue 18 Feb 2014, 10:12    Post subject:  

Thanks, dejan555.

I did preliminary research before I started this project, and I was aware of the
suggestions on your thread. Result : I started the project anyway!

If I remember correctly, your initial proposal was sound, but the following "simple
pupsave" procedure proposed by ASRI and RSH, etc., was not precise enough, IMO,
and I felt it was not "battle-ready"... The options were not focused enough, the user
needed something more closely adapted to the actual Puppy he or she is on.

My script above is not as pretty, it has only a terminal interface, but it goes right to
the point in sequential fashion. For the creation of such a fundamental function as
the pupsave, the new user does not need to be offered multiple bewildering options at
once in a panel.

Most of them are really newbies and they will not know how to handle those options or
what is supposed to come before or after. My script does not draw question marks
above the user's head: it simply asks the user to put one foot in front of the other until
the job is done.

Sorry to be so frank, and if the tone seems a bit harsh. I will obviously welcome any
constructive criticism or improvement suggestions for my script coming from an
experienced Puppy-ist such as yourself. PM me if you wish.

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
dejan555


Joined: 30 Nov 2008
Posts: 2646
Location: Montenegro

PostPosted: Tue 18 Feb 2014, 15:00    Post subject:  

Sounds good to me, I just linked to code in case you needed to pull out some commands out of it, I know it's old and yes I remember that user needed to know exact location where to put files which might indeed be confusing for newbies.
_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
gcmartin

Joined: 14 Oct 2005
Posts: 4072
Location: Earth

PostPosted: Tue 18 Feb 2014, 18:48    Post subject: This thread indirectly educates use, along with the benefit  

I am clear on the approach offered in this thread. It is sound and makes good sense in what it offers. Thus, any user, on first boot, can have all system/subsystem changes saved in real-time versus at the end of user's session at shutdown.

This, in essense, provides protection for system in event of a sudden system lockup or power outage or...

In addition to this on-going work, there is another ripple in the water, also occurring. @Ted Dog has been making good progress where he is extending the SAVE-SESSION Process to create same-similar to what occurs, today, for multi-session users. His offering has importance as it saves user's work in chunks (called multi-sessions) just as is done on CD/DVD disc. Value of his effort is that should you have a session that got it wrong, you could eliminate that session using simple techniques or reboot.

Together, this makes for advances in boot process as well as advances in their ability to assist in user's work and system stability.

If there is a way to combine both of these into a solid foundation for Puppy developers use as they build distro that the community of users use, it benefits all.

Here to help

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 5 [75 Posts]   Goto page: Previous 1, 2, 3, 4, 5 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.0988s ][ Queries: 13 (0.0069s) ][ GZIP on ]