Steps to Re-Create an SFS File With GUI Apps

Moderator: Forum moderators

Post Reply
User avatar
nathan-sr
Posts: 33
Joined: Thu Apr 07, 2022 10:12 am
Has thanked: 26 times
Been thanked: 17 times

Steps to Re-Create an SFS File With GUI Apps

Post by nathan-sr »

Start the Puppy Linux System First, through an USB / DVD to get the Fullest Possible Machine Resources. It is better to avoid Virtual Systems for recreating the SFS File.

1. Copy the .sfs file to an Ext Filesystem with Plenty of Free Space and then Right Click on the .sfs file and choose UExtract
2. This will extract the .sfs file to a folder with extension .extracted Ignore errors and close the UExtract window
3. Add / Modify / Delete Files from the .extracted folder
4. Download the attached dir2sfs.zip file and extract it to a folder
5. Take a Backup of the /sbin/dir2sfs file and then Edit / Copy the downloaded dir2sfs file to /sbin/ and ensure that it has Execute Permission, by right clicking file and choose Properties
6. Right Click the .extracted folder and choose dir2sfs. This will generate a new .sfs file

That's it.

P.S. The dir2sfs file given by me has modified settings like gzip compression (~ 70 MB more), processor count : 1 and memory : 50 % of my laptop's memory. The default values for these settings, in the original script are : xz compression, processor count : use all, memory : 25 % . The modified settings produce less load on the system and prevents crashing on some systems. Steps 4 and 5 can be skipped, if your system tolerates the load given by SFS Creation and does not produce heating or crashing of it. This requires some testing effort.

Attachments
dir2sfs.zip
(850 Bytes) Downloaded 213 times
Last edited by nathan-sr on Tue Apr 12, 2022 12:41 am, edited 5 times in total.
User avatar
amethyst
Posts: 2412
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 502 times

Re: Steps to Re-Create an SFS File With GUI Apps

Post by amethyst »

I normally just use Packit. Extract with Uextract > open the created extracted folder > do your editing > select everything inside, right-click and run Packit to make the new sfs. The newer version of Packit has many compression level options. You can also use the nicOS-SFS-Editor(Right-Click) tool which is included in my nicOS-Utility-Suite here: viewtopic.php?t=1694

User avatar
PipzDex
Posts: 188
Joined: Sun Jul 12, 2020 11:16 pm
Location: Mexico
Has thanked: 61 times
Been thanked: 81 times

Re: Steps to Re-Create an SFS File With GUI Apps

Post by PipzDex »

hello nathan-sr
I share my pet as another option
PUC-2 8
comes with several programs to compress and decompress
Also make pet or sfs programs,
you can also use the right mouse click to use it
Cheers!! :thumbup2:

Pentium (R) 2.20GHz I RAM: 8.0 GB I F96-CE_5 I Kernel 6.6.8-64oz-ao I Glibc: 2.31 I 1600x900 Px

My Puppy Stuff and more

user1111

Re: Steps to Re-Create an SFS File With GUI Apps

Post by user1111 »

With a TUI (terminal)

Code: Select all

unsquashfs filename.sfs

.. which creates a squashfs-root folder of the content

To make a sfs of that

Code: Select all

mksquashfs squashfs-root some.sfs

Personally I like lz4 compressed sfs's, moderate compression relatively quickly, so

Code: Select all

mksquashfs squashfs-root some.sfs -comp lz4

lz4 can decompress quicker than it is to read data from mechanical disks, so can be quicker to store files/folders in a sfs using lz4 compression, read that in and decompress it, than it would be to read the non compressed files as-is.

There is a additional -Xhc switch that can be used, which uses lz4 high compression, slower to compress, but no difference in decompression speed so overall less disk-I/0 + same decompression speed = faster overall. I always convert my sfs's to -comp lz4 -Xhc.

I also tend to use it for backups. On /mnt/sda3 for instance I'll create a sfs of my /mnt/sda2

Code: Select all

mksquashfs /mnt/sda2 10Apr2022.sfs -comp lz4

I don't use the -Xhc higher compression option as I prefer the backup to run quicker.

User avatar
rockedge
Site Admin
Posts: 6525
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2738 times
Been thanked: 2616 times
Contact:

Re: Steps to Re-Create an SFS File With GUI Apps

Post by rockedge »

here is an example of a squash command that I use to create a KLV root file system ->

Code: Select all

mksquashfs upper_changes 07KLV-airedale_rootfs.sfs -b 1048576 -comp xz -Xdict-size 100% -noappend

@PipzDex I use PUC-2 8 as well. Very handy to have. I also use PackIt for it's versatility

User avatar
mikewalsh
Moderator
Posts: 6148
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 788 times
Been thanked: 1975 times

Re: Steps to Re-Create an SFS File With GUI Apps

Post by mikewalsh »

Me, I just stick with

Code: Select all

mksquashfs ./source ./package.sfs

.....run in the same directory. Worked for me for years, although since developing the 'portables', I don't tend to use it very much these days.

I'll echo what others have said about Packit. SFR's utilities (including UExtract) get plenty of use.

Mike. :thumbup:

ozsouth
Posts: 1559
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 241 times
Been thanked: 691 times

Re: Steps to Re-Create an SFS File

Post by ozsouth »

Post Reply

Return to “Compile”