HomeAbout | Gallery | Tips | Download  | Release Notes

Architecture: Layered File System
| What is an SFS and How to Install? | Compare PET vs. SFS

(Based on
http://puppylinux.com/development/howpuppyworks.html) by Barry Kauler
Lighthouse Pup Architecture: Layered File System

The way to understand the diagram is to view each of those layers as a complete filesystem, that is, a complete directory hierarchy from "/" down. These layers are laid one on top of the other, which is achieved by the aufs/unionfs filesystem. The way it works is very simple: say that the red (core system) layer has a file /usr/lib/libcairo.so. This file will be visible at the top layer. If a blue (extra SFS) layer has the same file, it will not be visible, as it is overlaid by the same file on a higher layer.

Anyway, here is a description of each layer:

ram disk Temporary Storage
This is the tmpfs filesystem running in RAM, with new and changed files.

It is the top layer at first boot from LiveCD with puppy pfix=ram entered at the boot menu.
This is the persistent storage, where all your data, settings, email, installed packages, etc., get saved permanently. The ".4fs" means that the file contains a ext4 filesystem. If the host partition is not formatted with ext4, or the LHPsave is encrypted, then it would be .3fs or .2fs.

When saving your session to an LHPsave file this becomes the new top layer instead of the ram disk.
This is Lighthouse. The kernel, built-in applications, window manager, scripts, everything. The ".sfs" means the file contains a squashfs compressed filesystem. The "nnn" is the Lighthouse version number without the dots, for example "503".
or *_nnn.sfs
These are additional squashfs files. The "*" can be anything, as long as its name does not begin with a 'z' or distro-specific prefixes, like LHP, pup, wary, luci etc.

For example, Devx-LHP_503.sfs is the complete environment for compiling C/C++ applications. Again, the "_nnn", if present, is the Lighthouse version number.

What needs to be emphasized, however is that all of this is "under the hood". While running Lighthouse, all you see is one file system, which is the top layer. So you see /usr/lib/libcairo.so and you don't care what layer it is actually in.
Back to Top

What is an SFS?

SFS (Squash File System) add-ons are typically compressed software files, (a 'filesystem in a file') that are layered into the LHP file system during boot up from LiveCD / pfix=ram, or a Frugal Install and initially take up no space in the save file. Each SFS is a separate read-only layer, (blue in the diagram above.) They often include many apps, all in one 'combo-pack'. Lighthouse supports up to 40 concurrent SFS add-ons. Several popular ones are included in the Lighthouse Mariner ISO. Those and many more can be found here.

How to install an SFS

With a Frugal Install, place them in /mnt/home e.g., /mnt/home/LibreOffice.sfs This is the top level directory of the partition where your save file is. (/mnt/home is actually a symlink to the root of that partition.) As of LHP 5.00 G, if the save file is in a subdirectory, SFS files can be placed in either the top directory or in that subdirectory, e.g., /mnt/home/lhp503/LibreOffice.sfs

Then, using
BootManager in the System menu, move desired SFS's to the right-hand pane, click OK and reboot.

If the SFS file name ends with _nnn it must match the LHP version you have, e.g.,
Devx-LHP_503.sfs for LHP 5.03.

What is unique about the way Lighthouse uses an SFS?

Which is better, PET packages or SFS files?

Personal preference is often the deciding factor. That said, SFS files are ideal for large apps e.g., LibreOffice or combo-packs of many apps, e.g., Mariner or KDE, because they reside compressed, typically at /mnt/home and use little or no space in the LHPsave file. PETS on the other hand, are easily installed without rebooting and thus are ideal for smaller packages or frequent updates, e.g., Sylpheed, printer drivers, Flash and browsers. PETS are a bit easier to build and often use pinstall.sh and puninstall.sh scripts ideal for handling setup and uninstall tasks.

SFS files are designed to load individually, each in a separate read-only layer, whereas PETS are all in the same read-write (yellow LHPsave file) layer. There is a limit to the number of SFS files that can be loaded at the same time, (40 in Lighthouse) whereas the number of PETS is practically unlimited.

I'm currently running Lighthouse64 with about 15 SFS files (not counting the main file and zWine) as well as a dozen or so PETS.

Because SFS files are layered in below the core (main file) layer, they are less apt to cause version conflicts with system files and shared libraries. So if the same files are in both an SFS/PET and the core system, system stability and reliability is usually not affected by the SFS, but could be with a PET.

See also

and http://puppylinux.com/faq.htm
Back to Top