SFS-Exec

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

#91 Post by seaside »

Nooby,

Thanks, that was very helpful and one more request post what is in the file "/etc/rc.d/PUPSTATE".

Regards,
s
(I have no idea what the "fuse' refers to - I don't have that on any of my mounts :) )

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

#92 Post by nooby »

Don't get alarmed me have fluppy13s

The s stands for sfs and flp is Jemimah's way to say Fluppy
here it is

PUPMODE=12
PDEV1='sda3'
DEV1FS='ntfs'
PUPSFS='sda3,ntfs,/fluppy13s/flp-013.sfs'
PUPSAVE='sda3,ntfs,/fluppy13s/flpsave.3fs'
PMEDIA='scsihd'
#v3.97: kernel with libata pata has both sata and pata drives in ATADRIVES...
ATADRIVES='sda '
#these directories are unionfs layers in /initrd...
SAVE_LAYER='/pup_rw'
PUP_LAYER='/pup_ro2'
#The partition that has the flpsave file is mounted here...
PUP_HOME='/mnt/dev_save'
#(in /initrd) ...note, /mnt/home is a link to it.
#this file has extra kernel drivers and firmware...
ZDRV=''
#complete set of modules in the initrd (moved to main f.s.)...
ZDRVINIT='no'
PSWAPFILE=''
PSAVEMARK=''
FASTPARTS='sda1|ntfs sda2|ntfs sda3|ntfs '
I use Google Search on Puppy Forum
not an ideal solution though

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

#93 Post by seaside »

Nooby,

Thanks. Your information confirms that some additional coding is required to test where the pupsave file is mounted.

Unfortunately it's not always the same and depends on what kind of installation.

So basically, in your case, the pupsave file was not changed to a "read-only" system which is what was intended.

Thanks for testing this and I'll have to ponder how to change this.

Regards,
s

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

#94 Post by nooby »

Very naive question from Nooby. Can I not tell it to be ro through CLI then or even use a gui and set permissions and such :)
I use Google Search on Puppy Forum
not an ideal solution though

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

#95 Post by seaside »

nooby wrote:Very naive question from Nooby. Can I not tell it to be ro through CLI then or even use a gui and set permissions and such :)
Nooby,

Yes, in some cases. Would you post just one more output. The contents of "/etc/rc.d/rc.local"?

Thanks,
s

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

#96 Post by nooby »

#this file called from rc.sysinit
#you can edit this file
#When firewall is installed, will append lines to this file...
modprobe evdev

if [ -x /etc/rc.d/rc.firewall ]; then
/etc/rc.d/rc.firewall start
fi
mv /usr/sbin/snapmergepuppy /usr/sbin/snapmergepuppyHOLD
mount -o remount,ro /dev/loop1

Could it be that there is different loops to consider?

Sorry me so eager but not having knowledge for it.

Back when I tried out sfs-exec on Snowpup this did happen while preparing the preferences.

Did I tell you about my failure to change the background picture. It held a kind of copy of Snowpup's snowy Finland and I wanted a Cat or Dog there. And I changed the name of the file and renamed the cat file exactly same and placed it in right folder and so on. Nope the original file was copied over from the sfs or something. Could not be changed.

Could not something similar go on here. The pupsavefile we see is a copy and not the one one need to reach to change to ro and the one we see get copied unto the original that is rw when one reboot.

Just a wild totally long shot kind of hunch
I use Google Search on Puppy Forum
not an ideal solution though

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

#97 Post by seaside »

Nooby,

Interesting. In a terminal if you type "mount -o remount,ro /dev/loop1 " and if successful then type "mount". does "/dev/loop1" show as "read-only" ( you can tell because it should look something like "(ro,noatime)" .

Regards,
s

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

#98 Post by nooby »

# mount -o remount,ro /dev/loop1
mount: /initrd/pup_rw is busy
#
# mount
rootfs on / type rootfs (rw,relatime)
/dev/sda3 on /initrd/mnt/dev_save type fuseblk (rw,noatime,user_id=0,group_id=0,default_permissions,blksize=4096)
/dev/loop1 on /initrd/pup_rw type ext3 (rw,noatime,errors=continue,barrier=0,data=ordered)
tmpfs on /initrd/mnt/tmpfs type tmpfs (rw,relatime,size=149600k)
/dev/loop0 on /initrd/pup_ro2 type squashfs (ro,noatime)
unionfs on / type aufs (rw,relatime,si=43ca2dd3)
tmpfs on /tmp type tmpfs (rw,relatime,size=256212k)
tmpfs on /mnt/unrootfs type tmpfs (rw,relatime,size=4096k)
none on /proc type proc (rw,relatime)
none on /dev/pts type devpts (rw,relatime,gid=2,mode=620)
none on /sys type sysfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
none on /dev/shm type tmpfs (rw,relatime)
#
I use Google Search on Puppy Forum
not an ideal solution though

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

#99 Post by seaside »

nooby wrote:# mount -o remount,ro /dev/loop1
mount: /initrd/pup_rw is busy
#
The command "mount -o remount,ro /dev/loop1" should have remounted your pupsave file as "read-only" (ro) as it does with my tests. In your case, it failed to remount and I'm not sure why.

Thank you for testing.

Regards,
s

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

#100 Post by nooby »

Tomorrow or some other day I test it on Quirky 1.4 to see how that goes.
I use Google Search on Puppy Forum
not an ideal solution though

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

Post Reply