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 Thu 23 Jan 2020, 21:38
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Personal save file
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [25 Posts]   Goto page: 1, 2 Next
Author Message
jakobcornelis


Joined: 06 Nov 2007
Posts: 172
Location: Elliot Lake, Ontario

PostPosted: Thu 20 Oct 2016, 21:24    Post subject:  Personal save file
Subject description: What goes into the personal save file and what does not, and how is that decided?
 

What goes into the personal save file and what does not, and how is that decided?
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14724
Location: Gatineau (Qc), Canada

PostPosted: Thu 20 Oct 2016, 23:57    Post subject:  

Hello Jakob.

I believe the first paragraphs of this page will answer your question:
http://puppylinux.org/wikka/savefile. In particular,
Quote:
" The changes are anything modifying, adding-to or removing-from the linux
file structure (RootFS). This typically includes settings, installing new
applications, etc. It also includes anything saved in the ~ user directory
(usually root)."

As to "how is that decided", it is not, so to speak, except that Barry
Kauler, the inventor of PuppyLinux, made it that way. It is by design,
it is the Puppy concept. Basically:

You have on the one hand the main Puppy system (in the iso file that
you downloaded and installed) -- which is untouchable, undeletable
during your regular computer session, i.e. you cannot modify it except
by doing a remaster of it --,

and

on the other hand whatever apps you add or install, your country, time
and language settings, the configurations and caches of your programs,
and so on, which are saved in the personal save file (aka pupsave file).
Which is why it is preferable to create a larger pupsave file right from
the start.

There are finer points of course, such as the use of sfs files for larger
programs (e.g. LibreOffice or GIMP, etc.) to save on pupsave space, or
the use of a pupsave folder rather than of a pupsave file, but the two
items above are basically it.

IHTH.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3717

PostPosted: Fri 21 Oct 2016, 04:46    Post subject:  

The 'magic' is largely down to the use of a squashed filesystem (SFS). Which is a single file that contains a complete filesystem (Linux format (typically ext2 or ext3 or ext4)) and all of the files/directories (folders) contained within that. Much like how a zip file contains many files/folders. Unlike a zip file, a sfs file can be mounted as though it were a filesystem.

Once created SFS's are read-only (you can add/change them, but not when mounted as a filesystem). To accommodate changes typically a sfs is overlaid in memory. Such overlays are typically constructed using aufs or union mounting the sfs where the main sfs is at the bottom level and the memory union overlays that. So when something is read in, first the bottom layer is checked and then the memory layer is checked and that higher level takes precedence. If a file is in the sfs, but not in the memory layer then the sfs version is used. If the same file is in the sfs and memory layer then the memory layered file is used. If a file is in the sfs but there's a .wh file in the memory layer then that 'whiteout' file indicates that the file should be considered as having been deleted.

The save file (folder) is a disk stored copy of that higher layer ... the changes made. So that such changes can persist across reboots (otherwise the memory copy of changes are lost due to being in RAM). i.e. at the next reboot the sfs is loaded and the save folder content read into memory and union mounted with that sfs.

So anything in the original filesystem that is changed can have the changes persist across reboots. Things however can be more complicated than that. For instance you can layer multiple sfs's on top of each other, or use aufs instead of union layering, or be selective about what parts are preserved when you do save (flush changes recorded in memory to disk). What goes into the save folder is subject to what the developer wanted to be saved or not. For instance a save might exclude preserving temporary files, cache folder contents ...etc.

Anything outside of the sfs such as files stored on another partition are excluded from such layering.
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 3248
Location: Cradle of Humankind

PostPosted: Fri 21 Oct 2016, 05:25    Post subject:  

Basically all changes you make to the running system. The base sfs stays the same and is read-only.
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3717

PostPosted: Fri 21 Oct 2016, 07:40    Post subject:  

The bottom/lowest level doesn't have to be a SFS. For instance I run Debian Jessie stable as the bottom layer when I boot frugally (with overlays). That way the core system remains unchanged, all changes are recorded in memory only, lost at reboot. Which also means that rather than booting frugally I can also boot in full read/write mode ... like a fully installed version. I tend to only do that when updates from Debian become available. So the exact same unchanging (except for updates) core system booted each and every time. Any virus or whatever during a session lost/eradicated after a reboot.

In addition to that I do have a script that if run will flush the memory based recorded changes to disk (to make them persistent).

The structure of that is such that additional SFS's can also be loaded on top of a frugally booted.

In effect the base/main sfs is empty, everything is in the 'save file' on top of which the memory overlay takes care of changes.

Its handy for trying things out. Boot frugally, install/change things and a reboot has all of those changes 'undone'. Best of both worlds as Debian's repository is extensive and contains very stable programs. They also release security updates in a timely manner. The downside is it boot slower as reading from a compressed squashed filesystem is quicker than reading from raw/non-compressed disk based files.
Back to top
View user's profile Send private message 
jakobcornelis


Joined: 06 Nov 2007
Posts: 172
Location: Elliot Lake, Ontario

PostPosted: Fri 21 Oct 2016, 11:37    Post subject:  

Thanks, people. I can't claim to understand everything, but particularly the reference given by musher looks promising. So, back to the books. The reason for my question is covered, more or less, in http://www.murga-linux.com/puppy/viewtopic.php?t=108335.
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 4424
Location: West Lothian, Scotland, UK

PostPosted: Fri 21 Oct 2016, 12:33    Post subject:  

In my Puppies...
I generally arrange to have a "Save..." icon on the desktop...
And then disable auto-saving.
And then...
Arrange that at shutdown/reboot I'm asked whether I want "to save or not to save", with NO as the default.

Hence....
Session changes are only saved if I choose...
And only at a moment of my choosing.

Hence...
I have control over WHAT, if anything, gets saved, and WHEN.

e.g.
I could...
At the beginning of a session...
Make changes, and save those...
Then...
Make further changes, but NOT save these.
And reboot without saving during shutdown/reboot.

Hence...
Only the red changes above would be incorporated into the pupsave file.
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1883
Location: GERMANY

PostPosted: Fri 21 Oct 2016, 13:01    Post subject:  

As i experienced ...when running Puppys running even in "no save mode " .... and setting Pup Event Manager-Save-Intervals=0
(only saving on demand with save2flash ) .....when installing pets or installing from Packet_manager ........they are immediately saved to save-folder despite Pup Event Manager set to Save-Intervals=0.
Other changins will not be saved during session ...in this mode .
Does anyone know a trick to avoid this annoying behavior ?
Back to top
View user's profile Send private message 
Rattlehead


Joined: 11 Sep 2008
Posts: 367

PostPosted: Fri 21 Oct 2016, 17:59    Post subject:  

Regarding the pupsave, one good thing to know (at least I stumble upon it every time) is that some programs that store temporary data can get to grow very big, even to the extent of filling completely the pupsave file. When that happens, they generate that alarming red message that says "you are running out of space in your pupsave, please resize it".

Specifically, I'm thinking of the web browser's cache - i.e., the folder where the browser stores info needed for its work in process, for example when it's playing a video, etc...

So this is something that must be done pretty much every time you install a new Puppy, unless you start with a huge pupsave already: locating where is your browser's caché folder, moving that folder to some place with lots of free space outside /mnt/home, and then creating a link to that new folder in its former location - that way the caché will work as it used to, but will no longer drain the pupsave resources.

For the Mozilla family (Seamonkey, Firefox), the folder you have to move is called /root/.mozilla. I guess you can find that cache info somewhere in the menus of any web browser.

Hope somebody finds this useful, If I had known all this stuff in 2009 I would certainly have spared me a couple of tense moments Smile
Back to top
View user's profile Send private message 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Sun 23 Oct 2016, 02:49    Post subject: Do that when you get red alarm.
Subject description: browser plus cache often are why your pupsave is full
 

evrything goes in the pupsave, or nothing. But you can check it with treesize, and decide what to keep and what to delete. Do that when you get red alarm.
When you must include your own browser because your Puppy-maker decided to keep his ISO no too big, user pays it.
And of course empty the cache or set preferences at 30MB maxi in your browser, it's enough.
Screenshot : treesize shows what is included in Personal save file
Forum Topic about treesize, and other tools
cache.jpg
 Description   24MB will be enough
 Filesize   34.01 KB
 Viewed   917 Time(s)

cache.jpg


_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.

Last edited by Pelo on Wed 26 Oct 2016, 05:17; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger 
mikeslr


Joined: 16 Jun 2008
Posts: 3614
Location: 500 seconds from Sol

PostPosted: Sun 23 Oct 2016, 17:43    Post subject: Post subject  

I pretty-much use the same technique as sylvander. But to flesh that concept out, except on "first run" when I make my initial settings, load SFSes and install applications I know will work and not conflict with each other, I always shut down without Saving.

If, later, I find an pet or SFS I may want to use, I will install it or load it. Newly "installed" pets can be tested without Saving them to a SaveFile/Folder. Until a Save is performed it is only in RAM. Just restart-x AKA the graphical server. Usually, a newly loaded SFS will be functional without having to restart-x. Then, I'll test the new SFS or pet: see if it works or conflicts with some other application. If it's OK, I'll shut down without Saving. Then reboot and before doing anything else --especially like going online-- I'll re-install the pet and immediately Save. That way, nothing I do later or accidentally download while online is inadvertently Saved,

If the new pet wasn't OK, rebooting without Saving clears it from RAM and you boot into your system as it was before you tried the pet.

An SFS presents fewer problems, as only the links to it and its configuration files become a Saved part of your system. And those are removed when you unload the SFS. So the sole purpose of Saving after loading an SFS is to make such loading automatic on bootup. Functional SFSes which interfere with other applications can be loaded when you need them and unloaded after using them.

I should also add some info about documents. I never use /root/my-documents AS-IS. Rather, what I do is open two file manager window, one to /root and the other to /mnt/home (AKA dev_save). Place the mouse-cursor on /my-documents, left-press then drag it to /mnt/home and select "Move". Then place the mouse-cursor on the /mnt/home/documents folder, left-press and drag it back to /root and select Link(relative). This will create a symlink (like a short-cut in Windows) at /root to the folder now physically at /mnt/home and, thus, physically outside of your SaveFile/Folder.

Applications will "see" that folder as still being in /root and read and write to it automatically. So no Save is necessary to preserve your work.

You can, of course, setup other folders at /mnt/home either within or separate from /mnt/home/my-documents such as "my-vids", "my-music" and "my-notes". When its time to replace your Operating System, your data-files are already on /mnt/home, easily symlinked to your new Puppies /root.

There are several other files and folders originally in /root I think worth moving out of /root to /mnt/home. These files and folders are hidden. Using rox, left-click the "eye"; other file-managers will have a toggle from their menus. So I create a folder on /mnt/home named "my-stuff"; with multiple puppies, multiple folders named, for example, my-tahr32-stuff, my-slacko64-stuff etc.

The files I move are .cache, .mozilla, and .moonchild-productions. These are where internet web-pages and temporary files are "cached". If left in /root your RAM can quickly become filled. But remember, if those files/folders are in /root, they'll automatically be cleared on shutdown. If you've moved them to /mnt/home set your web-browsers to clear cache when you close those programs or remember from time to time to browse to the respective folders on /mnt/home and delete the unwanted files.


mikesLr.

Last edited by mikeslr on Fri 21 Apr 2017, 15:12; edited 1 time in total
Back to top
View user's profile Send private message 
proebler

Joined: 24 Jan 2012
Posts: 164
Location: TAS

PostPosted: Mon 24 Oct 2016, 05:49    Post subject:  

backi wrote:
Quote:
As i experienced ...when running Puppys running even in "no save mode " .... and setting Pup Event Manager-Save-Intervals=0
(only saving on demand with save2flash ) .....when installing pets or installing from Packet_manager ........they are immediately saved to save-folder despite Pup Event Manager set to Save-Intervals=0.
Other changins will not be saved during session ...in this mode .
Does anyone know a trick to avoid this annoying behavior ?

I have found the same behavior and to prevent it, have modified /usr/local/petget/installpkg.sh as shown:
Before: FLAGNODIRECT=1
After: FLAGNODIRECT=0
for Slacko-5.3.1 lines 87/88
for Slacko-5.5 lines 124/125
for Lucid-5.2.8 lines 94/95

I hope this helps
proebler
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1883
Location: GERMANY

PostPosted: Mon 24 Oct 2016, 06:24    Post subject:  

Hi proebler !
Thanks for your reply ..........did test it ........but no luck
...does not work for me .
Tested in Xenial Pup (frugal pupmode=13 )
Save interval setting=0(never) .
Back to top
View user's profile Send private message 
8Geee


Joined: 12 May 2008
Posts: 2120
Location: N.E. USA

PostPosted: Mon 24 Oct 2016, 13:22    Post subject:  

When you click on DOT cache file... what choices do you have, and what size are they?

For example when in slacko5.7 for the EEEPC this shows two files
dconfg
mozilla --> this one can get very large unless the mozilla browser is trimmed.

Regards
8Geee

_________________
Linux user #498913 "Some people need to reimagine their thinking."
"Zuckerberg: a large city inhabited by mentally challenged people."
Back to top
View user's profile Send private message 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Mon 24 Oct 2016, 14:01    Post subject: Pupsaveconfig helps a lot  

Pupsaveconfig helps a lot, for newbies, either you save your session or you don't. When you try some new apps or when you did an error, pupsaveconfig is very usefull. but the whole session is erased, you pupsave will start unchanged at reboot.
_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
Back to top
View user's profile Send private message Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 1 of 2 [25 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
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.0742s ][ Queries: 13 (0.0116s) ][ GZIP on ]