SFS-Exec

Miscellaneous tools
Message
Author
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

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

#121 Post by nooby »

Seaside I agree with Jasper this is a good thing. You explored what is possible within the restraints there was due to the way it is built.
So thanks for the good tools you have provided. It has been an exciting journey to follow. But Edit the first page so it is very clear what it does and what it does not do and under what circumstances :)

Jasper thanks for all testing and idea efforts you also put into this. I feel embarrassed how I flood the thread. I got carried away out of happiness that several years of waiting could find an easy solution.
Now I have to go find the thread and post that did let me have the pupmode 13 on HD. I know I have a post on a thread that inspired a friendly guy to make one and only have to find that one again. :)

Now to my question
I am so dense that it is beyond embarrassing. Hahah

You edited out exact everything in that file and still when you click on it it just works?

How could that be so?


And this "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. "

Seaside if I get it. The code Bilko gave also only work if one have the pupsave file on an USB?

So what I need to do is to find a Puppy that is a series 4 puppy because then I can use your idea to make the pupsave file into a sfs and that way get my personal preferences and still not save to the savefile.

So when you do want to add a preference or change one then you open it up and do the change and then make an sfs out of it again.
As easy as pancake :)

So I only have to find a puppy based on 431 then or 420

Maybe Lighthouse pup or latest Quirky 142 or Fluppy even?
I use Google Search on Puppy Forum
not an ideal solution though

Jasper

#122 Post by Jasper »

Hi nooby,

My understanding is that seaside's SFS-exec.pet worked well in all your Puppy versions where you used it, except when you installed SFS-Exec-pupsave-noshut.pet on one of your Puppies the only side effect you noticed was that you could no longer use the fast sfs loader.

Can you try that again and just check if the save worked properly. You could test it by making a folder in root called say aasavetest (so that it shows at the start of your root directory). Then do a hard poweroff (i.e. with your hardware poweroff as opposed to using the menu poweroff). Then reboot and check if you still have aasavetest.

If that works you have succeeded with one of your two objectives.

You could then install say, shinobar's sfs-on-the-fly style pet which is likely to work well (hopefully even with your SFS-exec.pet still installed). If it works and your save still works (just delete aasavetest to check) then you have only lost the lightning speed of seaside's sfs loader.

Alternatively, you might experiment with uninstalling seaside's two pets and then reinstalling them (perhaps in a different order) and on your other Puppies.

You could wait to see what seaside thinks about my suggestion before you consider trying it - but (ideally) take a backup of your save file(s) before you test if you try it on any/all of your Puppy versions.

My regards

I have no answers to your many questions - my concern is if the magic works properly.

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

#123 Post by nooby »

Thanks Jasper. I will not load Shinobar's it is way too slow for my impatient brain. :)

But I am trying to grasp the difference.

I am testing Quirky 142 and that is a proper Puppy 431 and it has Seamonkey in it and I have installed Seasides SFS-Exec and that works for Opera browser SFS but when I try to load FF.sfs two different versions then none of them start up.

So what could that be about?

Fluppy that also are puppy431 has so many preferences from Jemimah that it take for ever to change them back to what I prefer so I will not touch that one if I can find something better.
Lighthouse pup are puppy420 I guess but that one too has so many different prefs so I hesitate to test it again.

What else Puppy 431 has not the drivers I need? Refuse to boot? Not sure.

I need to find something that just works :)

So now I am stuck in that Quirky fail to load the FF.sfs that worked on the two other os.
I use Google Search on Puppy Forum
not an ideal solution though

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

#124 Post by nooby »

Hahaha I am very dense today or always:)
So much work and lost everything. Okay my fault I should have saved it first. I start all over again. And do a new test.
old text follows

okay I did as you told me but most likely I did not grasp.
if I have no save file at all how can it save anything at all?

okay I look in root now. nope nothing there Which is to expect due to me having no savefile.

I have to save using the save button that Seaside gave me and then start up again and then do what you told me.
I use Google Search on Puppy Forum
not an ideal solution though

Jasper

#125 Post by Jasper »

Hi nooby,

I found shinobar's sfs-on-the-fly to be quite quick, and as I am not short of RAM I frequently leave my activated programs (sfs, portable and mainstream) minimized to my system tray so they reactivate instantaneously.

My regards

Post Reply