Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 30 Jul 2014, 15:45
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Edit-SFS 2.1 (squash filesystem editor)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [28 Posts]   Goto page: 1, 2 Next
Author Message
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 05 Oct 2009, 20:50    Post subject:  Edit-SFS 2.1 (squash filesystem editor)  

edit_sfs-2.1.pet

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 extracting and recompressing. 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. If you feel like modifying it, right-click, choose "look inside", and edit the AppRun file.

You can use this several different ways. Just clicking the /root/my-roxapps/Edit-SFS file will run it and let you supply a path to a .sfs file (or drag the file onto the field). Alternately, you can drag a .sfs file directly onto /root/my-roxapps/Edit-SFS itself. I also added a symlink into /usr/bin, so you can run the command edit-sfs /path/to/file.sfs (or drag-and-drop onto the binary). Finally, this package also installs a right-click action in ROX-Filer for .sfs files.


The first time you run it, you will also be asked to tell it where you want to make the working directory. This should be on a Linux partition. Depending on the size of the file you're editing, you may need several hundred megabytes free. You also have an option of having Edit-SFS set up a temporary ramdisk. That's usefull if you're using Puppy on a computer with a no Linux partitions besides your possibly too cramped pup_save.2fs file. Keep in mind however that a ramdisk requires ram, so if you don't have hundreds of megabytes of ram available, that won't work so well. (Don't forget, if your Puppy already copied pup_xxx.sfs to ram, or you're running with pfix=ram, then you are probably already using about a hundred MB or more of ram for that!)

If you ever change your mind about the location, go to /root/my-roxapps/ and right-click on the Edit-SFS icon. You'll see an entry that says "Set base dir". Use that and it will redisplay the above window.


Once it knows which file to use and where to work, it will decompress the .sfs file into a temporary directory in that location. When it finishes it will present you with a new window featuring the file's extracted content. When you are done editing, click "Build" and it will close the window, compress the data, and present you with a freshly compressed .sfs file. Place that somewhere for safe-keeping before hitting "Finished". When ready, clicking the "Finished" button will delete the working directory in the process of cleaning up after itself. It also unmounts any ramdisk it may have created. Then you're done.






This version of Edit-SFS should be much more efficient than previous versions, as it reads the sfs file from the location where it is already at rather than copying it first. It also has limited compatibility with both versions 3 and 4 of squashfs. In Puppies older than 4.3 it only supports 3 unless you go out of your way to add support for 4. But in Puppy 4.3 and newer it should be able to deal with both versions. The file it creates will be in the same format as the original, or at least close (if the original was 3.0 but you have 3.1, the final file will be 3.1). They way I implemented that isn't ideal, but it gets the job done and should be easy enough for people to deal with if they need to tack on support for even newer versions of squashfs at some point.

Unlike the previous versions, this one also shows the status as it compresses.

Also, this version doesn't care if you run multiple instances. It uses mktemp to generate unique temporary directories.


updated 2009.10.13: give output file the same permissions as the input file

_________________
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


Last edited by Pizzasgood on Tue 13 Oct 2009, 00:18; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Tue 06 Oct 2009, 20:57    Post subject:  

Pizzasgood,

Thanks for putting together this application, especially in view of trying to cater to the lack of backward compatibility issues involved.

Choicepup43 is identifying SFS files for Choicepup43 by placing "ch4" in the title and I was wondering if there is any "general" standard naming for other sfs files created in puppy 43.

(Tried out your editor with old sfs files in a couple of pre43 puppies and everything worked very nicely - great work)

Many thanks again for your dedication and fine work across all areas of Puppydom Very Happy

Best regards,
s
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Sat 10 Oct 2009, 01:55    Post subject:  

Not that I know of, but I'm not a very big part of the .sfs scene.

And you're welcome. Smile

_________________
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

Back to top
View user's profile Send private message Visit poster's website 
tazoc


Joined: 11 Dec 2006
Posts: 1157
Location: Lower Columbia Basin WA US

PostPosted: Mon 12 Oct 2009, 15:15    Post subject: Thank you  

Hi Pizzasgood,
I really like your new version of Edit-SFS, especially giving the choice of ramdisk or linux partition. I will test it some more and put it in Lighthouse Pup.

I added this before line 222:
Code:
chmod a+r "$TREE_BASE/$SFSFILE" # TazOC make read all for web posting
and a couple of cosmetic mods e.g., line 220:
Code:
rxvt -bg GoldenRod2 -geometry 80x4 -e "${TREE_BASE}/script"
Thanks again,
TazOC

_________________
lhpup.org Lighthouse 64 6.02
Back to top
View user's profile Send private message Visit poster's website 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Tue 13 Oct 2009, 00:22    Post subject:  

I didn't realize the file it creates had funny permissions. I just uploaded version 2.1, which attempts to give it the permissions of the original .sfs file.

Thanks for pointing that out.

_________________
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

Back to top
View user's profile Send private message Visit poster's website 
Q5sys


Joined: 11 Dec 2008
Posts: 1047

PostPosted: Sat 24 Apr 2010, 17:45    Post subject:  

I dont know if it was something you made or someone else made but I cant seem to find it now... But have you created an SFS creation utility that works similar to this? Makes a directory in /tmp/ which you drop in whatever you want and then it saves it into an SFS?
If so, or you know what im talking about, could you point me in the right direction?
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Sun 25 Apr 2010, 17:06    Post subject:  

It wasn't me. I believe something like that was created, but I don't remember the name.

Anyway, it's pretty simple to do by hand. You create a directory, let's say /tmp/work. You put stuff into it. Then when you are ready to build it, you run a command like this:
Code:
mksquashfs /tmp/work /tmp/work.sfs

That will create /tmp/work.sfs, containing everything that was inside /tmp/work/.

_________________
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

Back to top
View user's profile Send private message Visit poster's website 
Q5sys


Joined: 11 Dec 2008
Posts: 1047

PostPosted: Tue 27 Apr 2010, 16:10    Post subject:  

pizzasgood,
thanks for the info, another question for you however
You said:
Quote:
You also have an option of having Edit-SFS set up a temporary ramdisk. That's usefull if you're using Puppy on a computer with a no Linux partitions besides your possibly too cramped pup_save.2fs file. Keep in mind however that a ramdisk requires ram, so if you don't have hundreds of megabytes of ram available, that won't work so well.


This is exactly what I have been trying to figure out how to accomplish on my own. Have you, or could you, create a tiny app just for creating ramdisks. Basically you already have the process done. I'm just looking for a small app that I can run that gives me the option to create a ramdisk of X size (Im prompted for the size), I click ok. And its made, and in the same way, there is another button or window that pops up that when I close, the ramdisk is deleted.
You're edit sfs already accomplishes this task, and so what I have been doing is opening a sfs file and then deleting it out of the temp disk and then putting what i need in there and then eventually deleting it and thus creating a empty sfs file. But could you be kind enough to create a dedicated app just for creating and then purging a ramdisk... since you've already accomplished it.
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Tue 27 Apr 2010, 19:49    Post subject:  

Sorry, but it's the end of the semester, so I'm too busy to do much of anything besides breath.

The following command mounts a 200 megabyte ramdisk on /mnt/data:
Code:
mount -t tmpfs -o size=200m tmpfs /mnt/data


You unmount it when done with the umount command (not a typo, there is no 'n' in umount):
Code:
umount /mnt/data

_________________
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

Back to top
View user's profile Send private message Visit poster's website 
Q5sys


Joined: 11 Dec 2008
Posts: 1047

PostPosted: Tue 27 Apr 2010, 20:38    Post subject:  

Pizzasgood wrote:
Sorry, but it's the end of the semester, so I'm too busy to do much of anything besides breath.

The following command mounts a 200 megabyte ramdisk on /mnt/data:
Code:
mount -t tmpfs -o size=200m tmpfs /mnt/data


You unmount it when done with the umount command (not a typo, there is no 'n' in umount):
Code:
umount /mnt/data


sweet, I can work with that then. Thanks! and good luck with finals, haha Smile
Back to top
View user's profile Send private message 
jim3630


Joined: 13 Feb 2011
Posts: 792
Location: Northern Nevada

PostPosted: Wed 07 Dec 2011, 21:14    Post subject:  

hi, link in first post is dead.

anyone have a copy of edit_sfs.2.1? thanks
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 8931
Location: Stratford, Ontario

PostPosted: Wed 07 Dec 2011, 22:03    Post subject:  

You can do this manually.

1. unsquashfs old.sfs
2. modify the folder squashfs-root
3. mksquashfs squashfs-root new.sfs
Back to top
View user's profile Send private message 
puppyluvr


Joined: 06 Jan 2008
Posts: 3186
Location: Chickasha Oklahoma

PostPosted: Wed 07 Dec 2011, 22:07    Post subject:  

Very Happy Hello,
Q5sys,
You probably were thinking oe DevTools, which will unpack/rebuild an ISO/SFS/Initrd for you..
Pizzasgood,
Thanks for the ramdisk script, quite useful...

_________________
Close the Windows, and open your eyes, to a whole new world
http://puppylinuxstuff.meownplanet.net/puppyluvr/
Puppy Linux Users Group on Facebook

Puppy since 2.15CE...
Back to top
View user's profile Send private message Visit poster's website 
Geoffrey


Joined: 30 May 2010
Posts: 1327
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Thu 08 Dec 2011, 00:58    Post subject:  

jim3630 wrote:
hi, link in first post is dead.

anyone have a copy of edit_sfs.2.1? thanks
edit_sfs-2.1.pet
Description 
pet

 Download 
Filename  edit_sfs-2.1.pet 
Filesize  7.93 KB 
Downloaded  1108 Time(s) 
Back to top
View user's profile Send private message 
jim3630


Joined: 13 Feb 2011
Posts: 792
Location: Northern Nevada

PostPosted: Fri 09 Dec 2011, 01:38    Post subject:  

Geoffrey wrote:
jim3630 wrote:
hi, link in first post is dead.

anyone have a copy of edit_sfs.2.1? thanks


Geoffrey, thanks so much.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [28 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0988s ][ Queries: 13 (0.0098s) ][ GZIP on ]