Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 19 Nov 2018, 18:09
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Short tutorial on sfs creation
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
musher0

Joined: 04 Jan 2009
Posts: 12991
Location: Gatineau (Qc), Canada

PostPosted: Fri 09 Dec 2016, 14:19    Post subject:  Short tutorial on sfs creation  

(Post moved from http://murga-linux.com/puppy/viewtopic.php?p=935195#935195)
~~~~~~~~~

Hi kerl.

The best (long) explanation on sfs is probably here.

The only difference is that in Puppy we use the .sfs suffix for squashfs
files instead of the "squashfs" one.

Basically, the principle is this:
you create a linux directory hierarchy of the app you want to "sfs" on a
linux compatible file system, say ext2 or ext3, then you put the files in
their proper directory. When finished, you "squash" the whole dir.

Application of the above principle to Puppy:
-- compile your app as usual, with ./configure and make;

-- install it with the command
Code:
make DESTDIR=/mnt/home/someapp install
instead of simply
Code:
make install

This operation creates a mirror of the file hierarchy the app needs to run
properly under /mnt/home/someapp instead of meshing it with your
running Puppy right away.

Enter the /mnt/home/someapp directory. Do the usual strippping of the
execs and libs at /usr/bin and /usr/lib, plus sanity checks of the
hierarchy. Check if the docs and mans are at the right place for a Puppy,
same for whatever icons and desktop files, etc.

Once you're satisfied that everything is ok, "cd" back up to /mnt/home.
Open a terminal and issue this command:
Code:
mksquashfs someapp -comp xz -allroot -noappend
It takes a minute or two, depending on the size of the app and on the
speed of your box.
Quote:
Explanation of parms:
-comp xz compresses the sfs with xz algorythm
-allroot labels all files in the dir. tree as belonging to "root"
- noappend means "overwrite previous sfs of same name" if there is one;
use with caution.
(Please see bottom notes.)

Then move your newly created sfs in the same directory as your main
Puppy sfs and...

Call up the < sfs_load > utility. Follow the instructions to integrate
your new sfs to your Puppy. The idea is to push the sfs from the left
column to the right column; the sfs's in the right column are the
active ones.

That's it!

IHTH.

~~~~~~~~~
Note 1 -- Puppy has a dir2sfs script which works fine for this operation,
but I personally prefer the longer mksquashfs command I mention
because it gives me finer-grain control.

Note 2 -- If you wish to learn more about mksquashfs, type
Code:
mksquashfs --help

Note 3 -- For the record, the reverse command is
< unsquashfs someapp.sfs >.
This recreates the originating directory if you've deleted it.

Note 4 -- An sfs file is normally portable to other Puppies of same glibc
(aka "C library version"). BUT... check if the other Puppies have the
same libs as the Puppy you created the sfs file on. If your app needs
some special libraries, this check is a must.
~~~~~~~~~

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
kerl

Joined: 16 Apr 2013
Posts: 152

PostPosted: Fri 09 Dec 2016, 16:18    Post subject:  

For now I just say hello, i'll watch this topic Wink

btw I've noticed a possible bug related with .sfs
I had slimjet browser installed via sfs and some way it stopped working so i went to ppm to uninstall it, as there was no menu there, i just opened gdmap and removed its big boulder cache files. Afterwards i noticed the sfs was on the boot manager menu but it was deactivated! So i know i'm a tender pup's M$ mind in an old fat dog's body. Nooby me!! Anyways isn't this a bug? I've been using Slimjet and after a few weeks some way it got deactivated on the boot manager
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12991
Location: Gatineau (Qc), Canada

PostPosted: Fri 09 Dec 2016, 20:19    Post subject:  

kerl wrote:
For now I just say hello, i'll watch this topic Wink

btw I've noticed a possible bug related with .sfs
I had slimjet browser installed via sfs and some way it stopped working
so i went to ppm to uninstall it, as there was no menu there, i just
opened gdmap and removed its big boulder cache files. Afterwards i
noticed the sfs was on the boot manager menu but it was deactivated!
(...)
Anyways isn't this a bug? I've been using Slimjet and after a few weeks
some way it got deactivated on the boot manager

Hi kerl.

sfs's never show up in the ppm. You load and unload them through
the sfs_load.
No it's not a bug, sfs's are designed that way.
Technically, sfs's are not "installed". An sfs is just a layer that is spread
over the linux system. (Best metaphor I can find ATM and like any
metaphor, it's an incomplete explanation.)

(Phew, you only removed the cache files, which are lodged in the
regular pupsave.)

If an sfs gets de-activated for some reason, call up sfs_load and finish
the de-activation. Then reboot. Then re-run sfs_load to reload your
headstrong Smile sfs. The re-re-boot. Check if that helped.

Also, like any file, sfs's get corrupted in time. It's rarer on a linux file
system, but it still happens. Whatever the OS, disks are still disks. The
magnetic 0's and 1's on a disk sometimes get jumbled for a particular
file. If all else fails, erase the current copy and download a fresh copy
of your sfs.

Maybe run an "fsck" on your disks and on your pupsave file once a
month, too. It keeps them and the files on them properly aligned, i.e.
healthy.

That's all I can think of for now. Good night!

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
kerl

Joined: 16 Apr 2013
Posts: 152

PostPosted: Fri 09 Dec 2016, 21:08    Post subject:  

Thanks musher0 for the tips.
I cannot re-re-re-boot/load that .sfs because the terminator in me deleted'em all!
Maybe .pet is a tad more reliable?
Good night to you too
Back to top
View user's profile Send private message 
kerl

Joined: 16 Apr 2013
Posts: 152

PostPosted: Sat 10 Dec 2016, 04:12    Post subject:  

Please let's keep examining more practical tips Razz

How would you make an sfs out of a customized software that has not been compiled by you? for example, personal settings on rox-filer, seamonkey along with addons, configured email program..
-You could make one sfs containing multiple programs, and sttings, right? for example all wine based programs in one sfs.
-What about Puppy configurations? like fonts, menus, themes..
-In the end you'd have the iso from the puppy base, a number of sfs, a number of pets.. How would you prepare a setup script to build a custom iso ready to be installed?
-The author of LazyPup seems to have designed a system without pets or sfs to configure puppy distributions
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 2007
Location: Germany

PostPosted: Sun 11 Dec 2016, 10:34    Post subject:  

Quote:
The author of LazyPup seems to have designed a system without pets or sfs to configure puppy distributions

Yes, I'm configuring my T.O.P.L.E.S.S. LazY Puppy Systems by configuration files stored inside the boot directory / installation directory.

These configuration files containing lots of parameters to configure such T.O.P.L.E.S.S. LazY Puppy at boot up.

Though, to make configuring possible at boot up, T.O.P.L.E.S.S. is using some specialized .sfs modules that is including some of the necessary functions.

Those specialized .sfs modules (I call them the T.O.P.L.E.S.S. system sfs modules) are loaded to a top-layer (on top of the main sfs).

The only changes/additions (to read out the parameters stored in those configuration files) made on the original puppy's files are done inside its initrd.gz archive.

However, the new woof-ce puppy builder (xenial and then above) has got that many changes inside the init script (the one in initrd.gz), so they made me kicked-off from further developments.

_________________
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) Laughing

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! Wink
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0512s ][ Queries: 12 (0.0071s) ][ GZIP on ]