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 Tue 21 Aug 2018, 17:42
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Remove Auto Pupsave with SaveFolder? -- Questions
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
mikeslr


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

PostPosted: Thu 20 Nov 2014, 20:44    Post subject:  Remove Auto Pupsave with SaveFolder? -- Questions  

Hi All,

Perhaps this has been covered elsewhere? If so, could a link to the discussion be posted. The last post to the "Remove automatic pupsave for frugal installs" thread, http://murga-linux.com/puppy/viewtopic.php?t=81911, was on May 10, 2014, before the advent of the SaveFolder. I'm posting here because that thread is a "sticky" and posts to it may be overlooked.
If a discussion has already taken place, perhaps someone can post a link to it on that thread. If not, should this inquiry generate useful information, someone can later link this thread to it.
As I understand it --please correct me if I'm confused, my normal state-- a frugally installed Puppy operates as a "merged file system": merging in RAM, those applications written to the storage and loaded into RAM at bootup, those opened from storage media during operations, and those just existing in RAM. The default mode for running a frugal Puppy installed on a hard drive is PUPMODE=12. Running under Pupmode 12, a Puppy using a SaveFile will periodically save changes to settings, configurations and the files of newly installed applications to the SaveFile; that is write them to a storage media configured and identified as the Pup's SaveFile. Prior to such saving, those changes are only in RAM.
On the other hand, when a Pup is frugally installed to a USB-Key, its default mode is Pupmode 13. Running under Pupmode 13, a "Save" icon appears on the desktop [or elsewhere? for Pup without desktop icons?]. Unless the "Save" routine is executed, changes to settings, configurations, and applications "installed" are not written to the SaveFile; not even on shutdown. Running Puppy from a USB-key, Pupmode 13 has the obvious advantage of lessening "wear and tear" on such drive.
But Pupmode 13 can be used in a Frugal Install to a hard-drive. Basically, if you've screwed something up, or just wanted to try something without making it a permanent part of your system, Pupmode 13 enables you do do that. Simply don't execute a Save before shutting down.
Again, as I understand it --please correct me if I'm confused-- when a SaveFolder is employed changes are immediately, and automatically written to the SaveFolder if Pupmode 12 is in effect.
Can Pupmode 13 be used in conjunction with a SaveFolder?
If so, are the instructions provided by jpeps and/or sylvander on the above thread valid and sufficient? Or those provided by kleung21? http://www.murga-linux.com/puppy/viewtopic.php?t=13430.
If not, what additional actions must be taken.
Does it matter whether the Pup is using the original formulation for a SaveFolder or gyro's modifications which creates a Savefolder without 'mount -o bind'? http://www.murga-linux.com/puppy/viewtopic.php?t=95922

If Pupmode 13 can be used with SaveFolders, shouldn't it be the default mode? When a new Pet is installed, it will overwrite libs having the same name as those previously written to storage when an earlier application was installed. Wouldn't the later removal of such pet result in removal of all its libs, including the libs also needed by the earlier applications, thus breaking those applications?

Thanks,

mikesLr
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10888
Location: Charleston S.C. USA

PostPosted: Fri 21 Nov 2014, 04:23    Post subject:  

The newest versions of Puppy, like Tahrpup 6.0, have these options.

Set save interval to 0 to turn off auto save,

Select ask at shutdown so you will be asked if you want to save,
capture7716.png
 Description   
 Filesize   37.02 KB
 Viewed   1036 Time(s)

capture7716.png


_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
Sylvander

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

PostPosted: Fri 21 Nov 2014, 06:22    Post subject:  

@bigpup
1. That dialog says: "Currently, PUPMODE=13"...
a. What if the PUPMODE isn't 13?

b. Normally....
When I intend to hold my pupsave file on a partition on the internal HDD [somewhere other than a Flash Drive]...
I must edit the isolinux.cfg file within the ISO so that pmedia=ataflash.
This is done so that the pupsave [on the internal HDD] will be treated is if on a Flash Drive, and thence resulting in a "Save..." icon being displayed on the Puppy desktop. [PUPMODE=13]
Does the new method...
Or is there a way to make the new method...
Do the necessary without the need to edit the ISO file?

@mikeslr
My thoughts on some of your questions:
2.
a. "Unless the "Save" routine is executed, changes to settings, configurations, and applications "installed" are not written to the SaveFile"
That's only the case provided the "Save interval" has been reset to zero [0].
If not reset to zero, the Puppy will still auto-save during the session [at the "Save interval" set; default=30 (minutes)].

b. "...not even on shutdown"
No, this isn't true.
Even when running in PUPMODE=13, and even with the "Save interval" set to zero, the non-new Puppies would normally save at shutdown/reboot.
I normally make special changes, so I will be asked at shutdown/reboot whether I want "to save or not to save".
bigpup has displayed the new "Puppy Event Manager" dialog window, with its tick-box to configure that the user be asked at "shutdown" [and therefore reboot also], whether to "Save" or "no".

Regarding the SaveFolder:
c. "Can Pupmode 13 be used in conjunction with a SaveFolder?"
I too would like to know the answer to that question.

d. "If not, what additional actions must be taken."
Again...
I too would like to know the answer to that question.
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 1629
Location: Italy

PostPosted: Fri 21 Nov 2014, 10:12    Post subject:  

Test successfull. I copied the files of my standard lightencripted tahr savefile in a tahrsave-t6 dir and changed "atahd" with "ataflash" in the grub4dos entry. I can boot my install with the savefolder in pupmode 13. Setting to 0 the save interval appears the box to choose to save or not to save at shutdown. Booting with pmedia=atahd the pupmode is 12.
Back to top
View user's profile Send private message 
Sylvander

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

PostPosted: Fri 21 Nov 2014, 10:33    Post subject:  

I hope such stuff becomes standard in all future Puppies.

Isn't Puppy exciting! Very Happy

Unfortunately, I use a "live" install [pupsave used, booting CD-RW, no bootloader], so no grub4dos files.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11146

PostPosted: Fri 21 Nov 2014, 17:22    Post subject:  

Just for clarification

Pupmode=12 .. changes are instantaneous as they always have been...save folder behaves in exactly the same why...it just happens to occupy a real partition rather than an image file.

Any pupmode=13 saving does involve snapmerge(puppy) which does have some quirks... folder or save file again will not alter this... another point is having a save folder with mode 13 you would lose all that space for working in since you are limited to ram size minus system needs which sort of defeats the main point of the exercise with only the apparent gain of reducing flash writes IF on flash (which may only have been of value in the early days of flash memory)

Previously there was...or may still be saving to partition with ram layer... pupmode=7 ...perhaps this would be of interest to you.

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

Joined: 21 Jun 2009
Posts: 725
Location: Philadelphia, PA

PostPosted: Fri 21 Nov 2014, 19:38    Post subject: lose space!!??  

mikeb wrote:
having a save folder with mode 13 you would lose all that space for working in since you are limited to ram size minus system needs
Mike, I just started using a save folder (rather than save file) in Super Lucid Puppy 2 (by rerwin), pupmode 13.
I didn't realize there was a drawback, and I don't understand what you said; please excuse my dumbness.
Do you want to explain this alarming loss of working space so even I can understand?

Thank you,
Sheldon

_________________
Dell E6410: Xenial, etc
Dell Mini 9, Acer Aspire One, EeePC 1018P, PowerBook G4
Intel D865GBF, Intel DQ35JOE
Back to top
View user's profile Send private message 
mikeslr


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

PostPosted: Fri 21 Nov 2014, 21:16    Post subject: Observations>removing auto Pupsave with SaveFolder  

Thank you bigpup for the clear explanation, and sylvander for your further insights and corrections. Watchdog's above post reveals the need that a Pup's listing in Grub4dos menu.lst specify pmedia=ataflash for a Pup to run under Pupmode 13.

From my own exploration, I can only add the following:

1. With regard to a Pup's boot parameters, specifying that pmedia=ataflash sets Pupmode to 13, even if prior thereto its Pupmode was 12.
2. With Pupmode set to 13, a “Save” icon will appear on the desktop, even if Openbox is used as the window manager. As yet, I don't know if this holds true if xfce is the window manager.
3. Even when running under Pupmode 13, to avoid periodic or at-shutdown saves, follow bigpups's instructions regarding the settings in Pup EventManager's Save Session tab.
3. The radio box relating to “Ask at shutdown whether to save or not” and such inquiry will only appear on the Save Session tab if the Save interval is set to 0. If that radio box is checked, then during the shutdown process a dialog will be initiated asking whether you want “Save” or “No Save”.
4. If the desktop Save icon is clicked, the Save takes place immediately. That Save routine is independent of the Save-at-Shutdown routine. This is important as it enables you to save some changes, continue working and later shutdown without saving any other changes.
5. Although a Save icon will appear on the desktop if you run Openbox, there is no menu entry for it because it has no .desktop file in /usr/share/applications. That means, it also can't be added to lxpanel a should you decide to remove the desktop icon. Doing that will leave you without an observable means of invoking a save. To overcome this, I created a Save-Session pet which had a menu entry.*
6. One limitation I discovered involved libreoffice. I used libreoffice writer to keep track of the changes I was making, and the consequences of those changes. This document was saved in a folder on /mnt/home. Even though I closed that libreoffice document before shutting down –whether or not I chose to save using any method-- on bootup when I attempted to open that document libreoffice opened in its “document recovery mode”. The document was successfully “recovered” and was complete. It always included my last entry in its entirety. This seems to be a “timing” problem –how much time does libreoffice need to (a) save changes to a document; (b) up-date its records that such changes were made; and then (c) completely shut down? If after I closed the document I waited a couple of minutes, maybe two, before shutting down the document opened normally on reboot. Consequently, it may effect other applications that are slow to completely shut down.
7. It may just be my impression, but bootup seems to take longer when running Pupmode 13 than when running Pupmode 12.

Changing the boot parameter between atahd and ataflash establishes whether a Pup will operate under Pupmode 12 or 13. With the exception of being able to switch from Pupmode 12 to Pupmode 13, all my experiments were run under Pupmode 13. Does anyone have experience under Pupmode 12 with setting Pup Event Manager, Save Interval to 0 (=Never), and clicking the radio box relating to “Ask at shutdown whether to save or not”? or leaving it blank? With those settings, is there a practical difference between these Pupmodes?

mikesLr

Written before mikeb's post, which I haven't fully digested, yet. It seems to answer my questions regarding running under Pupmode 12. But his statement "another point is having a save folder with mode 13 you would lose all that space for working in since you are limited to ram size minus system needs" runs counter to my frequently erroneous understanding. That understanding was that all actual changes take place in RAM. But if RAM is insufficient to hold all the necessary information it will cache some information to a Swapfile, if present. If a Swapfile is not present it will write/cache those changes to a storage medium, whether that storage medium is the unused space in a SaveFile of designated size or an expandable SaveFolder. But, if this last statement is in error, than the "usable" space for work is limited to RAM and Swapfiles. And whether a SaveFile or SaveFolder is being used would be irrelevant.
My computer does not have a Swapfile. It has 3.5 Gbs of RAM. As I stored data outside my SaveFiles, used SFSes and external Program Folders, my SaveFiles rarely exceeded 512 Mbs. At one time, running under Pupmode 12, I tried to install Dragon Naturally Speaking into wine and received a warning that I had run out of "Space." Increasing my SaveFile, I was able to install it. Although it didn't run, this suggests that the size of the SaveFile was significant to available work space. The foregoing is just one example. Trying to mangle 80-odd debs into an SFS was another. And a remaster a third. There may have been others.
Edited about an hour later:
Actually, unless I'm mistaken, the choice of creating a SaveFolder rather than a SaveFile is only available if a Linux partition is first selected. SaveFiles are Linux structures. And even under Pupmode 12, using a SaveFile, most build procedures can take place outside a SaveFile, but only on a Linux formated partition.

* Having a menu entry involves three files: the application's executable, optionally an icon, and a .desktop file in /usr/share/applications. The .desktop file includes arguments specifying the applications executable and the icon associated with it. Right-clicking the Save icon on the desktop , then clicking “show location” revealed that its executable was /usr/sbin/save2flash. Browsing to that file revealed it to be a script. I don't know how to link an icon so that one from the current theme would always be used and as I was then running the Ardis icon theme, I used Ardis' save48.png which I copied to /usr/share/pixmaps. Then I opened /usr/share/applications/ PuppyEventManager desktop, Saved it with the name “Puppy Save Session” and edited all its arguments except “category.” Most importantly, I changed the argument for executable to /usr/share/sbin/save2flash; and the argument for its icon to /usr/share/pixmaps/save48.png. Using those files I created a pet. Even though the resulting pet only consisted of an icon, and a text file surrounded by a couple of folder designations, it exceeded the forum's size limitations for uploaded. Ergo, these instructions rather than the pet.
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 1629
Location: Italy

PostPosted: Sat 22 Nov 2014, 02:56    Post subject: Re: Observations>removing auto Pupsave with SaveFolder  

mikeslr wrote:

Changing the boot parameter between atahd and ataflash establishes whether a Pup will operate under Pupmode 12 or 13. With the exception of being able to switch from Pupmode 12 to Pupmode 13, all my experiments were run under Pupmode 13. Does anyone have experience under Pupmode 12 with setting Pup Event Manager, Save Interval to 0 (=Never), and clicking the radio box relating to “Ask at shutdown whether to save or not”? or leaving it blank? With those settings, is there a practical difference between these Pupmodes?


On my experience under pupmode 12 the save interval setting is ineffective and does nothing. Changes are immediately written to savefile or savefolder and you are not asked at shutdown to save or not to save.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11146

PostPosted: Sat 22 Nov 2014, 04:08    Post subject:  

Sheldon.... the limitation is only applicable if you have forced mode 13 (or on usb stick?)

And mikesir... related reply.... well in your case you have a ton of ram so you are hardly limited I would say. If someone was doing this with say 512MB RAM and no swap then life starts to get cramped...it was just a general warning for anyone considering tinkering.

Yes the space is dependant on RAM (plus swap if present if included) but not the save file/folder. The periodic saves do not empty the RAM (though was claimed it would one day) so there is no caching. The idea was that the current session is all in ram and your persistent save is only used periodically and at the end if at all. df -h should show tmpfs space remaining.

Cannot think why 13 would be slower.... only difference is the creation and insertion of the tmpfs layer for pup_rw. Usually slowdowns are associated with reading and writing to usb sticks.

I use sfs saves so the tmpfs/ramdisk/pup_rw is saved as one sfs file and loaded back at boot...with 1GB+ this works nicely and is a much simpler option since you are effectively running in PUPMODE=5 and not saving is easy to implement. Perhaps one day someone will pick up that method...someone like debian has I believe now but don't quote me. It also avoids snapmerge altogether and still gives usb sticks an easy time like mode 13 plus you can remove the stick and keep running assuming sufficient ram.


The save folder is the method that Slax has always used...I added it to puppy 2.12 as a test and it worked nicely so have it on all my pups. It just gives the flexibility of a full install but the robustness and flexibility of a layered sfs based system. Never really considered the mode 13 since i find sfs save does the job...but an interesting option.
Yes it has to be a posix file system...ext2/3/4, reiserfs, xfs and so on...if supported..does also mean its easy to access from another system if you want files or need to fix.

Mike
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
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.0822s ][ Queries: 13 (0.0091s) ][ GZIP on ]