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 Sun 20 Apr 2014, 12:29
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
HOWTO stop puppy from saving when shutting down.
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
bilko1808

Joined: 03 Apr 2011
Posts: 17

PostPosted: Thu 21 Apr 2011, 14:05    Post subject:  HOWTO stop puppy from saving when shutting down.
Subject description: The most simple method. (with puppy booting from USB)
 

It took me ages to find a simple solution without being referred to posts many years old, not knowing if they work on the version that you have got, editing files etc.

This is for booting puppy from USB, until further tests are carried out not sure what effect it will have on other methods of running puppy.

If you don't want to save when you power down or reboot your system use the following.

I really hope I've made this simple enough for even beginners like me to understand what and how to do it.

Works for Puppy 5.2 and 5.2.5 (probably works for other versions but haven't test it)

POWEROFF

Navigate to a folder of your choice (I used "my-applications")
Create a new script (right click in blank space in folder, select New >> Script, name it poweroff)
Right click on your poweroff script >>> open as text

Copy and paste the following into it:

Code:
#!/bin/sh

# skips rc.shutdown and powers off computer without saving the session.
Xdialog --title "script $0" --yesno "\n\nAre you sure to power-off computer WITHOUT saving?\n\n" 0 0
[ $? -eq 0 ] && exec /bin/busybox poweroff


Click Save then exit the file.
Right click poweroff file >>> Set Icon, get a suitable Icon for it.
Drag it to your desktop to create a link to it.


REBOOT

Follow same steps as above except call the file reboot, and copy the following into the reboot script instead.

Code:
#!/bin/sh

# skips rc.shutdown and reboots computer without saving the session.
Xdialog --title "script $0" --yesno "\n\nAre you sure to reboot computer WITHOUT saving?\n\n" 0 0
[ $? -eq 0 ] && exec /bin/busybox reboot


IMPORTANT

Click the SAVE bullseye now or you will lose the file/s you just made.

CREDITS

Thanks to MochiMoppel for the scripts. They were found at the end of a second page so I thought I would post them as a HOWTO so they should be found a lot easier.

Last edited by bilko1808 on Thu 21 Apr 2011, 17:32; edited 4 times in total
Back to top
View user's profile Send private message 
shadower_sc

Joined: 21 Apr 2010
Posts: 111
Location: Texas

PostPosted: Thu 21 Apr 2011, 15:11    Post subject: Woot! :-)  

I will have to test this out. It looks much simpler than editing the /etc/rc.d/rc.shutdown file.

(Referring to the rc.shutdown file.)
I comment out lines 628 - 732 in Lucid Puppy 5.2, and lines 630 - 735 in Lucid Puppy 5.2.5. As far as I can tell this keeps Puppy from saving on shutdown when your first boot. I think it should still save the Puppy Save file, if you already have a Puppy Save file.
Back to top
View user's profile Send private message 
bilko1808

Joined: 03 Apr 2011
Posts: 17

PostPosted: Thu 21 Apr 2011, 15:21    Post subject:  

This I what I use, it only stops the save.

If i want to save I just use the desktop save bullseye, or shutdown/reboot via the Menu.

Using either of these scripts stops puppy from automatically saving, but it will carry on saving if you have got it set to save at intervals in the:

Menu->System->Puppy Event Manager->save session->save Interval

I have the save interval set to 0 so it only saves if i save via bullseye or normal menu shutdown/reboot method.
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10522
Location: SwedenEurope

PostPosted: Thu 21 Apr 2011, 16:39    Post subject:  

Bilko thanks indeed for that one. it is late here now so have no much time. I test this tomorrow on many puppies in frugal install to see what happens.

Much appreciated you spend those two hours. I try to find the link to it tomorrow. 10.40 now so feel too tired Smile

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
bilko1808

Joined: 03 Apr 2011
Posts: 17

PostPosted: Thu 21 Apr 2011, 16:45    Post subject:  

It's the scripts I use for puppy booting from USB, no idea what effect it will have on frugal install. Will edit my first post to include that its for me with puppy running from usb.

Post back and let me know how it goes so I can include it in the first post.

Thanks
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10522
Location: SwedenEurope

PostPosted: Thu 21 Apr 2011, 16:52    Post subject:  

The frugal install has another pup state so it has no such save button.
Sergey below explains what happens

Bilko you are right about the usb flash thing and HDD another thing indeed.

Here is Sergey confirming it
http://murga-linux.com/puppy/viewtopic.php?p=501767#501767

Quote:

Setting pmedia=usbflash does not work in the latest Puppy
versions I use -- Lighthouse 500-G, Quirky 1.4, Wary5.1.1

Puppy doesnt boot: can't find media -- it must be looking
for a USB something, because it spends some time looking.

I'm using Grub so I applied your suggestion in menu.lst and
tried all variations in syntax based on Grub's README,
For example, on kernel line using (hd0,1)/quirky140.

My method of setting PUPSTATE=5 described in my earlier post
has worked in Lighthouse, Quirky, and Wary for months for me.
It's easy although lacking the characteristic s-m-o-o-t-h,
elegance of Puppy operations. (link to that post by Sergey here
http://murga-linux.com/puppy/viewtopic.php?p=497931#497931 )

BTW, Wary 5.1.1 is very fast to reboot, which saved me
lots of time as I rebooted dozens of times for these
experiments.


Bilko I maybe found the source look here

http://www.murga-linux.com/puppy/viewtopic.php?p=497814#497814
or else use the search i nmy sig and put in from the hashed comments to find it
Edit forget about the link I gave to another thread. it is about SFS-exec and
I must have misunderstood the English of Jasper due to I am not a native user of the language.

Thanks Bilko, I am looking for a solution that works for frugal on HD NTFS at that but it is late at night now so I pull the plug for today. Smile

_________________
I use Google Search on Puppy Forum
not an ideal solution though

Last edited by nooby on Thu 21 Apr 2011, 17:28; edited 1 time in total
Back to top
View user's profile Send private message 
bilko1808

Joined: 03 Apr 2011
Posts: 17

PostPosted: Thu 21 Apr 2011, 17:25    Post subject:  

Thanks, that's the post I got it from, didn't fancy trawling through loads of threads until I found it again.
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10522
Location: SwedenEurope

PostPosted: Fri 22 Apr 2011, 05:19    Post subject:  

Sorry me so dense

If I get it at all what you describe works if one have the pupsave on usb but not on hdd?

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Fri 22 Apr 2011, 15:28    Post subject: Re: HOWTO stop puppy from saving when shutting down.
Subject description: The most simple method. (with puppy booting from USB)
 

bilko1808 wrote:
If you don't want to save when you power down or reboot your system use the following.

You've made it more complicated than it should be and also possibly harmful... shutting down involves more than just saving to the pup_save: there are services to shut down properly, some kernel modules to unload etc. and without some of those things some computers might hang.

I mentioned this on another thread a couple of months ago:
- edit /etc/rc.d/rc.shutdown, to comment out the relevant line where snapmergepuppy is run (you want the PUPMODE 13 case, but you could just as well comment out all the instances of snapmergepuppy)
- where you commented out snapmergepuppy, add a line:
Code:
[ -f /initrd/pup_ro1/etc/.XLOADED ] && rm /initrd/pup_ro1/etc/.XLOADED
this is needed so there won't be a problem with X starting at next boot.

This will completely disable saving at normal shutdown. If you want to give a dialog with an option to choose, just make it run snapmergepuppy if the user chose to save, then continue with the shutdown as usual...

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10522
Location: SwedenEurope

PostPosted: Fri 22 Apr 2011, 17:04    Post subject:  

Dougal but would that work for frugal install on HDD too?
One need to go into initrd.gz and change lines there so it accept to be pupmode 13?

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sat 23 Apr 2011, 14:23    Post subject:  

nooby wrote:
Dougal but would that work for frugal install on HDD too?
One need to go into initrd.gz and change lines there so it accept to be pupmode 13?

I'm pretty sure I mention this in the post I linked above: adding pupmode=13 to the bootloader entry should solve that.

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10522
Location: SwedenEurope

PostPosted: Sat 23 Apr 2011, 15:35    Post subject:  

Oh is it that easy? pupmode=13 on kernel line doing grub4dos boot?

I forgot to tell you that I am on NTFS and others have failed to get pupmode 13 going on NTFS without rewriting initrd?

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
bilko1808

Joined: 03 Apr 2011
Posts: 17

PostPosted: Sat 23 Apr 2011, 19:31    Post subject:  

Thanks Dougal. i totally failed when editing the rc.shutdown. among many of the pages i read one of them suggested it's a bad idea to alter system files such as rc.shutdown. i've run out of internet credit for now but will have a go at further research once i get some more.
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10522
Location: SwedenEurope

PostPosted: Sun 24 Apr 2011, 02:32    Post subject:  

But one sure way would be to do as Seaside does.
To first make a pupsave file with the prefrences one want and need and then change that one into a zq142332.sfs file and such get loaded at boot but they don't get written to. that way one keep the preferences but have no savefile to save to.

what can go wrong there? Maybe that it only works on ext3 or fat32 usb?
I don't remember but it is worth a try. having no pupsavefile would be rather safe from errors like installing apps that one later want to scrap and this way they don't add to a growing save file.

instead one learn to make sfs and can load then on the fly without rebooting. Very fast loading of such sfs files.

The only bad thing is that the bookmarks fails so one need to place them in the cloud or come up with them in html files that one load or something.

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 878

PostPosted: Sun 24 Apr 2011, 11:15    Post subject:  

nooby wrote:
But one sure way would be to do as Seaside does.
To first make a pupsave file with the prefrences one want and need and then change that one into a zq142332.sfs file and such get loaded at boot but they don't get written to. that way one keep the preferences but have no savefile to save to.

what can go wrong there? Maybe that it only works on ext3 or fat32 usb?
I don't remember but it is worth a try. having no pupsavefile would be rather safe from errors like installing apps that one later want to scrap and this way they don't add to a growing save file.

instead one learn to make sfs and can load then on the fly without rebooting. Very fast loading of such sfs files.

The only bad thing is that the bookmarks fails so one need to place them in the cloud or come up with them in html files that one load or something.


Nooby,

As you discovered, there are some limitations to using a zdrive sfs instead of a savefile.

I think you can make a harddisk frugal install that will create a "pupstate=13" by using "pmedia=ideflash". Pmedia=usbflash apparently limits the search to usb media only- resulting in puppy files not found.

Please try it out.

Regards,
s
Back to top
View user's profile Send private message 
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 » HOWTO ( Solutions )
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.0839s ][ Queries: 13 (0.0106s) ][ GZIP on ]