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 Sat 29 Aug 2015, 19:37
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
using SFS with full installs
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [28 Posts]   Goto page: Previous 1, 2
Author Message
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Sun 22 Dec 2013, 13:12    Post subject:  

Patched and in a zip...well I did it on Windows Very Happy
Will redo later...

note for users... fakechroot -- chroot {executable}

edit...now a tar.gz.... I have complied....

mike
fakechroot.tar.gz
Description 
gz

 Download 
Filename  fakechroot.tar.gz 
Filesize  41.07 KB 
Downloaded  197 Time(s) 

Last edited by mikeb on Tue 24 Dec 2013, 14:27; edited 1 time in total
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2479
Location: The Blue Marble

PostPosted: Sun 22 Dec 2013, 13:21    Post subject:  

mikeb wrote:
well I did it on Windows Very Happy
Heresy !!! Laughing That being said 7zip will create tgz archive on Windows too Wink
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Sun 22 Dec 2013, 13:29    Post subject:  

Quote:
That being said 7zip will create tgz archive on Windows too

You would think so but it only offered tar with no compression options...so zip it was.

mike
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2479
Location: The Blue Marble

PostPosted: Sun 22 Dec 2013, 14:25    Post subject:  

mikeb wrote:
You would think so but it only offered tar with no compression options...so zip it was.

It does, but it's a two step process (tar first, then gz/bz2/xz). (You know, I have to boot into my Windows VM to confirm this Wink ) Agree that zip is more convenient.

Anyway, back on topic, if you're running full installs (which apparently missed my attention in my first reply) - the if you run root you can easily mount "/" as a branch of aufs. Of course, unionfs-fuse is probably better in this regard because it doesn't require patched kernels, so no contest if you're running other distros, and you get all the benefit.

Amigo thanks for bringing bindfs to my attention.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Sun 22 Dec 2013, 14:42    Post subject:  

hmm could not be asked... zip appears to be the same compression as gzip but with an index too so i prefer it for large archives/backups as I can rescue a single file quickly and update the archive without a full rebuild.

Quote:
the if you run root you can easily mount "/" as a branch of aufs.

so you have created a union using '/' as a layer using aufs? that was a query earlier. Lucid refused to do this. If so why is this not the method used in puppy for running an sfs?

mike
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2479
Location: The Blue Marble

PostPosted: Sun 22 Dec 2013, 15:14    Post subject:  

mikeb wrote:
so you have created a union using '/' as a layer using aufs? that was a query earlier.
Yes. As long as "/" is not aufs (which shouldn't be the case on full install, "/" should be /dev/sdxxx)

Quote:
Lucid refused to do this. If so why is this not the method used in puppy for running an sfs?
No idea Wink
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Sun 22 Dec 2013, 16:23    Post subject:  

well I can have more than 10 sfs and load them on the fly on a standard puppy 2.16...2.6.18 kernel so I guess it takes a few years for these things to get through Very Happy

mike
Back to top
View user's profile Send private message 
saintless


Joined: 11 Jun 2011
Posts: 3427
Location: Bulgaria

PostPosted: Sat 07 Feb 2015, 06:11    Post subject:  

Thank you, Mike!
I just like to let you know your Idea inspired Fred to make nice improvements (for full and frugal install) in few applications:
http://www.murga-linux.com/puppy/viewtopic.php?p=820075#820075
http://www.murga-linux.com/puppy/viewtopic.php?p=826615#826615
Not Puppy but atleast related project. Maybe in Puppy some day...

Toni

_________________
Farewell, Nooby, you will be missed...
Back to top
View user's profile Send private message MSN Messenger 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Sat 07 Feb 2015, 06:22    Post subject:  

Ah great... I like to throw ideas around and its even better when they get picked up.

Glad to see debiandog has been thriving Smile

Again amigo needs credit on this one.

[url]Yes. As long as "/" is not aufs (which shouldn't be the case on full install, "/" should be /dev/sdxxx) [/url]
old thread and the penny just dropped.... sort of... sfs layered with system partition... but result would not be part of the main system but separate and still need to chroot into it. Seem to have gone circular.

Hmm could get busy in here...you never know Smile

mike
Back to top
View user's profile Send private message 
fredx181

Joined: 11 Dec 2013
Posts: 1296
Location: holland

PostPosted: Sat 07 Feb 2015, 10:37    Post subject:  

Hi Mike,

I'd like to thank you also!
Your idea is very useful for some scripts I made in different ways.
For loading a SFS I basically used this (slightly changed your code, so config files will be written to the 'normal' directory e.g. /root/.config):
Code:
mkdir -p union
mkdir -p app
#mkdir -p write

mount -o loop xchat.sfs app
unionfs-fuse -o nonempty -o allow_root -o cow /=RW:/root/app=RO /root/union

chroot union xchat
umount -l /root/union
rmdir /root/union


Here's attached loadsfs-fuse, we use it to load SFS in DebianDog full install.
(Depends besides unionfs-fuse also on yad. An "Applications" window will show)
Usage:
Code:
loadsfs-fuse /path/to/<name>.sfs

Or just drag and drop a .sfs on to the loadsfs-fuse script in filemanager.
Tested only on DebianDog.

Edit: Now I tested on puppy precise and found that it doesn't work because of to old yad version.
Re-uploaded, with only change: removed unimportant yad switch so works now also with old yad version e.g. v. 0.12.

Fred
loadsfs-fuse.tar.gz
Description  Re-uploaded, Load .sfs from full install
gz

 Download 
Filename  loadsfs-fuse.tar.gz 
Filesize  2.5 KB 
Downloaded  33 Time(s) 

Last edited by fredx181 on Wed 01 Apr 2015, 07:24; edited 1 time in total
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Sat 07 Feb 2015, 12:26    Post subject:  

Excellent .... I had a gut feeling this would be useful.

Thanks for sharing.... it may get popular Wink

mike
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 645

PostPosted: Tue 10 Feb 2015, 08:52    Post subject:  

Another option is to use sym links.

Create a mount point
Mount the sfs
copy the contents to /
Code:
mkdir /mnt/gimp
mount -t squashfs /somewhere/gimp.sfs /mnt/gimp
cd /
cp -rsv /mnt/gimp/* . > /tmp/whatdone
fixmenus

Copies pretty quickly for me (second or two to 'load' the sfs, and every sfs I've thrown at that has worked ok (as expected).

The recursive copy as symlinks with verbose (-rsv) switches provides a reference of what was sym linked (in file /tmp/whatdone). With a bit of awk/sed or whatever that reference file could be used to undo/remove those links (unmount the sfs) i.e. remove symlinks and then unmount /mnt/gimp

Perhaps load and unload code something like (untested)
Code:
#!/bin/bash
SFS=$1
DIR=$(dirname "$SFS")
[ "$DIR" = "." ] && DIR=$PWD
FILE=$(basename "$SFS")
mkdir /mnt/$FILE
mount -t squashfs $SFS /mnt/$FILE
cp -rsv /mnt/$FILE/* /. >/tmp/${FILE}_rec
fixmenus

Code:
#!/bin/bash
SFS=$1
DIR=$(dirname "$SFS")
[ "$DIR" = "." ] && DIR=$PWD
FILE=$(basename "$SFS")
# remove links created by sfs load - catering for files with spaces in filename
cat /tmp/${FILE}_rec | awk 'BEGIN { FS = "-> `/." } ; { print "rm \"" $2 }' | sed 's/.$/\"/' >/tmp/${FILE}_del
IFS="
"
for line in `cat /tmp/${FILE}_del`;do
  LEN=`expr length "$line"`
  if [ $LEN -gt 4 ]; then
    exec $line
  fi
done
umount /mnt/$FILE
rm /tmp/${FILE}_rec
rm /tmp/${FILE}_del
rmdir /mnt/$FILE
fixmenus
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Thu 12 Feb 2015, 14:06    Post subject:  

Well sort of defeats the objects of using an sfs...ie to leave no footprint behind once removed..plus the possibility of removing wanted items if you do clean up.

mike
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [28 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.1435s ][ Queries: 13 (0.0089s) ][ GZIP on ]