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 26 Oct 2014, 01:24
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Remove automatic pupsave for frugal installs
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sat 03 Nov 2012, 19:47    Post_subject:  Remove automatic pupsave for frugal installs  

For anyone who is having having trouble locating this information, I'll post it. I've never liked automatic saving, and for frugal installs gaining control involves tricking the system into believing you're running a flash drive (i.e, switch to pupmode 13), altering rc.shutdown so that it asks whether you want to save, and setting the events manager save time to "0" (don't save).

1. set the Utilities/PupShutdownManger/Manage System Events/Save Session dialogue to "0" (no save).

2. change in menu.lst: change pmedia=atahd to ataflash.

3. change in /etc/rc.shutdown

13) #PDEV1 and PUPSFS and PUPSAVE
#/initrd/pup_rw has tmpfs, pup_ro1 has ${DISTRO_FILE_PREFIX}save.2fs file (PUPSAVE), pup_ro2 has PUPSFS file.
#the above are in unionfs at /.
dialog --yesno "Save session?" 0 0 >/dev/console
if [ $? -eq 0 ]; then
echo "Saving session to $SAVEFILE (${SAVEPART})..." >/dev/console
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
fi
;;
Back to top
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Sat 03 Nov 2012, 22:36    Post_subject:  

Yes, this should be sticky.

I have at least two or three times explained exactly this to someone on the forum. Can't find the thread.

Cool Cool Cool

RSH

Very Happy I've found one of these threads: ---> Here is the last thread of this Very Happy

_________________
LazY Puppy
RSH's DNA
SARA B.

Edited_time_total
Back to top
View user's profile Send_private_message 
Sylvander

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

PostPosted: Sun 04 Nov 2012, 03:34    Post_subject:  

1. Here's an explanation of how I do it [items 1 to 4 in the linked list].
And...

2. How to prevent the resulting spurious warning as a pupsave installation of Puppy boots, that the previous shut-down was improper.
And...

3. This, to make the default=no->[don't save] in the shutdown dialog.
Back to top
View user's profile Send_private_message 
greengeek

Joined: 20 Jul 2010
Posts: 2596
Location: New Zealand

PostPosted: Sun 04 Nov 2012, 12:25    Post_subject:  

Thanks all, nice summary. Just adding this to my list so I can find it again.
Back to top
View user's profile Send_private_message 
bill

Joined: 28 May 2008
Posts: 495

PostPosted: Sat 01 Dec 2012, 10:44    Post_subject: removing automatic pupsave file found
Sub_title: unknown original poster and where on this site ?
 

If you make the 3 edits below, these 3 changes happen:
1. Session changes can still be saved at any time by clicking on the "Save" bullseye icon.
2. Session changes will not automatically save at shutdown.
3. At startup, you will get a warning message which says "X seems to have exited uncleanly the last time you ran puppy..." but no harm is done, just the changes you did not deliberately save are lost.
- - Click on "Ignore" and you will be in Puppy as it was at shutdown.

The lines to edit:
1. Open the console and type "geany /etc/rc.d/rc.shutdown" without quotes.
- - This opens the shutdown code for editing
2. Type cntrl f to search for "/usr/sbin/snapmergepuppy" without quotes.
- - /usr/sbin/snapmergepuppy is in my unaltered installation 3 times,
- - at line 817, line 847, and line 853.
3. Comment out each line that has it by typing #myrem in front of that line. The # sign alone comments it out, but use #myrem so you can find it later if you need to. Smile

So for each line (3 of'em) that originally said
/usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw
you now have
#myrem /usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw

4. Save the file.

5. Added Feb 22 (should have been in this post from the start):
"Go to "Menu->System->Puppy Event Manager->save session->save Interval",
and set the value to zero [actually 0] minutes, and OK that."
Back to top
View user's profile Send_private_message 
greengeek

Joined: 20 Jul 2010
Posts: 2596
Location: New Zealand

PostPosted: Wed 13 Feb 2013, 13:31    Post_subject:  

Also, here is an interesting historical post that may offer some extra ideas/links if the above doesn't cover whats needed:
http://www.murga-linux.com/puppy/viewtopic.php?t=39717
Back to top
View user's profile Send_private_message 
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Tue 21 May 2013, 22:22    Post_subject: call me lazy  

I decided today that I didn't want automatic pupsaving, so I searched the forum and found this thread amongst others.

Anyway, I didn't really want to mess up any system scripts or use any PUPMODE tricks and so on. As an admittedly simplistic and crude alternative I simply stuck the following line in my /etc/rc.d/rc.local to disable pupsaving altogether (unless re-enabled as shown later):

Code:

[ -e /usr/sbin/snapmergepuppy ] && mv /usr/sbin/snapmergepuppy /usr/sbin/snapmergepuppyBKUP


Then, when I want things to autosave normally again, I simply rename snapmergepuppyBKUP back to snapmergepuppy (or use a simple script to toggle between the two). Seems to work so posting this in case anyone else finds it useful.

Prevent saving to pupsave (pupsave_no script, which I have a shortcut to on my desktop):
Code:

#!/bin/sh
[ -e /usr/sbin/snapmergepuppy ] && mv /usr/sbin/snapmergepuppy /usr/sbin/snapmergepuppyBKUP


Allow saving to pupsave (pupsave_yes script, which I have a shortcut to on my desktop):
Code:

#!/bin/sh
[ -e /usr/sbin/snapmergepuppyBKUP ] && mv /usr/sbin/snapmergepuppyBKUP /usr/sbin/snapmergepuppy


EDIT: As well as the above method of preventing unwanted pupsaving I also install my .wine directory and .mozilla directory to /mnt/home and use relative symlinks back to /root to these. I am then able to use a very small pupsave (32M), which is simpler to backup, faster to boot with and much faster to shutdown. This is with Slacko 533 frugal installation on FAT32 formatted usb stick.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send_private_message Visit_website 
backi

Joined: 27 Feb 2011
Posts: 448
Location: GERMANY

PostPosted: Thu 30 May 2013, 13:56    Post_subject:  

Hi
For Puppy Precise And Raring !

Found another solution not to save to USB Flash without ruining PPmanager „ for Puppy Precise and UPUPS raring .

1.Download somewhere the script „nosaveshutdown „ make it executable .

2. Goto Puppy Event Manager > Save Session > Save interval (0=never )
Save to flash....Restart
Install petget20120418.pet from


Save to flash ..restart
Now you can install pets debs or downloads from PPmanager ..if you like to keep them
either use „save2flash „ during session wihout shutting down ,
or saving session at shutdown ..just shutdown asusual.

In case you dont want to save Changes /session ...just execute the script above „nosaveshutdown“ . Nothing will be saved to Flash .This works for me on Precise Puppy 5.6 . , Rarung .

Install petget20120418.pet from

http://shino.pos.to/linux/puppy/
Back to top
View user's profile Send_private_message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11122
Location: Arizona USA

PostPosted: Thu 30 May 2013, 16:04    Post_subject:  

Download somewhere? That's a big help Laughing You can't give us a URL?
Back to top
View user's profile Send_private_message 
backi

Joined: 27 Feb 2011
Posts: 448
Location: GERMANY

PostPosted: Fri 31 May 2013, 05:01    Post_subject:  

Hi Flash !

Here is the script for " no save at shutdown " .

#!/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 ] && rm /initrd/pup_ro1/etc/.XLOADED && rm /etc/.XLOADED
exec /bin/busybox poweroff

Copy this text to geany or leafpad ----save it as for example in root as " Shut down without saving "--------- right click on this saved file ----goto Properties-----tick .....Exec.....refresh .
Now you can execute this script by clicking on it .. You could decorate with a nice icon too.
After you have done the steps i described before .

Edited_time_total
Back to top
View user's profile Send_private_message 
nancy reagan

Joined: 22 Jan 2009
Posts: 513

PostPosted: Fri 31 May 2013, 07:21    Post_subject: Shinobar's pup saveconfig ?  

I use Shinobar's "pup saveconfig"-pet for ages in lupu. Not sure about precise and raring though.

http://murga-linux.com/puppy/viewtopic.php?t=60678
Back to top
View user's profile Send_private_message 
backi

Joined: 27 Feb 2011
Posts: 448
Location: GERMANY

PostPosted: Sat 01 Jun 2013, 03:14    Post_subject:  

Hi !

The script i mentioned above just shuts down without asking wether to save or not to save .
Faster ....
Back to top
View user's profile Send_private_message 
duh

Joined: 10 Dec 2006
Posts: 19

PostPosted: Thu 08 Aug 2013, 17:44    Post_subject: save or don't, renew with new changes  

Hi,
I had the wish to construct a toggleSave/NOsave command what
succeeded in the loss of the 1st line of PUPSTATE (etc/rc.d/..)
Now savingcommand open the yellow offers of saving or nosaving.
(what means a brandnew savefile with evtl. changes or notsaving shutdown )

Now I tried this crazy idea with deleting the PUPSTATE file what
ended in the same result as said above.

So if I want to save the original savefile I change by hand
the PUPMODE=13 to PUPMODE=5 in pupstate's 1st line what activates
the original save procedures.

Following is often said before:
Before the first saveprocedure "Pup event manager" saveinterval should have been set to 0 (zero)
to prevent unwanted savings.
In the menu.lst PMEDIA=atahd or =usbhd I changed it to ataflash/usbflash
To avoid DESTOPlosses I make copy of /Choices/ROX-Filer/PuppyPin just before saving.
I practice this since nearly one year without noticed issues.

IF there is heavy protest to this ugly procedure do not answer here but send me a short PM
in plain english, so I have the chance to delete this post aslong it is unwanted.
greetings
duh
Back to top
View user's profile Send_private_message 
tlchost

Joined: 05 Aug 2007
Posts: 1727
Location: Baltimore, Maryland USA

PostPosted: Thu 08 Aug 2013, 21:12    Post_subject: Re: Shinobar's pup saveconfig ?  

nancy reagan wrote:
I use Shinobar's "pup saveconfig"-pet for ages in lupu. Not sure about precise and raring though.

http://murga-linux.com/puppy/viewtopic.php?t=60678


Yep...works in both Precise and Raring....and the other advantage is that yoiu can save if you want to.
Back to top
View user's profile Send_private_message Visit_website 
Smithy


Joined: 12 Dec 2011
Posts: 448

PostPosted: Sun 22 Sep 2013, 10:48    Post_subject:  

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 ] && rm /initrd/pup_ro1/etc/.XLOADED && rm /etc/.XLOADED
exec /bin/busybox poweroff


Backi's script works good..bam, it shuts down. But the No bit could close the dialogue and not shut down?

Would it be a good idea to put Musher's code before it to close any drives open though?

Code:
#PREPARATION - unmount devices already mountd during boot
sleep 2
# ~/my-applications/bin/umount-only-disks.sh
####Musher0 code to unmount only disks
df -H -T -x squashfs -x tmpfs -x rootfs -x aufs -P | grep "/mnt/s" | cut -f2 -d'm' > spc_dsq.txt
while read line
do
umount /m$line
done < spc_dsq.txt
rm -f spc_dsq.txt
sleep 2
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   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:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1061s ][ Queries: 12 (0.0183s) ][ GZIP on ]