SFS-Exec

Miscellaneous tools
Message
Author
seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#101 Post by seaside »

Jasper wrote:Hi seaside,

I am delighted with your "SFS-Exec" and your original "save and power-off" pets and, personally, I neither need nor ask for any changes.

However, whilst I have not the least understanding of what may be practicable; it may (most highly improbably, just may) please all of the users all of the time if the blue save icon were made into a right click menu.

So that say,

In off mode it would show a large red cross (flashing or static) on the blue background and any auto save setting would be set to zero and it would be impossible to save by any normal method (with or without any useful additional reminder note).

In super-save mode there would be a large green tick on the blue background indicating that it is safe to save (and/or backup to any location) on-the-fly (without prospective corruption) and any timer setting would be reset to zero and no other normal save method would be available.

In normal save mode there would be the original blue desktop icon, but a save interval could be set as preferred (perhaps even superimposed on the icon) and the normal save would take place on a menu reboot or power-off as well as adhoc use of this mode.

My regards
Jasper,

What I had in mind was to have the ability to "save-to-pupsave-file" only on demand. If a host of options and modes were introduced, my mind would be constantly taxed as to when, and under what circumstances, material is being saved to the pupsave file - a sure way for me to end up saving what I don't want and not saving what I do want. :)

I appreciate all your testing which is always a lot of work because of the constant install, reboot, rearrangement of icons, savepup problems, etc that go along with this.

Best regards,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#102 Post by nooby »

Seaside, if it is too demanding. Too many variables to keep track of then what about the experiment done by one of the active members.
Shutdown without save. I mean how does he do that. Should one not be able to use that one as a reboot without saving then?
I love the SFS.Exec thing that already works part from the little glitch I hit upon. One can warn to not do that and only go the recommended route.

So if one add his shutdown without save then that combination would do what one want. To be able to leave without saving if one have messed up and then it boots and all is okay. okay one can just get a backed up version instead and copy that one over the corrupted one.
I use Google Search on Puppy Forum
not an ideal solution though

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#103 Post by seaside »

nooby wrote:Seaside, if it is too demanding. Too many variables to keep track of then what about the experiment done by one of the active members.
Shutdown without save. I mean how does he do that. Should one not be able to use that one as a reboot without saving then?
I love the SFS.Exec thing that already works part from the little glitch I hit upon. One can warn to not do that and only go the recommended route.

So if one add his shutdown without save then that combination would do what one want. To be able to leave without saving if one have messed up and then it boots and all is okay. okay one can just get a backed up version instead and copy that one over the corrupted one.
Nooby,

Are you referring to "pupshutdown" (which looks very nice)? I didn't notice there was that option, I'll take a look at that.

All the the methods I've seen for avoiding a save to the pupsave file involve the same concept of either editing the shutdown script so as to avoid using "snapmergepuppy" or disabling it as SFS-Exec-pupsave does.

Regards,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#104 Post by nooby »

There is a chance oops a risk that I've read that text too carelessly. 11PM soon so I look in here tomorrow as usual :)
I use Google Search on Puppy Forum
not an ideal solution though

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#105 Post by seaside »

Nooby,

I just realized from your post of the "PUPSTATE" file that you were running in "pupmode=12" mode which is a pupsave on a harddisk.

The SFS-Exec was originally conceived for "pupmode=5" and the SFS-Exec-Save-pup expanded that to "pupmode=13" which assumes a pupsave file on a usb thumb drive.

The layering filesystems are different and as far as I know, if you have a pupsave file on a harddisk, everything is written directly to the pupsave file. So this does not prevent saving when used this way.

Regards,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#106 Post by nooby »

Thanks yes such is important to keep track of. Pupmode 12 is that not what to expect from using frugal install on hdd?

I thought of something else. In the beginning of this thread did you not have the intention to share your practice to make a pupsavefile and then make a sfs of it and that way it did not get saved to.

Do you have that sfs on a USB then? I am such a poor reader I thought you have it in frugal install on a HDD? I remember vaguely that I failed to get it remember my personal settings and that I must have made something wrong? Could that also relate to pupmodes?
I use Google Search on Puppy Forum
not an ideal solution though

Jasper

#107 Post by Jasper »

Hi seaside,

I am using your SFS-Exec.pet solely as a lightning fast sfs loader (not, as I think you do, as part of an alternative operating strategy).

If I make a foolish mistake and my screen locks up it seems that a "Restart x server" will clear that; but if not, I can reboot (so unloading any or all loaded sfs is not vital though I would lose recent changes since any current session timed save).

I would prefer not to change the way I currently update my save file (i.e. with the timer, a reboot or a menu power-off) so that I have no need to install or use a save.pet.

My understanding is that there is no danger in my using your SFS-Exec.pet in this way. Is this correct?
-------------------
Then, unimportantly (though ideally), it seems that I might be able to temporarily make my save file read-only, then make a backup by copying and pasting to another location, then reverting to making my save file read-write. Again, if my understanding is correct, could you kindly advise what code I would need to achieve this via my console?

I apologize for being a pain, but I would like to maximize my benefit from your project which of now is a little quirky with Lupu 5.25.

My regards

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#108 Post by seaside »

nooby wrote:Thanks yes such is important to keep track of. Pupmode 12 is that not what to expect from using frugal install on hdd?
Yes, that's expected

I thought of something else. In the beginning of this thread did you not have the intention to share your practice to make a pupsavefile and then make a sfs of it and that way it did not get saved to.

Yes, and that was an SFS file which can not be saved to.


Do you have that sfs on a USB then? I am such a poor reader I thought you have it in frugal install on a HDD? I remember vaguely that I failed to get it remember my personal settings and that I must have made something wrong? Could that also relate to pupmodes?
Nooby,

I have just thought of an idea where a pupsave file put on a harddisk might be forced to "pupmode=13"(pupsave file on a usb thumb drive).

You'll have to test this because I'm not sure it will work, but I think it will. It involves fooling puppy on bootup.

Here's how to try-

Boot your puppy that has the pupsave file placed on a harddisk with the following code in the boot sequence. For example if you have a grub menu.lst entry something like this -

Code: Select all

kernel /lupu-510/vmlinuz pmedia=usbflash psubdir=lupu-510
The important part is to boot puppy with a "pmedia=usbflash" boot code.

If my guess is right, it will still find the pupsave file on the harddisk, but now it will think its a usb thumb drive and set up the layering file system differently and make it pupmode=13 instead of pupmode=12.

You can immediately test after you've tried by opening a terminal and typing "cat /etc/rc.d/PUPSTATE". There you can see the "pupmode=?" and perhaps it's be 13. :)

Good luck and let me know what happens.

Regards,
s

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#109 Post by seaside »

Jasper wrote:Hi seaside,

I am using your SFS-Exec.pet solely as a lightning fast sfs loader (not, as I think you do, as part of an alternative operating strategy).

If I make a foolish mistake and my screen locks up it seems that a "Restart x server" will clear that; but if not, I can reboot (so unloading any or all loaded sfs is not vital though I would lose recent changes since any current session timed save).

I would prefer not to change the way I currently update my save file (i.e. with the timer, a reboot or a menu power-off) so that I have no need to install or use a save.pet.

My understanding is that there is no danger in my using your SFS-Exec.pet in this way. Is this correct?

You can use it that way, but if you don't control when it saves (a timer save may happen just when you were thinking of not saving anything :) )
-------------------
Then, unimportantly (though ideally), it seems that I might be able to temporarily make my save file read-only, then make a backup by copying and pasting to another location, then reverting to making my save file read-write. Again, if my understanding is correct, could you kindly advise what code I would need to achieve this via my console?
Jasper,

Unfortunately, you can't make the pupsave file effectively read-only through file permissions in puppy. The method for making the pupsave file filesystem read-only is contained in "SFS-Exec-pupsave-noshut.pet" which will only work in pupmode=13 (usually a pupsave file on a usb thumb drive but perhaps might be made to work on a pupsave file on a harddisk as well - see my note to Nooby)

In my view, I'd like to control exactly when a save is made and have nothing happen automatically by timer or otherwise. This is not what most people want or need, however.

Regards,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#110 Post by nooby »

What about this thread then?
How to save to Savefile only on demand in Puppy 5.2
http://murga-linux.com/puppy/viewtopic.php?t=65016

Have been seeking a simple way to control saving sessions, in case of a mistake or an unwanted installation. Am assuming that:
- - like me, readers have limited knowledge of the OS and of script editing.
- - Puppy is on a usb stick, and not used as a permanent working OS, like on a HD.

If you make the 3 edits below,
1. Session changes can still be saved at any time by clicking on the "Save" bullseye icon.
2. Session changes will not automatically save at shutdown.
3. At startup, you will get a warning message which says "X seems to have exited uncleanly the last time you ran puppy..." but no harm is done, just the changes you did not deliberately save are lost.

1. Open the console and type "geany /etc/rc.d/rc.shutdown" without quotes.
- - This opens the shutdown code for editing
2. Type cntrl f to search for "/usr/sbin/snapmergepuppy" without quotes.
- - /usr/sbin/snapmergepuppy is in my unaltered installation 3 times,
- - at line 817, line 847, and line 853.
3. Comment out each line that has it by typing #myrem in front of that line. The # sign alone comments it out, but use #myrem so you can find it later if you need to. Smile

So for each line (3 of'em) that originally said
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
you now have
#myrem /usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw

4. Save the file.
5. Added Feb 22 (should have been in this post from the start): "Go to "Menu->System->Puppy Event Manager->save session->save Interval", and set the value to zero [actually 0] minutes, and OK that."

Did I get it right?
It worked here. It is based on the solutions of many other members. Thank you.
I don't feel confident to pull off that one so I wait for your approval if it looks like a good way to do it.

Sadly I know I had it implemented on one computer it could the desktop though. I don't want to fire up that one though. Too noisy.

Edit Nope no luck with that code at all for qrky142 it refuses to find the sfs file if one write usbflash can not find the sfs it says.

So we have to find the code that force it. I do remember that it is possible. One only ahve to find it using search.


Edit. after trying to boot with usbflash. Nope that lured the boot up to look for the qrky14.sfs file elsewhere than the sda2 which it is on so it could not find it at all.
So we have to find another way to force it to use pupmode for usbflash.

That should be possible. I had that on an older puppy but not sure which I try to find it on the HDD or look for Barry or someone else telling about it on the Forum.

Edit again. What if this one work then?
kernel /qrky142/vmlinuz pmedia=usbflash pdev=sda3 psubdir=qrky142 i915.modeset=1 puppy nosmp pfix=fsck
The pmedia says it is a usbflash but the pdev tells it to look for it on sda3 that should work??? I test it within 5 minutes


older text

oops sorry the big delay in time. I was doing other things. I guess Quirky 1.4 is a good candidate to try it in then?

I prepare it like you instructed and look for if it remains as pupmode 13 then and if that stop it from saving to the HDD thinking it is a USB drive that one should only save to when ordered to?

What else should I try out there. Using the dir2sfs thing maybe and see if it really loads it which I totally failed on lupu513 an 525?

Or me did not get what I was doing maybe. Sometime even when I do my best I get fooled by my short attention span and get carried away thinking me had done it right and forgot a detail very typical. But I try to do it now.

Hahaha they show V the Visitors from outer space on TV tonight. Diana is at it again and this time her Daughter is helping her and the Lizard people look so much like humans that everybody get fooled.

But SFS-Exec is more exciting so Diana will have to do it without me this time. :)

Edit not sure about this one
kernel /qrky142/vmlinuz pmedia=usbflash psubdir=qrky142 i915.modeset=1 puppy nosmp pfix=fsck

i915.modeset=1 is that one superflous? nosmp I need due to me running on a Atom N270 single core CPU.
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#111 Post by nooby »

I found this adventures text
http://www.murga-linux.com/puppy/viewto ... 551#423551
A simple way to don't save file at shutdown or re-use other savepup without running in ram :
you delete savepup and copy an already saved one in home and shutdown when the copy is just done.
Next boot you will find this savepup instead of the last session one Cool
(i use pizzapup in frugaal -puppy2.14 puplet-
he adds this
dunno if it work with puppy4 Confused (gotta try in my 2 testing pupplet... and i tell u Wink ) but yes i just copy my pupsave and when i want it back i copy it on the pupsave and reboot just when that done ! and it work !
(it make the same thing when you boot with other puppy or live cd and change the pupsave with your backup!)
I know the description to be there somewhere one only need to find the right search word. Sadly just now I seems to fail at it.
_________________
I use Google Search on Puppy Forum
not an ideal solution though

Jasper

#112 Post by Jasper »

Hi seaside,

Having amended your original save file to rem out all code as follows:

Code: Select all

#!/bin/sh
# used with SFS-exec to enable pupsave with poweroff

#mv /usr/sbin/snapmergepuppyHOLD /usr/sbin/snapmergepuppy
#exec wmpoweroff
I am genuinely serious that the mere clicking on my blue desktop save icon effects a save (without poweroff or subsequent effect on my usual save options) to my frugal hard drive installation of 5.25.

My regards

Thank you for your previous reply. I have omitted two unimportant responses because my comment above is unexpected and surprising.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#113 Post by seaside »

Nooby,

Well, I thought we could fool puppy, but I guess not :)

It's possible to force pupmode=13 by editing the "initrd.gz" file, but that's really a long editing process.

As far as the other forum references to "not saving to a pupfile at shutdown" - these are all basically the same as "SFS-Exec-pupsave" in that they disable "snapmergepuppy"

The other reference to deleting the pupsave file and replacing it with another one just before shutdown is possibly an emergency move - but a better solution is the one of always loading a copy of your pupsave (there is a reference somewhere on the forum to doing that)

Regards,
s

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#114 Post by seaside »

Jasper,

You may be interested in this http://murga-linux.com/puppy/viewtopic. ... 695#515695

The approach is to use 3 desktop scripts.

1. Reboot -no pup save

2. Poweroff -no pup save

3. Save-pup - immediately

The first two bypass the puppy shutdown and the third is the normal save.

Cheers,
s

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#115 Post by nooby »

Totally naive nooby suggestion follows.

What if it was possible to have a script at start up that looked for the backup version of pupsave and then it hold a link to that one and at shut down one have a choice that says.
1. Do you want to save the current latest pupsave or
2. Do you want to load the latest back up and this way start afresh next boot?

If one answer 2 then it load that one it has a link to and copy that one over the faulty or not wanted changes that one don't want to save?

Or is it easier at boot to go into prompt and do a script there that boot the backup instead of the current but not wanted pupsave from last save?


oops while I write this just in :)
Seaside thanks for finding this one
HOWTO stop puppy from saving when shutting down.

He found it after two hours of searching and then forgot to make a bookmark Hahah that is like me too short attention time span so one fail to do what is a must to document what the source is. I try to find it later to help him. Will be interesting to test and combine with sfs-exec.
I use Google Search on Puppy Forum
not an ideal solution though

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#116 Post by nooby »

Opps my English and my brain is even more confused than what I dare to admit to myself. Jasper says he took out everything? Yes that is surprising.

So what are the save button there for then?
Me totally ??? now.

Edit thanks yes I have read that one before and it was way above my capacity to hold in my mind and follow the structure.

And now it is time for bed. Sadly what Bilko has done is for usb too :)
Last edited by nooby on Thu 21 Apr 2011, 21:26, edited 1 time in total.
I use Google Search on Puppy Forum
not an ideal solution though

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#117 Post by seaside »

Nooby,

If you are wondering about pupmodes and the structuring of puppy in general look here http://www.puppylinux.com/development/h ... works.html

This takes some time to digest, so be sure to wait until tomorrow!

Regards,
s

Jasper

#118 Post by Jasper »

Hi seaside,

Your reference to http://murga-linux.com/puppy/viewtopic. ... 695#515695 does not relate to to a hard drive situation and thus is not appropriate to my needs.

In 5.25 your SFS-Exec-pupsave-noshut.pet has unfortunate side effects which I don't think you have addressed.

Your first save pet works superbly (for me) in 5.25 (with every line of code remmed out). My only reservation is that a save file copy and paste may be corrupted, but instinctively (and with timed save file tests) I think this is unlikely.

My understanding of how any version of Puppy works is so shallow that I can only try to help by conducting any tests that you ask me to do.

My regards

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#119 Post by seaside »

jasper,

Yes, I'm afraid that if you use the "SFS-Exec-pupsave" series for a pupsave file saved on a harddisk, it will not work as intended. It has to be on a usb thumb drive.

I was hoping that a boot code would fix that, but it apparently doesn't and the only other way is to alter the "initrd.gz" file (not a good idea).

Maybe you have half a loaf :)

Regards,
s

Jasper

#120 Post by Jasper »

Hi seaside,

Thank you for your pets and your kind help. As I have commented previously, although not working quite as you anticipated, they work really well for me.

If I load some sfs files and then run fixmenus that takes some 45 seconds to update the Menu so I have copied the root/.usr/share/applications folder to my destop so that I do not need to run fixmenus.

So, thanks to you, I have a lightning fast sfs loader and I can update my save file at any time I choose by clicking on the circular blue desktop save icon.

My regards

Post Reply