Edit-SFS 1.1 (squash filesystem editor) - OBSOLETE

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

Edit-SFS 1.1 (squash filesystem editor) - OBSOLETE

#1 Post by Pizzasgood »

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.
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]

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#2 Post by sunburnt »

Thanks Pizzasgood... more tools = better & faster development of Puppy.

And with ease of learning & use, maybe more developers!

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#3 Post by trapster »

Sweeeeet!

Will this also work for the pup_xxx.3fs files??
Would be handy for the dual booters.

Thought I'd ask before I try
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#4 Post by Pizzasgood »

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.
[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]

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#5 Post by sunburnt »

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...
Attachments
xfilemount.gz
Follow the Wizard's instructions...
(1.37 KiB) Downloaded 1629 times

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#6 Post by trapster »

sunburnt,

works great!!

I just started playing with puppy211 and this will be handy when I want to grab some stuff from my puppy203.

Thanks!!
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

vanchutr
Posts: 438
Joined: Sat 05 Aug 2006, 12:04

Edit-SFS

#7 Post by vanchutr »

Pizzasgood wrote:
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.
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 ?
Thank you

vanchutr
Posts: 438
Joined: Sat 05 Aug 2006, 12:04

xfilemount

#8 Post by vanchutr »

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?

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#9 Post by sunburnt »

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.

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#10 Post by Pizzasgood »

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.
[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]

brad_chuck
Posts: 286
Joined: Tue 16 Aug 2005, 03:47
Location: Appalachian Mountains

Thanks

#11 Post by brad_chuck »

Thanks! A+ job on this one works great for me.

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#12 Post by pakt »

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 :D

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

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#13 Post by Pizzasgood »

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]

User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

Edit-SFS-LHP.pet updated interface/error checks

#14 Post by tazoc »

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
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 1363 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]

User avatar
Turpin
Posts: 120
Joined: Wed 16 May 2007, 08:07

#15 Post by Turpin »

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
At the time I get this message I have 3500 MB of space free. I have a 2GB swap partition, a bit over 4GB save file, and 1GB ram, trying to merge two pup_301.sfs files, Nearly Office Puppy and PCPuppyOS. Especially trying to copy the PCPuppy files over the NOP files, because I think that will still give me most of the XFCE optimizations while keeping the PCPuppy's scripts intact. I think it might boot if I could successfully complete the process. Any ideas on how I could get around this problem? Oh, I just now read the compatibility statement at the end. Maybe that's the problem. Dangit. Maybe I'll try this sfs Merge util I was reading about. Or was it 2fsMerge. I'll find out in a minute or two.

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#16 Post by Pizzasgood »

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.
[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]

djringjr
Posts: 157
Joined: Sun 14 Jan 2007, 21:08

#17 Post by djringjr »

I am posting here because edit-SFS does NOT seem to work with Puppy4xx.sfs files. I've posted to ask for a program request elsewhere, but I feel MU will see this here first.

We have great need for this to finish up SpeakPup - the screen reading Puppy for the Blind.

Thanks,

David

User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

Edit-SFS

#18 Post by tazoc »

djringjr wrote:I am posting here because edit-SFS does NOT seem to work with Puppy4xx.sfs files.
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.

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]

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#19 Post by Pizzasgood »

@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
[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]

maddox
Posts: 454
Joined: Fri 28 Sep 2007, 20:37
Location: sometimes in France

#20 Post by maddox »

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

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"
thanks very much for your usefull prog.

- Are you still in to translating your prog / updating it to a "pet" ?

Post Reply