How to edit/extract/repack puppy_fossapup64_9.5.sfs ? [SOLVED]

Moderators: 666philb, Forum moderators

Post Reply
User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

How to edit/extract/repack puppy_fossapup64_9.5.sfs ? [SOLVED]

Post by Jasper »

Hi all

I want to extract this file and update the contents.

When I click on the SFS loading utility it informed me that I would need to use the unsquash/makesquash commands.

These do not appear to available to me.

Last edited by Jasper on Fri Dec 09, 2022 6:07 pm, edited 1 time in total.
User avatar
wiak
Posts: 4077
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 65 times
Been thanked: 1206 times
Contact:

Re: How to edit/extract/repack puppy_fossapup64_9.5.sfs ?

Post by wiak »

Jasper wrote: Wed Dec 07, 2022 11:12 am

Hi all

I want to extract this file and update the contents.

When I click on the SFS loading utility it informed me that I would need to use the unsquash/makesquash commands.

These do not appear to available to me.

Should be unsquashfs and mksquashfs

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

Re: How to edit/extract/repack puppy_fossapup64_9.5.sfs ?

Post by Jasper »

Thanks for your reply @wiak

Tried these commands with/without DevX loaded.

Unrecognised commands.

User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

Re: How to edit/extract/repack puppy_fossapup64_9.5.sfs ?

Post by Jasper »

I want to be able to copy over these new files that I compiled into the BIN directory but it fails to do so.

Burunduk
Posts: 250
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 126 times

Re: How to edit/extract/repack puppy_fossapup64_9.5.sfs ?

Post by Burunduk »

/usr/sbin/filemnt wrote:

Note1: If you want to edit the contents of an SFS file, you have to use the commandline utilities unsquashfs and mksquashfs.

wiak wrote: Wed Dec 07, 2022 12:04 pm

Should be unsquashfs and mksquashfs

You might want to write the commands exactly the same way too.

Code: Select all

unsquashfs original.sfs
# squashfs-root directory with the sfs content has been created in the current directory
mksquashfs squashfs-root/ modified.sfs
User avatar
mikeslr
Posts: 2955
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 910 times

Re: How to edit/extract/repack puppy_fossapup64_9.5.sfs ?

Post by mikeslr »

"How to edit/extract/repack puppy_fossapup64_9.5.sfs ? I want to extract this file and update the contents."

Usually those are two different procedures. To extract the contents of an sfs (squashed/compressed file system) there are bash command I don't know. What I do is LEFT-Click the SFS, select View Contents, which actually mounts the file-system so that it can be copied into another folder I've created and named, for example, puppy_fossa64. Left-Clicking the SFS unmounts it; but I now have all its files in the folder which can be edited and eventually repacked by Right-clicking the folder and selecting dir2sfs.

Keep in mind that the applications/files you are interested in are in two places: on storage from which they were copied into RAM or mounted and in RAM. The base/core sfs (e.g. fossapup64_9.5.sfs) has been copied into RAM. Unless you duplicate it and work on the duplicate, you are only working on the files in RAM. That work will either evaporate on reboot/shutdown; or be copied into a SaveFile/Folder when a Save is executed.

The problem is that deletions have to be done manually, referring to the catalog listing each application's files in either/or both /root/.packages or /var/packages. Such manual operation does not provide a safety check when one or more of the files used by an application I don't want is also used by an application I do want. Similarly, new applications have to be extracted and their contents manually copied into their proper locations before running the dir2sfs routine.

I haven't used it but in the nicOS-utility-Suite, https://www.forum.puppylinux.com/viewto ... 983#p12983 are 'Right-Click Tool's', among which IIRC is one for editing SFSes. That may ease the manual process. I assume, however, that you would use it on a duplicate of rather than the core.sfs then in use by the Puppy you're running.

What you really seem to be trying to accomplish is referred to as a Remaster. There are several tools to do that. Obviously PPM Uninstall will uninstall applications you've installed into the SaveFile/Folder. Menu>Setup>Remove Builtins --while it doesn't actually remove anything-- writes a 'white-out' file in the SaveFile/Folder adjacent to files which are no longer to be used. When you run a remaster application --the one's in the nicOS-Suite are recommended, the one 'built-in' is NOT-- the white-outs are honored and the whited-out files are not included in the Remaster. Remove-builtins will warn you when removal may break something. [My guess is that Remove-builtins reads the aforementioned 'packages' files, but not only those of relating to the application to be removed but all so as to know when a file is used by more than one application].

If you're intention is to upgrade rather than just remove, the better way is to just install the new version (update/upgrade) of an application, SAVE it, than do a remaster. Remastering gives priority to the files/applications in a SaveFiie/Folder over those 'builtin': the new version rather than the old will be in the remaster.

[Remove builtins before updating is a waste of effort and might leave a white-out breaking the application in the remaster].

Another application you may find useful is gnewpet. https://www.forum.puppylinux.com/viewto ... 211#p73211. If you have any doubts whether or not to remove a builtin, or if removal will break something, run gnewpet before removal. gnewpet will capture all the files of an application as a pet you can store and re-install or decompress and access files you discover are actually needed by other applications.

Many of use like to run without using a SaveFile/Folder. But creating one during the remaster process is just part of the process. When its finished the SaveFile/Folder is no longer used so is deleted.

Last edited by mikeslr on Wed Dec 07, 2022 4:03 pm, edited 1 time in total.
backi
Posts: 600
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 76 times
Been thanked: 70 times

Re: How to edit/extract/repack puppy_fossapup64_9.5.sfs ?

Post by backi »

Hi @Jasper !

Here some "edit sfs" Gui (script) from Bionic-Dog64.

Not quite sure if it will work on Fossa-Pup.
Download it ,remove fake gz and make it executable.
Start by clicking on it.
You could give it a Try.
Probably works similar as nicOS-utility-Suite......

edit-sfs.gz
(12.3 KiB) Downloaded 77 times
Feek
Posts: 398
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 54 times
Been thanked: 90 times

Re: How to edit/extract/repack puppy_fossapup64_9.5.sfs ?

Post by Feek »

Jasper wrote: Wed Dec 07, 2022 1:45 pm

Tried these commands with/without DevX loaded.
Unrecognised commands.

I am not currently in Fossapup64. By the way, it's not unsquashsfs but unsquashfs (similarly mksquashfs).
unsquashfs --h works for me in Vanilladpup64.

I think UExtract and PackIt programs can also be used to extract and repack the .sfs files. If I'm not mistaken, they are built into Fossapup64.

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

Re: How to edit/extract/repack puppy_fossapup64_9.5.sfs ?

Post by rockedge »

Clicking on an SFS in a Rox file manager window will activate the script filemnt which will prompt to view or load the SFS. Select "view" and the resulting Rox window will contain the unsquashed file. Copy the contents to a new directory and the SFS is read and writable. Squash then this new directory again to an SFS.

User avatar
Jasper
Posts: 2067
Joined: Wed Sep 07, 2022 1:20 pm
Has thanked: 854 times
Been thanked: 480 times

Re: How to edit/extract/repack puppy_fossapup64_9.5.sfs ?

Post by Jasper »

Thank you all for the advice and scripts. Yes, I did make a typo as both commands are available from the desktop :oops:

I had start the Christmas shopping hence the delay in getting back to everyone :oops:

What I wanted to achieve was to incorporate some basic upgrades which are located in the puppyfossapup64_9.5.sfs

These applications are part of the base. I did not add anything that was not already included.

coreutils-9.1
freetype-2.1
xz -5.28
conky-1.15.0
curl-7_86
ncurses-6.3
bash-5.29
unrar-6.12
kmod-30
aria2c-1.36
htop-3.2.1
zstd-1.5.2
gnutls-3.6.16
wget-1.213
openssl-1.1n (from the QuickPet Fossa)
flac-1.4.2
binutils-2.39

I wanted to update FFMpeg but I found out even though it is included in this SFS. The applications SFS overwrites the update and reverts back to the original build version (4.2.2).

The resulting file is larger by 50mb.

I have tried this on a clean install of the original ISO and the updates are working.

If you want to try I have uploaded it here (EXPERIMENTAL):

**EDIT**
Back to the drawing board, looks like I need to work with the Applications SFS file to make the necessary changes!! :roll:

If I have the time/patience I would like to accomplish the same for the core applications.

Time to get the spreadsheet out!! :D

**edit**

There seems to be an issue opening *.txt and *.sh files if clicked on directly. The text file can be viewed if you choose open with Geany. The script file does not open.

Any suggestions/advice?

Post Reply

Return to “Fossapup64”