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 Mon 20 Oct 2014, 00:40
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
guess_fstype reports unknown for Puppy SFS files. [ No Fix ]
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [23 Posts]   Goto page: Previous 1, 2
Author Message
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Thu 21 Mar 2013, 21:32    Post subject:  

Then I would try to create a second temporary folder
ie
Code:
mkdir /tmp_APP
mount -t tmpfs none /tmp_APP
cd /tmp_APP
(( execute my needs here ))


Or is it important that it is on top layer ?
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Fri 22 Mar 2013, 02:31    Post subject:  

It could be a lower layer and apps. are then added through the mount point.

But it has to be mounted on / or chroot is needed for the app. to run normally.

That`s the whole idea is to install apps. to a separate layer to keep Save clean.
And then to build up the app. and be able to run it for testing.


So: unionfs-fuse -o nonempty $AppDir=RW:/=RO /

I think it`ll work, but maybe not...
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Sun 24 Mar 2013, 17:00    Post subject:  

So you want tho mount the same puppy.sfs and devx.sfs on another mountpoint read-write to chroot into it,
create the application,
unmount these both .sfs
so only the application files and directories remain in the merged mountpoint,
run dir2sfs onto the mountpoint ,
[ mv the created application.sfs to a secure place ]
and finally unmount the main mountpoint .

A simple attempt by me would look like:

Puppy's filemnt had been a little stupid and refused to mount the same pup-xxx.sfs another time, but npierce had submitted a patch to use stat that was merged upstream and nowerdays that should be possible to mount pup-xxx.sfs and devx-xxx.sfs, copy their contents into the main mountpoint so the needed tools would be available when chroot ing into the main mountpoint. But that would need another free RAM of at least 1GB and more .
[/simple attempt]

To merge .sfs 'es, as it is done by Puppy, I would need to look into /init or shinobar's sfs_load to know how this exactly works with he mount option(s) . That would need only 250MB of free RAM i think.

Thierry, your idea is quite good to create a pristine environment without booting PUPPY to RAM, creating an application.2fs save-file, booting another time to load the devx by bootmanager and booting a third time so the environment finally is created.
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Sun 24 Mar 2013, 18:00    Post subject:  

Karl; The code scrap I showed is how to make a fuse union on /.
Some extra options may be needed to get it working:
Code:
unionfs-fuse -o  cow,allow_other,dev,nonempty $AppDir=RW:/=RO /

I see no reason it wouldn`t work over the top of aufs, in fact I`ve got it to work.
I have several apps. running no-union, fuse + chroot from AppDir style pkgs in Puppy.
The only difference is the union moint point is a dir. and not /.
Unioned on / means that chroot is not needed I think, / is already /.
I think the existing / being mounted as the bottom layer assures it will be visible.

UPDATE: Tried a test and it mounted without errors, but the unioned dir. doesn`t show.
Code:
unionfs-fuse -o cow,allow_other,dev,nonempty /root/0=RW:/=RO /

"mount" shows the fuse union on /, but dirs. /A and /B in /root/0 don`t show in /.
Code:
unionfs-fuse on / type fuse.unionfs-fuse (rw,nosuid,relatime,user_id=0,group_id=0,default_permissions,allow_other)

# ALSO: Tried "union & chroot" on /tmp/mnt/chroot, works of course.
Copied audacious to it and most of it shows, but /usr/lib became unaccessable.
This is pretty typical of trying to use chroot in Puppy, it`s damn unreliable.

If it won`t work, a new top layer can always be added to Puppy`s aufs union.
This is the easy way to do it and sure to work, but not good for other distros.


Unfortunately sfs_load only unions sfs files in aufs, not image files ( why? ),
I asked shinobar to add loading ext2, ext3, ext4, and btrfs image files also.

No word from shinobar, so I`m writing a general purpose fuse GUI tool in Bacon.
I guess it could check for aufs and use it, if no aufs then use unionfs-fuse.
.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Thu 28 Mar 2013, 15:18    Post subject:  

Karl; I settled on a simpler solution that I had I rejected earlier.

Linux seems to have no way to get dir.-file creation times, only modification.
So... Take a snap-shot of selected dirs., do the install and run the app.
Then take another snap-shot and list the added paths and files.

The GUI script I wrote was surprisingly simple and small.
It has a list variable for the selected dirs.: /etc, /var, /opt, /usr, $HOME

It`s a simple wizard type of GUI app.

1) It starts with an xmessage to take the first snap-shot.

2) A second xmessage pauses for installing the app.
... Install and run the app. so the app. creates it`s needed paths and files.

3) Then click the xmessage for the second snap-shot.
... A file is made of the paths and files the installed app. added to the selected dirs.

4) A third xmessage asks to remove the new paths and files ( uninstall the app.).

So for each app. that`s installed and run, a file named for the app. is
created that lists all paths and files that the app. adds to the selected dirs.

This is much simpler than messing with unions and chroot, and
it will work with any Linux O.S. no matter what type of install it is.

# Karl... Tell me what you think... Terry
.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Thu 28 Mar 2013, 16:22    Post subject:  

Thierry, I don't know much about fuse.
Dl it : fuse-2.8.4
and of course of lacking battery on the mobo,
i am slightly behind everything :
# date +%Y-%m-%d
2001-12-19
checking whether build environment is sane... configure: error: newly created file is older than distributed files!
Check your system clock

What do I need to mount -t unionfs-fuse ?
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2256

PostPosted: Fri 29 Mar 2013, 13:18    Post subject:  

Uh, why don't you just use src2pkg with the '-UNION' option to isolate that install content -and create the package for you to boot?
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5037
Location: Arizona, U.S.A.

PostPosted: Fri 29 Mar 2013, 13:59    Post subject:  

Karl; If I understand, you are trying to install unionfs-fuse?
Depending on which Puppy you use ( if you use it...), just get the parent distro`s binary file.
I`m using a Puppy based on Ubuntu`s Precise, I got it`s unionfs-fuse and it works fine.
NOTE: You`ll also need "fusermount" to unmount the fuse union.


BUT... The purpose of my last post seems to have been over-looked.
#### I ditched the union idea for simply tracking the file system changes.
No union or chroot hassles, works on any Linux distro., much simpler.


amigo; Your suggestion sounds interesting.
So does "src2pkg -UNION" look into the install layer`s mount point?
I`m guessing by the option`s name.
So a union is needed for the option to work?
.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [23 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0654s ][ Queries: 13 (0.0045s) ][ GZIP on ]