Page 1 of 1

Mount SFS files using unionfs/aufs?

Posted: Sun 12 Jul 2009, 12:27
by dejan555
I wonder if SFS files can be "loaded" using unionfs/aufs for full install users instead of copying files to system. That way they would be usable as in frugal install. I read something about adding branches and merging directories but I can't really figure this out. Any thoughts? If this is possible I could make script for "loading" SFS's, now there's task for some advanced users here ;)
Can't be hard...
:?: :?: :?: :?: :?:

Posted: Wed 29 Jul 2009, 17:35
by dejan555
Come on ppl, any clues? rxd from #puppylinux showed me examples of how easy is to mount modules with aufs on slitaz and i guess it can be used with unionfs, but commands i found don't really work, I guess that's because of how puppy's system is layered. Does anyone know if Barry is planing to use aufs in next puppy releases?

Posted: Wed 29 Jul 2009, 21:03
by tazoc
The only thing I'm aware of is Pet_Maker by trio. I haven't tried it but it probably copies files. Says you can uninstall with PETget if I read correctly. http://murga-linux.com/puppy/viewtopic. ... 9bd61304ac
Part of Pet_Maker-1.7-3 is SFS Installer http://www.murga-linux.com/puppy/viewtopic.php?t=44765
I don't know about aufs...
-TazOC

Re: Mount SFS files using unionfs/aufs?

Posted: Thu 30 Jul 2009, 02:07
by Bruce B
dejan555 wrote:I wonder if SFS files can be "loaded" using unionfs/aufs for full install users
I think so. Here's some reference for you.
http://www.tldp.org/HOWTO/SquashFS-HOWTO/

Although, I question the need for a unionfs in many cases. No need for a unionfs in the examples below. And they mount seamlessly.

/dev/loop6 on /opt/jre type squashfs (ro,noatime)
/dev/loop7 on /usr/lib/seamonkey-1.1.16 type squashfs (ro,noatime)
/dev/loop8 on /opt/opera type squashfs (ro,noatime)
/dev/loop9 on /opt/office type squashfs (ro,noatime)


Bruce

Posted: Thu 30 Jul 2009, 05:09
by dejan555
ok yes you can mount office on /opt cause your sfs is made that way, but my sfs already has /opt/openoffice in filesystem so if I did that I would have /opt/office/opt/openoffice right? Every SFS is made with full paths. Thanks for links, I did try to mount sfs in /mnt then merge dirs with
mount -t unionfs -o dirs=/mnt/office=rw unionfs /
but it doesn't seem to work even that command is documented everywhere.
tazoc, thanks for links too I know about SFS installer I also made one :D I just wondered if there's a way not to copy everything from SFS to system since unionfs has option to mount filesystems together so you can use SFS as module on full install too, uncompressed.

Posted: Thu 30 Jul 2009, 05:30
by trio
dejan555 wrote: I just wondered if there's a way not to copy everything from SFS to system since unionfs has option to mount filesystems together so you can use SFS as module on full install too, uncompressed.
Hmm Interresting,

1. I think a script not to install files from sfs to existing files is achievable (similar to the way I listed installed sfs as pet in sfs installer, only to compare the list to the existing ones and not to copy them) ...

but

2. is a mounted sfs usable, is questionable though, because it won't be in main filesystem, how the app will look for such needed shared libs, etc. say the mounted sfs app needs /usr/share/libs/xxx (included in the sfs), then it looks to /usr/share/libs and it's not there (because it's in the mounted sfs not in the main filesystem)

What you can do maybe, using my point no 1 , so that the existing files won't be replaced, install the sfs --> creating a list only of the installed files, then it can be removed later without deleting the shared files, as it was not listed as installed

If it can only be merged to unionfs then you're right...but I don't know if it is possible in full install....

Hope that helps, i am a novice in coding :D

Posted: Thu 30 Jul 2009, 05:54
by dejan555
Well my point is exactly that it should be merged into main filesystem:

mount -t squashfs OpenOffice-3.0.sfs /mnt/office -o loop

^^^First mount sfs to /mnt/office

mount -t unionfs -o dirs=/mnt/office=rw unionfs /

^^^merge contents of /mnt/office to / and make it pseudo read-write

Posted: Thu 30 Jul 2009, 06:09
by trio
dejan,

sorry for my ignorance :lol: as i said, i'm novice

just to give alternative to you -- install but you can remove installed files only

Posted: Thu 30 Jul 2009, 06:48
by dejan555
I'm not expert either, and yes your SFS installer does the work good if it uninstalls only new files, sounds good.

Posted: Thu 30 Jul 2009, 07:04
by disciple
Of course it isn't really a solution, but if most of the files in an sfs are in folders that aren't a normal part of your filesystem e.g. /opt/openoffice AND you don't need these folders to be writeable, you can always just mount the sfs and create symlinks where these folders should be.

Posted: Thu 30 Jul 2009, 07:45
by dejan555
OK, thanks guys, there are more SFS installers and tuts how to "install" SFS manually, but I'm pushing this cause I see that it's possible to do in linux and would make system ultra-modular and easy even for frugal installs, you could mount sfs with few commands without rebooting system and without puting sfs to /mnt/home or renaming to your puppy version.
But maybe it needs some tweaking for it to work in init, I guess only Barry would know if this can be done with unionfs and if it can be tweaked.

Posted: Mon 10 Aug 2009, 13:14
by rexterd
I tried using the latest Fatdog with aufs as the root filesystem, it works :D ...
modified init script inside initrd.gz

root should be aufs at least one writable branch on top and one read only branch for pup_112.sfs

mount -t squashfs /mnt/sda3/wine.sfs /wine
mount -o remount,append:/wine /

than should layer your wine squashfs file, the slash at the end is your root
directory

mount -o remount,del:/wine /

that should detach the wine squashfs file from your root

Posted: Mon 10 Aug 2009, 14:18
by dejan555
OK, but current puppy systems use unionfs, I don't wanna use some old release just because it has aufs. :)

Posted: Mon 10 Aug 2009, 14:39
by rexterd
deejan555 its me rxd :)

Latest Fatdog-logrow has aufs squashfs sqlzma unsqlzma so that qualifies to try aufs as root filesystem (2.6.29 kernel with aufs2)

Posted: Mon 10 Aug 2009, 18:38
by dejan555
Yeah I figured out it's you :) OK, thanks, I guess it will be usefull in new releases that have newer kernel with that support.

Posted: Wed 12 Aug 2009, 07:54
by rexterd
Here is the link of the init script:

http://www.murga-linux.com/puppy/viewto ... 481#331481

Posted: Sat 19 Sep 2009, 18:18
by sunburnt
Years ago we tried this, but with UnionFS, and it would not work.
But FUSE is much more capable, so I`m not surprised if it does work.

Posted: Mon 01 Mar 2010, 11:05
by nooby
dejan555 I am a frugal install guy but if your wishes would work for us too then I support your suggestion that this would be a good way to get freedom to have a modular approach.

Posted: Mon 01 Mar 2010, 14:55
by dejan555
It doesn't have to be for full installs only, it can be used in frugal too if you want on fly mounting without rebooting system, but seems like it conflicts with puppy's fs layering. Some puplets with aufs are capable to do this with modified init at least according to rexterd. But no go with union atm. There's also some sfs linker pet that uses alternative approach of sfs mounting by creating symlinks. Haven't tried it thought, may be good.

Posted: Mon 01 Mar 2010, 19:03
by sunburnt
jrb`s sfs-linker doesn`t use the union, so it doesn`t have those problems.
it "attaches" the sfs by mounting it, but never unions it.