Edit-SFS 1.1 (squash filesystem editor) - OBSOLETE
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
Edit-SFS 1.1 (squash filesystem editor) - OBSOLETE
This version is obsolete. Please use version 2.0 instead.
edit_sfs-1.1.pet
Edit-SFS.pup (old version)
This is a simple roxapp (click-able folder that runs a script, very handy things) that allows you to edit an xxxx.sfs file like pup_xxx.sfs, or devx_xxx.sfs. It takes care of mounting, making a new filesystem, replacing the files, re-compressing, etc. All you need to do is supply the file, edit it, then receive the new file.
It will install to /root/my-roxapps/Edit-SFS. Just click it and it will run. If you feel like modifying it, right-click, choose "look inside", and edit the AppRun file.
When you run it, it will pop open a rox-filer window. Place a .sfs file in it. It must have the .sfs extension. Hit "ready" when it's set. Then it will close the window, think for a little, and present you with a new window featuring the file's contents in an editable form. When you are done editing, click "finished" and it will close the window, think, and present you with a freshly compressed .sfs file. Place that somewhere for safe-keeping before hitting "ready". When ready, clicking the ready button will delete the working directory in the process of cleaning up after itself. Then you're done.
Note: Puppy's strange usage of filesystems makes one of the only reliable ways to do this to create a tmpfs area to work in. It will need one as big as the sfs file, plus a small buffer-space. It takes care of it itself, but you do need sufficient ram for the tmpfs filesystem. A 60MB file like devx_211.sfs will need 61MB or so of ram.
edit_sfs-1.1.pet
Edit-SFS.pup (old version)
This is a simple roxapp (click-able folder that runs a script, very handy things) that allows you to edit an xxxx.sfs file like pup_xxx.sfs, or devx_xxx.sfs. It takes care of mounting, making a new filesystem, replacing the files, re-compressing, etc. All you need to do is supply the file, edit it, then receive the new file.
It will install to /root/my-roxapps/Edit-SFS. Just click it and it will run. If you feel like modifying it, right-click, choose "look inside", and edit the AppRun file.
When you run it, it will pop open a rox-filer window. Place a .sfs file in it. It must have the .sfs extension. Hit "ready" when it's set. Then it will close the window, think for a little, and present you with a new window featuring the file's contents in an editable form. When you are done editing, click "finished" and it will close the window, think, and present you with a freshly compressed .sfs file. Place that somewhere for safe-keeping before hitting "ready". When ready, clicking the ready button will delete the working directory in the process of cleaning up after itself. Then you're done.
Note: Puppy's strange usage of filesystems makes one of the only reliable ways to do this to create a tmpfs area to work in. It will need one as big as the sfs file, plus a small buffer-space. It takes care of it itself, but you do need sufficient ram for the tmpfs filesystem. A 60MB file like devx_211.sfs will need 61MB or so of ram.
Last edited by Pizzasgood on Tue 06 Oct 2009, 00:52, edited 5 times in total.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
What! Now you people want an Edit-3fs????
If you renamed a .3fs file to .sfs and ran it through, it would sort-of work, but it would convert it to an actual .sfs when it finished. Besides, all you have to do to edit a .3fs is mount it. It's already writable. The only trickyness is that it may not be big enough. As far as I'm aware, there are already tools to enlarge them.
mount whatever.3fs /mnt/data/ -o loop
That will mount whatever.3fs to /mnt/data/. Keep in mind that whatever.3fs needs to be outside Puppy's filesystem or you'll probably get errors.
If you renamed a .3fs file to .sfs and ran it through, it would sort-of work, but it would convert it to an actual .sfs when it finished. Besides, all you have to do to edit a .3fs is mount it. It's already writable. The only trickyness is that it may not be big enough. As far as I'm aware, there are already tools to enlarge them.
mount whatever.3fs /mnt/data/ -o loop
That will mount whatever.3fs to /mnt/data/. Keep in mind that whatever.3fs needs to be outside Puppy's filesystem or you'll probably get errors.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
trapster; Try the utility I wrote for mounting uncompressed image files, ext2 & ext3, & ISO.
It also does Squash (.fs, .sfs), image.gz & initrd.gz files.
It seems to be fully functional, let me know of any problems...
It also does Squash (.fs, .sfs), image.gz & initrd.gz files.
It seems to be fully functional, let me know of any problems...
- Attachments
-
- xfilemount.gz
- Follow the Wizard's instructions...
- (1.37 KiB) Downloaded 1634 times
Edit-SFS
Pizzasgood wrote:
Thank you
I 'd done with Pizzasgood instruction. Program Edit-SFS ran but I don 't saw "new window featuring the file's contents in an editable form". I' d made what mistakes ?When you run it, it will pop open a rox-filer window. Place a .sfs file in it. It must have the .sfs extension. Hit "ready" when it's set. Then it will close the window, think for a little, and present you with a new window featuring the file's contents in an editable form. When you are done editing, click "finished" and it will close the window, think, and present you with a freshly compressed .sfs file. Place that somewhere for safe-keeping before hitting "ready". When ready, clicking the ready button will delete the working directory in the process of cleaning up after itself. Then you're done.
Thank you
xfilemount
xfilemount is a good program (for me) to mount the systemfile. But I could' t edit something in the system file mounted. (I only could copy files from mounted file, but I could 'd move or remove ... ). That' s wrong?
vanchutr; the utility: xfilemount ONLY mounts files, it doesn't make NEW ones.
ISO, image.gz, & initrd.gz files can be edited, Squash files CAN'T be edited.
Squash files can ONLY be made with the utility: "mksquashfs".
Pizzasgood; How about adding a "right click menu item" to mount & unmount files?
My utility auto picks the correct file type to mount, except for plain
uncompressed image files where it pops up a menu to choose from.
Perhaps my script could be changed to work with the right click context menu in ROX.
It'd be great to mount & unmount all the common file types with a click.
ISO, image.gz, & initrd.gz files can be edited, Squash files CAN'T be edited.
Squash files can ONLY be made with the utility: "mksquashfs".
Pizzasgood; How about adding a "right click menu item" to mount & unmount files?
My utility auto picks the correct file type to mount, except for plain
uncompressed image files where it pops up a menu to choose from.
Perhaps my script could be changed to work with the right click context menu in ROX.
It'd be great to mount & unmount all the common file types with a click.
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
Sounds good, but I don't see where that involves Edit-SFS. You'd probably have to put it in the send-to/open-with area unless you patch the Rox source.
@vanchutr: Which versions of Puppy and the .sfs file were you using? There is a compatibility problem between Puppy 2.10 and all others. 2.10 used a different compression algorithm. You'll have trouble if you run the script in 2.10 on, say, pup_211.sfs, or from within 2.11 on pup_210.sfs.
I don't remember how to access those files from the wrong version, but there was something written about it, I think by MU or GuestToo. You'd probably have to do it by hand, but it's not especially hard. You just mount the file (with the right commands), copy the contents to someplace that's writable, edit, then use the mksquashfs, maybe with some changed parameters.
@vanchutr: Which versions of Puppy and the .sfs file were you using? There is a compatibility problem between Puppy 2.10 and all others. 2.10 used a different compression algorithm. You'll have trouble if you run the script in 2.10 on, say, pup_211.sfs, or from within 2.11 on pup_210.sfs.
I don't remember how to access those files from the wrong version, but there was something written about it, I think by MU or GuestToo. You'd probably have to do it by hand, but it's not especially hard. You just mount the file (with the right commands), copy the contents to someplace that's writable, edit, then use the mksquashfs, maybe with some changed parameters.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
-
- Posts: 286
- Joined: Tue 16 Aug 2005, 03:47
- Location: Appalachian Mountains
Thanks
Thanks! A+ job on this one works great for me.
Thanks, pg - great little tool!
Just had a use for it to replace xorgwizard in pup_212.sfs with my modified one. Worked veerry smoothly. Will put it in with my 'must have' Puppy tools
Oh, almost forgot - it might be helpful if EditSFS puts up a 'Processing, please wait...' window during unpacking & packing as these take some time to do. Good to let the user know what's going on
Thanks again,
Paul
Just had a use for it to replace xorgwizard in pup_212.sfs with my modified one. Worked veerry smoothly. Will put it in with my 'must have' Puppy tools
Oh, almost forgot - it might be helpful if EditSFS puts up a 'Processing, please wait...' window during unpacking & packing as these take some time to do. Good to let the user know what's going on
Thanks again,
Paul
Methinks Raspberry Pi were ideal for runnin' Puppy Linux
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
Yes, good idea. I stuck it on my to-do list. When I get done upgrading PupBeGone I'll move on to this.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
Edit-SFS-LHP.pet updated interface/error checks
Edit .sfs squash files in LighthousePup 215 and (hopefully) in official Puppy 2.xx also, but I haven't been able to check all versions. Additional testing/review before general release (if desirable) might be worthwhile. Please post here if you find bugs or can improve on it.
Edit-SFS-LHP 2007-09-20 TazOC - Based on Edit-SFS by Pizzasgood
Added some validity checks, user feedback and logging for the error conditions I've come across so far. Log window now opens with app and displays output during processing, start to finish. Not as much as I'd like, but better than before. Custom error codes 64-68 logged and included with exit command at completion of shell script.
Does not allow editing more than one SFS at a time. Now uses mksquashfs-gzip, if present for improved version compatibility. Currently testing in both LIghthouse and Puppy 2.17.1.
.desktop file for XDG Menu | System | System Memory | Edit-SFS-LHP
/usr/local/bin/CopyToToEdit-SFS is symlinked to Rox-Filer's OpenWith/SendTo Folder for mime-types corresponding to .sfs. It makes sure that Edit-SFS isn't already running, copies the .sfs file, and passes control to Edit-SFS-LHP, which opens with the Filer window already displaying the new copy of the .sfs file.
In frugal install PUPMODE=12, if /mnt/home is ext2, ext3, reiserfs or reiser4, a SymLink from /tmp/tmp-starting-dir to
initrd/mnt/dev_save/tmp is used so that larger SFS files can be accommodated, or so that one can edit a larger file than can be extracted and rebuilt within a pup_save file. As the code is currently in this version, to use RAM for editing the .sfs file--instead of the /mnt/home drive, either use Edit-SFS-LHP (without CopyToEdit-SFS,) or boot into LiveCD mode.
-TazOC
Edit-SFS-LHP 2007-09-20 TazOC - Based on Edit-SFS by Pizzasgood
Added some validity checks, user feedback and logging for the error conditions I've come across so far. Log window now opens with app and displays output during processing, start to finish. Not as much as I'd like, but better than before. Custom error codes 64-68 logged and included with exit command at completion of shell script.
Does not allow editing more than one SFS at a time. Now uses mksquashfs-gzip, if present for improved version compatibility. Currently testing in both LIghthouse and Puppy 2.17.1.
.desktop file for XDG Menu | System | System Memory | Edit-SFS-LHP
/usr/local/bin/CopyToToEdit-SFS is symlinked to Rox-Filer's OpenWith/SendTo Folder for mime-types corresponding to .sfs. It makes sure that Edit-SFS isn't already running, copies the .sfs file, and passes control to Edit-SFS-LHP, which opens with the Filer window already displaying the new copy of the .sfs file.
In frugal install PUPMODE=12, if /mnt/home is ext2, ext3, reiserfs or reiser4, a SymLink from /tmp/tmp-starting-dir to
initrd/mnt/dev_save/tmp is used so that larger SFS files can be accommodated, or so that one can edit a larger file than can be extracted and rebuilt within a pup_save file. As the code is currently in this version, to use RAM for editing the .sfs file--instead of the /mnt/home drive, either use Edit-SFS-LHP (without CopyToEdit-SFS,) or boot into LiveCD mode.
-TazOC
- Attachments
-
- Edit-SFS-LHP.pet
- *** Beta/for testing only ***
2007-09-20 TazOC
Includes both Edit-SFS-LHP and CopyToEdit-SFS - (32.19 KiB) Downloaded 1369 times
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
Code: Select all
It appears the .sfs mount or extraction was unsuccessful. Somtimes this is because there is insufficient
free space; about 3-4 times the size of the .sfs file is recommended. Sometimes the first mount
operation will fail and trying again will succeed. Otherwise the .sfs format may not be compatible
with this program. Try another .sfs file or post your log output at
www.murga-linux.com/puppy/viewtopic.php?t=12112
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
The compatibility issue is because most versions of Puppy use gzip compression with the .sfs files, but some use LZW compression (I think I got the acronym right...). I'm not sure if there's a way to specify which way Puppy should use when mounting the file. That's something I probably should have investigated back when I wrote this script. I guess I figured since most people would be editing the .sfs file for the version they're using it wouldn't be a big issue.
One way around it is to just boot up in the same Puppy you're getting the first .sfs from and use that to open it up. Pull out the contents and save them on a linux partition. Then reboot into the version you got the other .sfs from and then use Edit-SFS to edit the second file.
One way around it is to just boot up in the same Puppy you're getting the first .sfs from and use that to open it up. Pull out the contents and save them on a linux partition. Then reboot into the version you got the other .sfs from and then use Edit-SFS to edit the second file.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
Edit-SFS
What happens when you boot up in Puppy 4.10, install Edit-SFS (links in this thread) and then use it to edit the the Puppy4xx sfs? So far its working for me. Please post any errors you receive, and when they occur.djringjr wrote:I am posting here because edit-SFS does NOT seem to work with Puppy4xx.sfs files.
Pizzasgood, thank you for Edit-SFS and for clarifying the compatibility issue and suggested workaround. Your insight has helped me many times over. The Puppy community is fortunate to have your expertise and creativity.
Take care,
TazOC
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
@djringjr: I'm very sorry. I read your post, and made a mental note to check on it when I had some free time. But then I completely forgot. The main catch is that this generally works best if it's run in the same version of Puppy as the file you're trying to modify, so that it uses the same algorithms that were used to create that file in the first place. This can also differ between different derivatives of the same version, if the creator changed the compression (usually they don't, though).
I've just tested this in Puppy 4.1 with both a pup_410.sfs file and a pup_400.sfs file, and it seems to have worked on both of them. I didn't try booting with them though.
Be aware, it can take five or ten minutes to finish compressing the file if your computer isn't very fast. If you used a very large file (600 mb) on an old computer, it can take a very long time.
If it doesn't work from the same version as the file you're editing, try running it from the commandline by right-clicking the icon and choosing "look inside", and then opening a terminal there and running the AppRun file. Then you can post the error messages to give me an idea of where it's breaking.
@tazoc: thanks
I've just tested this in Puppy 4.1 with both a pup_410.sfs file and a pup_400.sfs file, and it seems to have worked on both of them. I didn't try booting with them though.
Be aware, it can take five or ten minutes to finish compressing the file if your computer isn't very fast. If you used a very large file (600 mb) on an old computer, it can take a very long time.
If it doesn't work from the same version as the file you're editing, try running it from the commandline by right-clicking the icon and choosing "look inside", and then opening a terminal there and running the AppRun file. Then you can post the error messages to give me an idea of where it's breaking.
@tazoc: thanks
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
Hi Pizzasgood,
just been testing your Edit-SFS script, a handy script ...
- these lines work with puppy 4.xx and probally before.
the 1st line is a show stopper (mount error) .. incorrect mount syntax
the 2nd line is a slight mod (-af) , copy all files and links
thanks very much for your usefull prog.
- Are you still in to translating your prog / updating it to a "pet" ?
just been testing your Edit-SFS script, a handy script ...
- these lines work with puppy 4.xx and probally before.
the 1st line is a show stopper (mount error) .. incorrect mount syntax
the 2nd line is a slight mod (-af) , copy all files and links
Code: Select all
original line :
wait `mount tmpfs "$TMPAREA" -t tmpfs size="$SIZEOFTMP"m`
modified line :
wait `mount -t tmpfs -o size=${SIZEOFTMP}m tmpfs "$TMPAREA"`
original line :
cp -R "$WORKINGDIR/mountpoint"/* "$TREE"
modified line :
cp -af "$WORKINGDIR/mountpoint"/* "$TREE"
- Are you still in to translating your prog / updating it to a "pet" ?