Page 1 of 1

How To Make the Simplest SFS?

Posted: Tue Aug 06, 2024 10:32 pm
by JusGellin

I wanted to make the simplest sfs to help me understand how it works.

1. Made folder called /opt/Testsfs
2. Made two subfolders called /opt/Testsfs/Dir1 and /optTestsfs/Dir1
3. Dir1 has file called Afile.txt ; Dir2 has file called Bfile.txt
4. Made sfs file by right clicking Testsfs > selected dir2sfs ; which made Testsfs_10.0.6.sfs
5. Moved Testsfs_10.0.6.sfs to where other sfs are /mnt/sda1/dpupbw6410.0.6frugal.
6. Deleted /opt/Testsfs including its subfolders.
7. Left click on Testsfs_10.0.6.sfs > Install SFS
8. Reboot with save
9. Noticed Testsfs_10.0.6.sfs didn't load so left clicked it again and accepted the install.
10. Rebooted and this time it was loaded.

Shouldn't the Testsfs have made the populated folder at /opt/Testsfs ? - it didn't do anything.
Evidently sfs files have installs only in them.
How could the simplest sfs be made to help me understand better?

Thanks


Re: How To Make the Simplest SFS?

Posted: Tue Aug 06, 2024 11:52 pm
by ozsouth

SFS instructions (use at own risk).

To make a blank .sfs :

In a terminal,
run: mkdir /blank
then run: mksquashfs /blank /blank.sfs

blank.sfs will appear in main / folder.

To edit that sfs (add/remove items):

Will need to unpack, edit & remake sfs in an empty folder.
Simplest way is to use my updatesfse script.

See: viewtopic.php?p=128286#p128286


Re: How To Make the Simplest SFS?

Posted: Tue Aug 06, 2024 11:58 pm
by wizard

@JusGellin

You missed one directory level.
Here's example:
-make directory /home/mytest
-make directory /home/mytest/opt (opt is the dir you missed, you can't use existing one without it getting all the existing content)
-make directory /home/mytest/opt/Testsfs
-make directory /home/mytest/opt/Testsfs/Dir1
-Put your file in Dir1
-right click /home/mytest
-choose dir2sfs

wizard


Re: How To Make the Simplest SFS?

Posted: Wed Aug 07, 2024 10:48 am
by JusGellin

Thanks @wizard
What you showed worked and now got me started to play around with.
I was making it too hard and see this is simpler than I thought.

What I did learn was that when an sfs file is made and installed that the resulting folder goes to the root /
Also there needs to be a boot save before it works.


Re: How To Make the Simplest SFS?

Posted: Wed Aug 07, 2024 4:28 pm
by mikeslr
JusGellin wrote: Wed Aug 07, 2024 10:48 am

Thanks @wizard
What you showed worked and now got me started to play around with.
I was making it too hard and see this is simpler than I thought.

What I did learn was that when an sfs file is made and installed that the resulting folder goes to the root /
Also there needs to be a boot save before it works
.

No. SFSes are mounted, not installed. That is an SFS is linked to the other file-systems at /initrd/mnt --echoed at /mnt for convenience?-- and that link is followed when the user accesses the contents of the SFS. SFS-Load an SFS and you can file-browse to those locations to see the SFS.

The reason you had to create an /opt folder into which you placed contents is an operating system only looks for content in pre-defined locations and the opt folder is frequently used so as not to cause a conflict between an application's folders and files and those with the same names located elsewhere. Instead of /opt, you could have used /root/my-applications or if --like yours-- it contained NO Executables-- /root/my-documents; or if you know there won't be conflicts between executables /usr or /usr/local.

For example, you can locate firefox's folder in /opt or in /usr or in both. But if in both the argument following each Exec= in /usr/share/applications/firefox will have to include the paths to their respective executables [else /usr having priority the conflict between the two is resolved by not offering the firefox in /opt] and the names of desktop each file in /usr/share/applications differ [lest one overwrite the other] and the arguments following Name= also differ so that you can tell which is which on your Menu.

It should not be necessary to reboot for the contents of the SFS to be available. A restart-x may be necessary as that will cause Puppy to re-index the current content of its system. But sometimes not, for reasons I don't know. I use a LibreOffice.sfs with Puppys I boot 'pfix=ram'. It doesn't require even a restart-x.

Likely yours --as it did not create a menu entry which mounting the SFS would show and whose use would initiate the executable-- would require a restart-x to generate a re-indexing of files located in /opt.


Re: How To Make the Simplest SFS?

Posted: Wed Aug 07, 2024 6:56 pm
by JusGellin

Thanks @mikeslr
That's a lot to digest. I'll have to read this over many times to try to get it to sink in.
That's a lot of good information. At least now I feel more comfortable playing with sfs somewhat to see how they behave.
Also it helps me understand better why you and others do things.

Like another topic I have called "How To Get and Use OpenOffice?"
I was wondering for an OpenOffice sfs why you put the OpenOffice install into /opt and the menu pet in just a new folder.
I think I understand that a bit better and can see what the sfs was trying to do.

I hope you can still help me figure out why I can't get the OpenOffice sfs to work.

When I left click on an sfs, one of the buttons is called "Install SFS". Is that really meant to be mount?

I appreciate all your help and knowledge.