sfs_load-2.4 on-the-fly

Miscellaneous tools
Message
Author
User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

sfs_load-0.6

#61 Post by shinobar »

seaside wrote:I thought this might be another aspect to throw in for consideration.
http://murga-linux.com/puppy/viewtopic. ... 294#493294
Thanks seaside.
I add a launcher after loading sfs, inspired from you.

sfs_load-0.6
9 Feb 2011 v0.6: fix was moved remote files, restart X info, launcher (thanks to seaside)
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#62 Post by nooby »

Shinobar, how I am not derailing your thread too much.

Did there exist something named TCX to Sfs convert? or Sfs to Tcz convert?

I am trying to learn TCL now and did remember something about being able to use Tcz files converting them to sfs files and loading them when Puppy starts?

They had the Virtual Digital Piano something as an Tcz file and maybe that one can be made into an sfs and used in puppy?
I use Google Search on Puppy Forum
not an ideal solution though

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#63 Post by ICPUG »

Yes Nooby - you are derailing the thread. Why cannot you ask your own questions on a new thread rather than going off topic? You've done it on the sfs.exe thread as well.

To answer this one I think you might consider sfs tcz linker here:
http://murga-linux.com/puppy/viewtopic.php?t=47976

Of course all these guys (shinobar, goingnuts, seaside) creating new 'on the fly' loaders might also consider whether they can be extended to load tcz files.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#64 Post by nooby »

Thanks ICPUG, you are right. Thanks for the link to sfs/Txz thing. I did refer to that one but did not remember enough to really get it.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#65 Post by jemimah »

0.6 fails on Puppeee because AUFS is built into the kernel rather than built as a module. Sfs_load assumes that means we're using Unionfs.

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

aufs or unionfs

#66 Post by shinobar »

jemimah wrote:0.6 fails on Puppeee because AUFS is built into the kernel rather than built as a module. Sfs_load assumes that means we're using Unionfs.
I see. i guess i can manage...

For the test on pupeee, rewrite line 775 in /usr/sbin/sfs_load:

Code: Select all

AUFS=$(lsmod | grep -w '^aufs')
to:

Code: Select all

AUFS=aufs
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#67 Post by jemimah »

Yeah I figured that out no problem - you really don't even need to worry about it - I just thought I'd mention it.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#68 Post by jemimah »

Just finished testing 0.6 and it's working very well. I think it would be good to tell the user that they have reached the system SFS limit when you run out of loop devices, instead of just saying that mounting the SFS failed.

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

sfs_load-0.7

#69 Post by shinobar »

jemimah wrote:I think it would be good to tell the user that they have reached the system SFS limit when you run out of loop devices
UPDATE: sfs_load-0.7
11 Feb 2011 v0.7: fix was not update menu in some case, see aufs even with no module(thanks to jemimah), add new loop device
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#70 Post by jemimah »

I was able to create one extra loop device, but when I tried to create the second one I get the error "failed to create new loop-back device". I can look in /dev and see that the new device was in fact created successfully.

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

extra loop device

#71 Post by shinobar »

jemimah wrote:I was able to create one extra loop device, but when I tried to create the second one I get the error "failed to create new loop-back device". I can look in /dev and see that the new device was in fact created successfully.
sfs_load is checking if it is available by the following command:

Code: Select all

losetup -f
I am not sure how many loop-back devices are allowed on the system and how to change the limit...
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#72 Post by jemimah »

The actual limit is hard coded in the init script. I bumped the limit in Puppeee up to 11 for testing.

I think it should work fine to just create the loop device and mount point. If there are more SFSes in the list than the limit in the init script, it will just ignore the extra ones.

I'm not sure what maximum number of branches you can have in AUFS is. I guess lighthousepup supports 40 SFSes or something so the limit must be pretty high.


"losetup -f" returns nothing on my system after I run out of loop devices. I'm not sure what's going wrong exactly.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#73 Post by jpeps »

Experimenting with this a bit, I've found that SFS's are not just a simple substitute for PETS. Sometimes they don't work. For example, I tried making an SFS for TOR network-browser. The PET loads the network, while the SFS only partially loads it. Making a PET for directory of gmail phone plugins worked fine, but the SFS of the same directory didn't (they weren't seen in gmail). There may be a good reason to limit the number of AUFS loops. Perhaps there's something I'm not doing to make them work better.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#74 Post by jpeps »

Think I see what's going on. The PET overrides the whiteouts and loads all the files, while the SFS doesn't.

Edit: There was something like "initrd/pup_rw/opt/.wh..wh..opq" that prevented plugins in /opt from loading with the SFS, although the PET loaded. Worked after deleting. (there were also a few more that need deleting).

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#75 Post by jpeps »

The solution I've come up with is a script that gets rid of whiteouts. I'll have to see if there's any problems with it, but it's enabling my SFS to load and haven't run into any problems.

USAGE: whiteouts [ -d ] ## just view them, or delete with option "-d". Whiteouts to leave alone are listed in script.

Code: Select all

 #!/bin/ash -a

display() {
[ -f /tmp/whiteouts ] &&  rm /tmp/whiteouts
 touch /tmp/whiteouts
 find /initrd/pup_rw | grep "\.wh" >>/tmp/whiteouts
}

if [ "$1" == "-d" ]; then
  [ -f /tmp/white-del ] && rm /tmp/white-del 
   touch /tmp/white-del
display
cat /tmp/whiteouts | sed ' 
/\.wh..wh.orph/ d 
/\.wh..wh.plnk/ d 
/\.wh.windowmanager.openbox/ d
/\.wh..wh.aufs/ d ' >>/tmp/white-del
  ## remove files
 while read line; do
   rm $line
 done < /tmp/white-del
  rm /tmp/white-del
 exit
fi

display
cat /tmp/whiteouts
rm /tmp/whiteouts

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#76 Post by jemimah »

There is code in the init script that does the whiteout cleaning. Unfortunately it doesn't work with newer aufs versions because the name of the opaque whiteout files changed and the script has not been updated (Barry has fixed it in woof now). I think it should be safe to move the code to sfs-load and remove it from the init script. I intend to try it anyway.

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

sfs_load-0.8

#77 Post by shinobar »

Major update:
# 14 Feb 2011 v0.8:
  • warning excessive extra files
  • restart main dialog(thanks to Bert)
  • cleanup whiteout at unload(thanks to jpeps and jemimah)
  • mkfontscale, mkfontdir
Treating the whiteout may reduce the problem as jpeps reported, but note that sfs can not be the same as pet.
Suppose:
  1. Load a sfs
  2. Delete some of the files or directories in the sfs
  3. Unload the sfs by the sfs_load-0.8, which cleans up the whiteouts
  4. Load again the same sfs
Most of case, the once deleted files or directories revive with the last re-load.
But the files or the directories conflict (duplicated) with other layers shall not come back.
Last edited by shinobar on Tue 15 Feb 2011, 02:09, edited 2 times in total.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

Re: sfs_load-0.8

#78 Post by jpeps »

shinobar wrote: Treating the whiteout may reduce the problem as jpeps reported, but note that sfs can not be the same as pet.
As I recall, whiteouts were successfully removed with a pet install, but not with SFS.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#79 Post by jemimah »

Installing a pet writes to the top layer whereas installing an sfs puts the data on the bottom layer. That's why there's a difference,
[url]http://saluki-linux.com[/url]

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#80 Post by pemasu »

New usage for sfs load on the fly. When using woof and ./3builddistro. When it is time to create devx.sfs, so far the Barry`s bacon basic compiler installing hasnt been succesful. Devx.sfs not loaded has been the error message (it has been always loaded with bootmanager)

Now I have twice used sfs load on the fly for devx.sfs. Both times bacon basic compiler and support files have been succesfully added to the devx.sfs

Post Reply