guess_fstype reports unknown for Puppy SFS files. [ No Fix ]

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#16 Post by Karl Godt »

Then I would try to create a second temporary folder
ie

Code: Select all

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 ?

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

#17 Post by sunburnt »

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...

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#18 Post by Karl Godt »

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.

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

#19 Post by sunburnt »

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: Select all

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: Select all

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: Select all

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.
.

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

#20 Post by sunburnt »

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
.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#21 Post by Karl Godt »

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 ?

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#22 Post by amigo »

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?

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

#23 Post by sunburnt »

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?
.

Post Reply