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 Thu 02 Oct 2014, 00:57
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to make .sfs file (compress programs and settings)
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Author Message
bombayrockers


Joined: 24 Sep 2005
Posts: 427
Location: Mumbai, India

PostPosted: Mon 09 Jan 2006, 16:12    Post_subject:  How to make .sfs file (compress programs and settings)  

How to make a .sfs file ?

Presently puppy supports .sfs files to be mounted on union /usr.
Suppose I have got some PackageX running and want to make a .sfs out of it. I would copy all the necessary files for packagex to /my-docments/packagex. inside the folder packagex there would be the following folders
/bin - containing the binaries
/lib - dependencies
/share - shared data
..

if the package you have compiled installs to /usr/local then packagex folder would contain
/local/bin
/local/lib
/local/share
..

to make a .sfs out of this execute the following command in the terminal
Code:
mksquashfs /root/my-documents/packagex /mnt/hda1/usr_packagex.sfs

/mnt/hda1 to be replaced by where ever you want this .sfs file to be created.

pre-1.0.7 users can use it by renaming it to usr_more.sfs
1.0.7 users can do the following
edit your rc.local to add the following lines

Code:
echo  "Making more loop devices..."
mknod /dev/loop5 b: 7 5
mknod /dev/loop6 b: 7 6
mknod /dev/loop7 b: 7 7

if [ ! "`ls /mnt/home/usr_packagex.sfs 2> /dev/null`" = "" ];then
  mkdir /.usr_packagex
  echo "Mounting /mnt/home/usr_packagex.sfs file on /.usr_packagex..."
  losetup-FULL /dev/loop5 /mnt/home/usr_packagex.sfs
  mount -r -t squashfs -o noatime /dev/loop5 /.usr_packagex
  unionctl /usr --add  --after /root/.usr --mode ro /.usr_packagex
fi


if you are multiple .sfs files the increase then use the next /dev/loop that is empty i.e. the next usr*.sfs will go in /dev/loop6. If you run out of loops make new ones using mknod command as show above.

This information in valid for puppy 1.0.7 and later puppy 1.0.* versions only. union structure is going to change in puppy2
Back to top
View user's profile Send_private_message YIM 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11083
Location: Arizona USA

PostPosted: Mon 09 Jan 2006, 16:28    Post_subject:  

bbr, this would be a good place to explain, what exactly is an sfs file good for? Confused
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Mon 09 Jan 2006, 17:13    Post_subject:  

It allows this great piece of Puppy magic:

Quote:
Mega-Puppy 001

This addon allows you to use 667 MB of Software compressed in one single file.
I recommend to use it with Puppy 1.0.7, as older versions would require some tweaking (see troubleshooting further down).

KDE 3.4.1
Open Office 2.0
Java Runtime 1.5.04
Wine (Oct. 2005)
39 MB Video-Codecs for gxine and mplayer
Apache Webserver with PHP (but no MySQL)


http://www.murga.org/~puppy/viewtopic.php?p=31283#31283

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
bombayrockers


Joined: 24 Sep 2005
Posts: 427
Location: Mumbai, India

PostPosted: Mon 09 Jan 2006, 17:13    Post_subject:  

A .sfs file is a squashfs file. Some examples of .sfs files in puppy are usr_cram.fs, usr_more.sfs for wine, openoffice, kde.

a squashfs file can also be used to make a usr_more.sfs out of your /root/.usr. Once you have installed all the software you want make a usr_more.sfs out of your /root/.usr.
Various advantages of this
1. You can use all your software on a ntfs only system when it dosent allow making a pup file.
2. more free space on pup file
3. in case of a pup file failure you wont lose all you customizations.
Back to top
View user's profile Send_private_message YIM 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Mon 09 Jan 2006, 17:47    Post_subject:  

Thanks for the howto, bombay!

For Puppy2, the sfs files will mount on "/", but otherwise it's all as Bombay has explained.

Also, the file naming format for puppy2 is as follows:

*_200.sfs

where the "*" means any text string, the "200" is the 3 digit puppy version number. So when Puppy version 2.0.0 is released, it is compressed as 200.

Having versioning in all the .sfs files is probably a good thing.

You can have up to 4 of them, and they will load in alphabetical order, for example:

devx_200.sfs
kde_200.sfs

Order is important, as a file named myfile.txt in devx_200.sfs will hide myfile.txt in kde_200.sfs.

So, in a running puppy2:

tmpfs (ramdisk)
persistent storage (hd, flash, dvd)
pup_200.sfs (puppy himself)
devx_200.sfs
kde_200.sfs
Back to top
View user's profile Send_private_message Visit_website 
guest5000
Guest


PostPosted: Mon 06 Feb 2006, 02:52    Post_subject: upx  

Just out of curiosity. Is it possible to use upx to better compress these files ?
Back to top
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Mon 06 Feb 2006, 02:58    Post_subject:  

not in usr_xxx.sfs , as it already is compressed.
UPX just makes sense in pup001 or on a harddisk.

Disadvantage:
you can not run
ldd theprogram
to check dependencies, you had to "upx -d ..." it first.

I released a small dependency-checker some days ago, that will not work with upx'ed files.
http://www.murga.org/~puppy/viewtopic.php?t=5751

Mark
Back to top
View user's profile Send_private_message Visit_website 
dewdrop


Joined: 29 Aug 2005
Posts: 298
Location: Texas USA

PostPosted: Mon 06 Feb 2006, 11:19    Post_subject: how to make an .sfs file  

Hi Bombayrockers, and the other developers/programmers:

From a non-programmer/non-developer viewpoint - which fits me to a T., I think that the .sfs file is like having an adjustable sized trailer hitched to the back of a small car.

If a person knows which programs they want Puppy to have, and they know how to construct an .sfs file, ... and all the dependencies are included or accounted for .... that person could have Puppy with all kinds of variations.

Thus, you would end up with Puppy about 50-60 megs in size, and any number of .sfs files with all kinds of programs included.....this could be a "mini industry" inside the Puppy community.... Kind of like "Puppy Your Way". Tell one of the .sfs guru's what you want included, they would put the package together, upload it to some download site for a set amount of time, you, or whoever wants to could download it, place the file where the pup001 file is located on the hard drive, and away you go.

Is this the idea, or am I way off the mark on the usefulness of the .sfs file concept?

dewdrop
Back to top
View user's profile Send_private_message 
costal martignier

Joined: 28 Jan 2006
Posts: 197

PostPosted: Mon 06 Feb 2006, 12:13    Post_subject:  

Quote:
Is this the idea, or am I way off the mark on the usefulness of the .sfs file concept?


no i think you correct with this Smile
i was also faszinated about the possibilities with .sfs so i created the webenv.sfs a total webenvironment in a .sfs...

i think the only problem is (but i think this is somewhat fixed in puppy2) you can't autoload many sfs files automaticly (please the others correct me if i'm wrong) you need to mount them manually and you need some knowledge about unionfs/unionctl and mounting in general..

AFAIK in puppy2 there is a possibility to autoload "some" sfs files...

i think this .sfs stuff is really a great thing that barry has produced/invented...

regards
costal
Back to top
View user's profile Send_private_message 
sccat

Joined: 22 Aug 2005
Posts: 160

PostPosted: Thu 23 Mar 2006, 04:51    Post_subject:  

Very interesting.
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Tue 28 Mar 2006, 00:38    Post_subject: turned into .sfs modules  

Have put the HowTo here
http://puppylinux.org/wikka/SfsModuleCreation

Does someone have time to format it using these codes please:
http://wikkawiki.org/FormattingRules

Can puplets such as Grafpup, Hacao, Simplepup and Emptycrust be turned into .sfs modules so they will run with latest Puppy base much as megapuppy does?

If so can this process be documented - what if any is the relationship/links to .pet?

Can we add .sfs modules and info links etc to the wiki page please.

How does this change in Puppy2?

Cool

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
bombayrockers


Joined: 24 Sep 2005
Posts: 427
Location: Mumbai, India

PostPosted: Wed 29 Mar 2006, 09:00    Post_subject:  

Quote:
Can puplets such as Grafpup, Hacao, Simplepup and Emptycrust be turned into .sfs modules so they will run with latest Puppy base much as megapuppy does?


packages from these puplets can be taken and turned in one compact usr_more.sfs eg usr_grafpup.sfs which can provide puppy with the same functionality as these derivatives.

I had done this for the edu puppy project (now abandoned as it was lost in hd crash), where I took tux 4 kid packages, python and SDL from grafpup and grouped them into one usr_more.sfs named usr_kids.sfs. Just set up the loop and you have the whole tux4kids suite in puppy.

Another one I am working on is the gnoe-deps module as usr_more.sfs so that gnome apps can be run in puppy wihout having to have the whole gnome environment, few examples I have got running until now are firestarter, metacity, nautilus, gnome-system-monitor.
Back to top
View user's profile Send_private_message YIM 
raffy

Joined: 25 May 2005
Posts: 4765
Location: Manila

PostPosted: Mon 03 Apr 2006, 04:02    Post_subject: Thanks and question  

Thanks, bombay, and here's hoping that you can redo your tux4kids sfs Smile

Something weird is happening with my testing of /usr/local/wwwroot/htdocs. The Apache conf points to /root/.usr/local/wwwroot/htdocs as the document root, but when I open /root/.usr (the invisible folder), I could only see one or two subdirectories, none of them /local. But all the subdirectories are visible in /usr (that is, starting from the visible folder /usr).

As a result, the server gets the error "Root Directory not found" Question
Back to top
View user's profile Send_private_message 
bombayrockers


Joined: 24 Sep 2005
Posts: 427
Location: Mumbai, India

PostPosted: Mon 03 Apr 2006, 04:31    Post_subject:  

raffy,
is /usr/local/wwwroot/htdocs a part of any usr_more.sfs ? or it is installed on /root/.usr
Back to top
View user's profile Send_private_message YIM 
raffy

Joined: 25 May 2005
Posts: 4765
Location: Manila

PostPosted: Tue 04 Apr 2006, 07:13    Post_subject: An ISO remastered with Alienx's script  

It is a remaster using alienx's excellent script (the slow one), so there is no usr_more.sfs.

I just discovered that doing something to the /htdocs and files in it will make them visible, such as "touch" in console, otherwise they remain invisible to the Apache server. Am at a loss why this happens.

Edit: I recently read a discussion about a unionfs bug causing this to happen, that should be solved with 2.6+ version of the Linux kernel.

Edited_time_total
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1005s ][ Queries: 12 (0.0193s) ][ GZIP on ]