How to make .sfs file (compress programs and settings)

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
lvds
Posts: 340
Joined: Tue 23 Jan 2007, 15:15
Location: Near the window

#21 Post by lvds »

Hi,

i am having hard time with squash files. I hope someone of you will help, here is where i am: i have created a SFS file and i would like it to be mounted at boot time by the CD.

1. i have put an application into /usr/local/SFS_FILENAME
2. i have make the SFS with the command
mksquashfs /usrlocal/SFS_FILENAME myaddon_214.sfs
3. i have deleted /usr/local/SFS_FILENAME
4. i have remastered the cd with Dougals tool
5. i have a brand new CD with all the file AND myaddon_214.sfs

ok, it boots fine, but the squash file is not mounted and the softwares in myaddon_214.sfs are not found in /usr/local

I cannont figure what i did wrong nor i don't know how to mount it by hand so to test may squash file. I read on another thread MU created a squash extension manager but it is not for v2.14 (or am i wrong ?) here is the thread
http://www.murga-linux.com/puppy/viewtopic.php?t=7457

Is there something special to specify somewhere to have a squash file mounted at boot
time ? i thought it was automagic...

Also, is there a size limit at a squash file ? mine is around 100Mo ; how much Mo can i add for a computer with 512 Mo ?

best regards,
Laurent.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#22 Post by MU »

Create a folder (it also could be somewhere else):
/root/sfs/

Copy there your files.
In this example, I use some example files EXAMPLE to make it clearer.
You need such a folderstructure:

/root/sfs/usr/local/bin/EXAMPLE.sh
/root/sfs/usr/lib/EXAMPLE.so
/root/sfs/usr/share/applications/EXAMPLE.desktop
/root/sfs/usr/share/icons/EXAMPLE.png

Now create the squashfs:
cd /mnt/home
mksquashfs /root/sfs EXAMPLE_215.sfs

That's all!
Now reboot, and you should have these files:
/usr/local/bin/EXAMPLE.sh
/usr/lib/EXAMPLE.so
/usr/share/applications/EXAMPLE.desktop
/usr/share/icons/EXAMPLE.png

Note that sfs are only mounted automatically, if you run Puppy from CD or a frugal installation. But not from a full harddisk installation.
/mnt/home is a symbolic link to the folder, where Puppy stores all settings in the file pup_save.2fs.

You don't need a manager to mount them, such managers are only made for extended possibilties.

The filesize is unlimited.
It is not loaded to Ram, but mounted like a CD or harddisk if it runs from a fast media like a harddisk.

Mark

User avatar
lvds
Posts: 340
Joined: Tue 23 Jan 2007, 15:15
Location: Near the window

#23 Post by lvds »

Thanks Mark, I run from a live CD v2.14 and my goal is to have an addon_214.sfs file mounted automatically at boot.

it does not work, i do not have a /mnt/home direcotry ; is it a special directory and is there a special command to create it ?

and when i reboot do i save or not ? usually i do not save. My goal is to remaster so my friend can have the same cd.

Best regards,
Laurent.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#24 Post by MU »

/mnt/home is created, when you save the first time.
So when pup_save.2fs is created.
So yes, you must save once to be able to use a sfs.
This will change in Puppy 2.16, which will allow to mount a sfs directly from CD.

The advantage of sfs is, that you can share it with users of different versions of Puppy.

But if you just want to give your friends a whole customized CD, you do not need sfs.

In this case you would install programs in the running system, and then create a new CD with such a remaster program like that from Dougal.

But I cannot help you with that, as I don't use it.

I rebuild Isos like Muppy with some console-commands from an external folder, where I copy everything I need.

This method is for advanced users only, usually such a remaster wizard is easier to use.

Mark

vern72023
Posts: 158
Joined: Mon 26 Dec 2005, 05:15
Location: Jacksonville Fl

#25 Post by vern72023 »

216 which is in the experimental stage at the moment has a great feature for handling sfs files on load - I use sfs files a lot to hold my customizations and programs like wine which are tailored to my individual needs and I have found that the bootmanager included in 216exp2 is sinmple to use and appears very stable

It sounds like it will br ideal for what you are looking for

George
george

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

#26 Post by sunburnt »

Laurent; What MU says is the correct way to do it (of course).
What vern72023 said is correct also, Barry has rewritten my "post boot SFS GUI".
It'll allow setting up SFS files for booting, I haven't seen his handy work yet though.

Laurent... I think that the reason your SFS file doesn't load is Puppy ONLY loads
SFS files named pup_more.sfs or pup_devx.sfs, so rename your SFS to "pup_more.sfs".

You could rename it & try it just for the heck of it, but if it loads but doesn't
work you should probably do the SFS file again with MU's instructions.

...Terry

User avatar
lvds
Posts: 340
Joined: Tue 23 Jan 2007, 15:15
Location: Near the window

#27 Post by lvds »

sunburnt wrote:Laurent; What MU says is the correct way to do it (of course).
There is ABSOLUTELY no doubt about it, i am the newbie, he is the guru ;
That's why i was asking for help and i am very gad Mark helped me because now...

IT WORKS ! 8) ...it's incredible ! it is very powerful !! I can load thousands of megas and it does not weight, amazing, really.

...and i can now understand what Barry said at the beginning of the thread:
For Puppy2, the sfs files will mount on "/"
mine files have come right into / even if i managed to put them in /root/sfs/usr/local/EXAMPLE like Mark teached.

but anyway, i will do it again until i can put them down into /usr/local :D

I think another error i made was i did not respect 8+3 filename naming convention for msdos files and perhaps my SFS was not seen...
sunburnt wrote:Laurent... I think that the reason your SFS file doesn't load is Puppy ONLY loads SFS files named pup_more.sfs or pup_devx.sfs, so rename your SFS to "pup_more.sfs".

You could rename it & try it just for the heck of it, but if it loads but doesn't
work you should probably do the SFS file again with MU's instructions.

...Terry
well mine is named dofs_214.sfs and was loaded fine automagically at boot time, but ok i take notice of it :-)

THANKS YOU ALL ! You are great programmers, really !
...so now i can create squash files i will begin to do a few and you will see SFS popping up... heu, when i will have managed not to put everything into / :? sorry

Best regards,
Laurent.

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

#28 Post by sunburnt »

Apparently Pupp-2xx loads anything ".sfs", I learn new stuff all the time !

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#29 Post by MU »

Puppy2 uses this naming convention:

DescriptiveWord_Versionnumber.sfs

Like:
KDE_215.sfs

So if you download a KDE_214.sfs, and want to use it in Puppy 2.12, you must rename it to:
KDE_212.sfs

Mark

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#30 Post by MU »

I don't know why your files went to "/".
I said:
cd /mnt/home
mksquashfs /root/sfs EXAMPLE_215.sfs
I think this should work, but maybe I oversaw something?

I usually do it on an external partition:
Lets say I have:
/mnt/sda6/sfs/usr/local/bin/example.sh

Then I type:

cd /mnt/sda6
mksquashfs sfs EXAMPLE_215.sfs

This creates the sfs in /mnt/sda6 , not in /mnt/home, so I finally must move it manually there.

But I dont think this will be the problem you have, I just have no other idea at moment.

Mark

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

#31 Post by sunburnt »

Thanks Mark, I seem to recall some of this from when I looked at Puppy-2's boot code.

I'll keep this in mind as I work on a "Unleashed to SFS" builder GUI.
I have "mksfs" that seems to work well building SFS files by merging or joining
image files, directories, & SFS files into new SFS files.

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#32 Post by vtpup »

Post deleted,

wrong thread, sorry.
Last edited by vtpup on Sat 21 Feb 2009, 02:04, edited 1 time in total.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#33 Post by MU »

[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#34 Post by vtpup »

Sorry Mark my post above is attached to the wrong thread! Transferring now to the one you quote here. That;ts where I have a problem.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

#35 Post by ecomoney »

If you want your sfs to automagically create an icon on the desktop (which is something many new linux users need until they get to know under the hood), here is a tip to do it.
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

mary john

#36 Post by mary john »

Hey all,

There are more than one way to create .sfs file, but i follow a single path like here,this is eaisy and quit way to create a .sfs file. If u want to go with my path then u must follow this
The sfs files will mount on "/",
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.
ou 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

Post Reply