SFS-Exec

Miscellaneous tools
Message
Author
nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#21 Post by nooby »

Thanks, later today I will try to follow your description and see what happens. I feel unsure about the name z or Z in the description. Is that something I tell it or is that built into your pet that it looks for a z and ignore other names like lupu525_s.sfs or something.

Important questions

Should the first pupsave file one make be a 3.fs and not a 2fs I always make them 2fs while your .desktop maybe wants them to be 3fs?
I use Google Search on Puppy Forum
not an ideal solution though

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

#22 Post by seaside »

nooby wrote:Thanks, later today I will try to follow your description and see what happens. I feel unsure about the name z or Z in the description. Is that something I tell it or is that built into your pet that it looks for a z and ignore other names like lupu525_s.sfs or something.

Most recent pups do not use a z-drive sfs and so it can be utilized for other purposes. At bootup puppy looks for an sfs file named with the following 8 character format:
z-firstletterofpup-3lastdigitsofpupver-3lastdigitsofkernelver.sfs. So, for example the z file for
lupu-510 would be named zl510332.sfs


Important questions

Should the first pupsave file one make be a 3.fs and not a 2fs I always make them 2fs while your .desktop maybe wants them to be 3fs?

It doesn't make any difference because the pup-save file will be converted to an SFS file.
Cheers,
s

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

#23 Post by nooby »

Well maybe half job done.

1. I made a dir with sfs files in it and named i sfsfiles it is placed on mnt/home

2. I made a small pupsavefile that I now need to rename as you explained above. in my case it is lupu525 so it will be zl525332.sfs then
due to lupu525 having the kernel 2.6.33.2 kernel was that right?



But the dir2sfs program I don't understand how to apply it.


I am in pfix=ram now so feel for doing it. I am using your sfsexec and managed to start opera 11 or something sfs but the Chrome 12 failed to start.

I think I have a FF3.013 that I can test if it works too.

So need to get the dir2sfs program going and with correct name :)

Edit late at night here now so most likely I look for your answer tomorrow.

Which dir2sfs.pet should I use? The lupu525lite does not have dir2sfs so I borrowed one from some other puppy but that could fail due to missing libraries or something.

Where can I find a working pet for dir2sfs that works in Lupu?

good night
I use Google Search on Puppy Forum
not an ideal solution though

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

#24 Post by seaside »

nooby wrote:Well maybe half job done.

1. I made a dir with sfs files in it and named i sfsfiles it is placed on mnt/home

2. I made a small pupsavefile that I now need to rename as you explained above. in my case it is lupu525 so it will be zl525332.sfs then
due to lupu525 having the kernel 2.6.33.2 kernel was that right?

Just to review steps-
After you have made the small pupsave file with whatever added pets, reboot with pfix=ram.

Now click on the small pupsave file and it will mount as a filesystem. Go to the /mount directory and It will probably look something like this according to what name you gave the file - "/mnt/+initrd+mnt+dev_ro2+lupu-525+lupusave-setup.2fs" when mounted.

Now in the /mnt directory, open a terminal and enter the command "dir2sfs +initrd+mnt+dev_ro2+lupu-525+lupusave-setup.2fs" (Note: space after "dir2sfs")

This command will make an SFS file which you can then rename "zl525332.sfs "

Then, move "zl525332.sfs" to the same location as the main lupu-525.sfs file.

Now, when you reboot, the "zl525332.sfs" file will be automatically loaded.


Good luck and sleep well,
s

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

#25 Post by nooby »

Thanks, I will test later. I have to read through a lot of sfs threads that I have collected today so I get it better.

Mu wrote a thing that looks interesting and others told that one can use

mksquashfs
manually and don't really need a dir2sfs scriptfile.

When I have booted into pfix=ram then I have no dir2pet anywhere do I?
Where? I have looked in Lupu, Snow, LHP and in Wary 5


Or are you saying that every puppy since woof has it built in hidden?

I need to have that script on mnt/home first and then when in pfix=ram and then start it up?

As is obvious I am not on the level one need to get these things easily going. So I will read up more first.

Thanks indeed.
I use Google Search on Puppy Forum
not an ideal solution though

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

#26 Post by seaside »

nooby wrote:that one can use
mksquashfs manually and don't really need a dir2sfs scriptfile.

I think "dir2sfs" is in most pups (you can test this in a terminal by typing "which dir2sfs") and see if the command finds the file. If for some reason it isn't there, you can use the command "mksquashfs ". But, it's better to use "dir2sfs" because it contains some error checking so you don't destroy any existing files. ("dir2sfs" uses the "mksquashfs" command) :)
Cheers,
s

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

#27 Post by nooby »

I trid to follow your description but my ability to read instructions is very random at best and not there at worst case scenario.

Btu I almost made it. I looked very real to me but it did not bot the zl525332.sfs file when it booted. And me having placed firefox on teh hdd it did not like at all.

I start all over tomorrow and try to be more carful I don't want to give up on this one.

Something in your description seems to fail me.

I should cite or quote you to be correct but I seems to come up to this hurdle.

Are the sfsexec.pet supposed to be incorporated in the small savefile that I later make a dir2sfs of

The one thing that went wrong was that I made that one two times.

One need to start totally fresh then if I get it. Not use a current pupsave file?

The problem is that my OS is on sda3 and the script maybe suppose it is on sda1? It fail to find the zl525332.sfs file it does not boot it.

Maybe it clear up tomorrow. Too late at night to start all over now.

Edit this is one day later

Surprise

Spent some 3 hours trying to do exactly as you describe so with reservation that I am incredibly bad at following instructions I utterly fails.

I have booted with both pfix=ram and booted as usual but it fails to boot the zl525332.sfs file.

Is there a sure way to confirm that it boot it. Can one confirm in anyway what gets booted or not.

When I made the dir2sfs it took it from here
created: /mnt/+mnt+sda3+lupu-525+lupusave.2fs_525.sfs ( 47 MB )
created: /mnt/+mnt+sda3+lupu-525+lupusave.2fs_525.sfs-md5.txt

The sda3 should not be there should it? should it not be like this
created: /mnt/+mnt+home+lupu-525+lupusave.2fs_525.sfs

the sda3 comes from that the Lupu has not saved anything yet.

My gut feeling is that one should not use the pfix=ram thing to make dir2sfs file.

one should reboot into another puppy and make the sfs from that one and that way it will have the internal structure in right places?

But I can be badly wrong. So what can explain why it fails. Must be something in the way I do it that differ from your description.

Something that is obvious to you and that I fail to read into your txt as what you tell me to do? Or is it as simple as you having the frugal install on sda1?
Last edited by nooby on Fri 08 Apr 2011, 14:41, edited 1 time in total.
I use Google Search on Puppy Forum
not an ideal solution though

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

#28 Post by nooby »

see text above
Last edited by nooby on Fri 08 Apr 2011, 14:41, edited 1 time in total.
I use Google Search on Puppy Forum
not an ideal solution though

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

#29 Post by nooby »

Background I have Lupu525 put in a subdir with the three needed files for to prepare a frugal install on Sda3 on the NTFS hdd. So grub4dos boot it up with pfix=ram and so on...

1. First I boot up with pfix=ram to make a totally fresh lupu.
2. Then I chose all the personal preferences I want. Then save these in a Lupusave file
3. I then reboot using pfix=ram and make a copy of the lupusave for backup purpose and place it out of reach in another subdir many layers away.


4. and then reboot with pfix=ram to not let any other pupsavefile either to be loaded and mounted.

5. I then mount the pupsavefile using Rox and open up a terminal in that Rox space and tell terminal do do dir2sfs giving it the path I see in rox and dir2sfs report it worked as I described in a post above this one.

Could I have included too much in the code? I used this one

dir2sfs /mnt/+mnt+sda3+lupu-525+lupusave.2fs

should it have been just this?
dir2sfs +mnt+sda3+lupu-525+lupusave.2fs


or could it be that I use grub4dos and that that one fail to allow lupu to boot the zl525332.sfs

the sda3 is due to that my computer have three partitions. Does that make it fail?

Could I maybe solve it by not using dir2sfs not at all using the mksquashfs just as it is? I give it a try. I have the savefil backed up so no big deal?
Last edited by nooby on Fri 08 Apr 2011, 14:50, edited 2 times in total.
I use Google Search on Puppy Forum
not an ideal solution though

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

#30 Post by nooby »

Finally some progress but only after using a wild workaround which fail to have my personal settings from the zl....sfs.

1. I did a pfix=ram boot and then installed sfsexec which did not get loaded.
2. I had made a copy of the zl525332.sfs that fail to load when I boot up and placed in among the sfsfiles in that direcory for them that I told sfsexec to make use of and
3 then I loaded that zl525332.sfs and that gave me the firefox I had in the save file but none of the other changes did survive though.

so I am writing now from the pfix=ram booted but that make use of the zl525332.sfs in a way you did not write about for as I get you it should be booted.

Don't we have to compare the boot codes we use? I have this one.

Code: Select all

 title Lupu 525 Lucid Puppy Linux 
   rootnoverify (hd0,2)
  kernel /lupu-525/vmlinuz pmedia=scsihd pdev1=sda3 psubdir=lupu-525 i915.modeset=1 nosmp 
  initrd /lupu-525/initrd.gz  
  
So any suggestion how I can get the z file to boot?

Can one force the boot of the zl525332.sfs file? What could be the reason it does not boot as it should. Have you tested with lupu525 in frugal install?

Maybe I need to use an older puppy?
I use Google Search on Puppy Forum
not an ideal solution though

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

#31 Post by seaside »

nooby wrote:
should it have been just this?
dir2sfs +mnt+sda3+lupu-525+lupusave.2fs
Yes it should, and you're just about ready.....

Rename the newly created sfs file.

Move it to the same directory where the main "lupu-525.sfs" file is.

Reboot and then look to see if "/initrd/pup_z" exists, if it does, it worked :)


Good Luck,
s

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

#32 Post by nooby »

Nope it does need the /mnt/ part or it says that no folder has been given.
dir2sfs /mnt/+mnt+sda3+lupu-525+lupusave.2fs

I am in Lupu SFS version now. And it does work with FF but it did not keep the icons on the screen or the background so it maybe is something I still do wrong.

But finally after two days of frustration over my inability to read and follow instructions it does sort of work :)

So very much appreciated that you did not give up on me.

Now I only have to find out how to get it to keep the screen background I am used to have there and not the very dark theme lupu has. Yes very admirable old caves but not as the screen that I would prefer.


Edit
Let me tell you a secret, don't tell anybody else. I did not use Lupu this time I did use Snowpup instead. That seems to work better than to use Lupu.

When I used Lupu it did not include the sfsexec but when I used Snow it did even give them an icon in Menu.
I use Google Search on Puppy Forum
not an ideal solution though

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

#33 Post by seaside »

nooby wrote: Now I only have to find out how to get it to keep the screen background I am used to have there and not the very dark theme lupu has. Yes very admirable old caves but not as the screen that I would prefer.
nooby,

You've done well - created a mountable pup-z sfs from a pupsave file.

Because of puppy's layered file system, if you make changes to files that are already in the main pup-xxx.sfs file (which you do when you change backgrounds, themes, etc) they will not take priority in the pup-z sfs as they do with a pup-save file. On the other hand, any files you created in the pup-z sfs that didn't exist in the main pup-xxx, will have a priority.

There are methods to get around this, but I warn you that there is scripting involved and it can get complicated and maybe even too much bother.

Cheers,
s
(I will never reveal any of your secrets - not even to wikileaks :) )

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

#34 Post by nooby »

Now I know why you have made SFSexec that way.

Shinobar's SFS-load ask questions and install to menu so takes more time that way.

I guess I will make use of both for a wile to see what my body likes most. :)

older text
I should have tested using puppy 431 first. Lupu525 fails to make use of the z file the way I thought.

Wary511 does it better but did not keep the sfsexec program despite me had that installed. But the username and password to Puppy forum got remembered and the åäö signs and time and it did boot directly in instead of starting all over.

So now I have to find a modern 431. Shinobar's WaryQ or something similar. Maybe a late Quirky? Or would Fluppy work?

So much testing :)

May I ask a final Hmm question.

You learned how to do sfs load on the fly from Shinobar?
How is his sfsonthefly different? Yes I can read his thread but I don't trust me can grasp the text. So I ask you as somebody building something similar but learning from Shinobar and you wanting maybe a slightly different feature? Or are you reusing his and adding the GUI you had but mechanism the same?

Now I do go to read his way of doing it. Testing on Shinobar's WaryQ.
I use Google Search on Puppy Forum
not an ideal solution though

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

#35 Post by seaside »

nooby wrote: How is his sfsonthefly different? Yes I can read his thread but I don't trust me can grasp the text. So I ask you as somebody building something similar but learning from Shinobar and you wanting maybe a slightly different feature? Or are you reusing his and adding the GUI you had but mechanism the same?

Now I do go to read his way of doing it. Testing on Shinobar's WaryQ.
Nooby,

The union technique is exactly the same. The difference is that immediately after the union, SFS-exec finds the executable file and immediately starts the program; while "sfs-on-the-fly" does error checking, fixmenus, a window manager restart, and also gives an option to start the program.

Ideally, it would be great to give the pup-zdr sfs a priority over the main pup-xxx.sfs file, but that priority is set in the bootup code.

You might wish to consider making a pupsave file with your favorite settings and programs (not an zdr sfs file) and then simply lock out any saving possibility to the pupsave file. No saving during a session and no saving on shutdown.

In this way, you could use SFS-exec with the knowledge that it won't be causing problems in the save file.

Cheers,
s

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

#36 Post by nooby »

Thanks for that explanation. Hm so if I boot with a savefile then it can get corrupted by something a sfs does to the savefile?

You mean like installing same sfs twice or over one that already exists in the pupsave file?

My impatience makes me prefer your way of doing it.
Then I should make a habit out of having a good backup of the savefile so one can repair such easily?
Would it really corrupt the save file if one avoid such bad behavior and acted like a good loader and un-loader doing only things within the limiting constraints?
I use Google Search on Puppy Forum
not an ideal solution though

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

#37 Post by seaside »

nooby,

One of the principles of a file system (and maybe even most systems) is that "there cannot be two files with the same full-path name" So the question becomes - what to do if that should occur? The answer for Puppy is to make up a set of rules for which file system gets priority.

The rules might be visualized this way -

Imagine a box with a transparent glass top (this is the "top dog" and is the boss). And just underneath, is another glass layer (which we will call the "assistant top dog"). Then, underneath the "assistant top dog" is a litter of many other pups.

The "top dog" takes priority over all others. So if the "top dog" decides to delete, create or change any file in the box, it rules (for that session).

The "assistant top dog" is the main pup-xxx.sfs file and has a priority over any other file systems (added sfs files).

So we have this hierarchy-

Top dog - highest level - controls everything -
Assistant top dog - priority over all below
All others - added sfs

What happens now when all these file systems try to join into a single unified one?

When puppy is loading and there is a pupsave file, the pupsave file system goes right into the "top dog" level. The main pup-xxx.sfs file becomes the "assistant top dog" and any other sfs files loaded are under the "assistant top dog".

This is not a technical explanation and hopefully helps to understand the following:

If an sfs is loaded and contains a file that is present on the main pup-xxx.sfs (or the "top dog" level) it is treated as if it didn't exist.

When puppy wants to save, it tries to avoid saving files that were only needed temporarily, but sometimes it happens anyway. This is when difficulties can arise because this errant change has now been elevated to the "top dog" level because it was put in the pup save file. Perhaps the unwanted change will be no problem and will never be noticed, and sometimes it has effects that you wouldn't even imagine could come from your pup save.

Perhaps a "make a minimal pup-save with an auto-backup" approach could be used, and then if anything unusual happens it is an easy recovery.

It seems everything in life is a tradeoff :)

Cheers,
s

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

#38 Post by nooby »

When puppy wants to save, it tries to avoid saving files that were only needed temporarily, but sometimes it happens anyway.

This is when difficulties can arise because this errant change has now been elevated to the "top dog" level because it was put in the pup save file.
Thanks and that does normally happen each 30 minutes unless one go into that program and config it to be 0 oir something but then it take a long time to shut down instead.

But it could make the risk that it have such files that are not needed hopefully I have noticed that I have two of any kind going and can shut it down?

What I really like about your approach is that it is fast.

I have not tested the SFS/TCZ Linker which uses symlinks? Is that one slow too?

The dir2sfs and booting seems to only work well on Puppy431 and Quirky and such that are based on 431? I am not sure. But it did not load as it should on lupu 525. Have not tested 511 maybe that one is less changed from 431
I use Google Search on Puppy Forum
not an ideal solution though

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

#39 Post by seaside »

nooby wrote:
But it could make the risk that it have such files that are not needed hopefully I have noticed that I have two of any kind going and can shut it down?

You will not know what's happening

What I really like about your approach is that it is fast.

I have not tested the SFS/TCZ Linker which uses symlinks? Is that one slow too?

The linker is slower but safer, because there is no union- it just links. And since the linker now tracks all the files that it successfully linked, and then only removes those links, it makes it less likely that anything will go wrong.It also doesn't normally start the program running. Problems can come up with linking (try and make a link to an existing file and it will just fail, because no rules exist)

Cheers,
s
(I use and experiment with puppy 431 and have tried all the others - many are better in some ways and this gets into personal preference. Since you like to experiment, you will always have an unending supply of new puppy material to test and explore) :)

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

NEW! Add-On For SFS-Exec

#40 Post by seaside »

Now use SFS-Exec with a pupsave file.

Here's SFS-Exec-pupsave. It's a pet to go with SFS-Exec that allows a directed and therefore safer use with a pupsave file.

SFS-Exec-pupsave, changes the pupsave interval to never, disables "snapmergepuppy" (the program that saves to the pupsave file) and provides a desktop icon called "Save-pup" which saves and quits when clicked.

The intention is to make a small pupsave file with favorite programs and tweaks, add SFS-Exec and SFE-Exec-pupsave, and then shutdown using the new "Save-pup" desktop icon . When you reboot, the pupsave file is effectively "locked out" where SFS files can be loaded and unloaded at will and a regular shutdown does not save to the pupsave file.

If, in the future, you have additional programs or files you want to save to the pupsave file, you can click the desktop "Save-pup" icon and a regular save to the pupsave file, immediately followed by a shutdown, occurs. This is only applicable to that session and when you next boot, your changes will be there, but the session will be back again to the "pupsave locked out" mode.

This method allows testing pets, sfs files, or whatever, with the knowledge that if anything gets corrupted in the filesystem, everything should be back to normal at next boot. Basically it's an "only save on demand" structure.

Note: With a regular shutdown you will still see a brief "...saving to" message but it's not. :)

SEE: First post for SFS-Exec-pupsave pet
UPDATE: 4/28/2011

Following some good ideas from Jasper and Nooby, both
SFS-exec-pupsaves have been superseded and replaced
by a single pet - "Save-pup-lock". see http://murga-linux.com/puppy/viewtopic. ... 961#517961


Cheers,
s
(It's probably best to use the "Save-pup" option at the beginning of a session where there is less chance of any errant sfs file activity being present)
Last edited by seaside on Thu 28 Apr 2011, 21:14, edited 2 times in total.

Post Reply