Page 1 of 5

Remove automatic pupsave for frugal installs

Posted: Sat 03 Nov 2012, 23:47
by jpeps
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
;;

Posted: Sun 04 Nov 2012, 02:36
by RSH
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.

8) 8) 8)

RSH

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

Posted: Sun 04 Nov 2012, 07:34
by Sylvander

Posted: Sun 04 Nov 2012, 16:25
by greengeek
Thanks all, nice summary. Just adding this to my list so I can find it again.

removing automatic pupsave file found

Posted: Sat 01 Dec 2012, 14:44
by bill
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."

Posted: Wed 13 Feb 2013, 17:31
by greengeek
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

call me lazy

Posted: Wed 22 May 2013, 02:22
by mcewanw
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: Select all

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

#!/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: Select all

#!/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.

Posted: Thu 30 May 2013, 17:56
by backi
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/

Posted: Thu 30 May 2013, 20:04
by Flash
Download somewhere? That's a big help :lol: You can't give us a URL?

Posted: Fri 31 May 2013, 09:01
by backi
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 .

Shinobar's pup saveconfig ?

Posted: Fri 31 May 2013, 11:21
by nancy reagan
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

Posted: Sat 01 Jun 2013, 07:14
by backi
Hi !

The script i mentioned above just shuts down without asking wether to save or not to save .
Faster ....

save or don't, renew with new changes

Posted: Thu 08 Aug 2013, 21:44
by duh
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

Re: Shinobar's pup saveconfig ?

Posted: Fri 09 Aug 2013, 01:12
by tlchost
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.

Posted: Sun 22 Sep 2013, 14:48
by Smithy

Code: Select all

#!/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: Select all

#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

Posted: Thu 31 Oct 2013, 18:39
by RSH
Smithy wrote:Would it be a good idea to put Musher's code before it to close any drives open though?
Yes, surely a good idea.

But something to think of:

- auto-unmount all ISO files in /mnt
- auto unmount all SFS and [2,3,4].fs files in /mnt
- Edit: not to forget to make a sync, to make sure cache is written to USB

Because you can not unmount a drive which contains an mounted ISO, SFS or save file. Do a sync first and then make sure to unmount SFS and save files first, because they could have been mounted from within a mounted ISO file.

I'm using/doing this automatically on every shut-down/reboot in my private LazY Puppy System/s.

Posted: Thu 31 Oct 2013, 21:38
by Smithy
Thanks for that info RSH.

Good ideas on those extra layers of mount, they confused me a few times in the past.

I know Lazy is a very slick modular system with various SFS available.

I have noticed that if I write something to a usb stick, and right click "unmount", puppy very graciously will not unmount the stick until it has finished the write that is in the cache. So that is handled very nicely.

My needs are simple.
After a big thread about shutdown, I have settled with a fast shutdown on the taskbar, and the "proper procedures" (save file etc) in the menu.

So far, the combination works a treat.

Posted: Fri 01 Nov 2013, 13:06
by mikeb
Because you can not unmount a drive which contains an mounted ISO, SFS or save file. Do a sync first and then make sure to unmount SFS and save files first, because they could have been mounted from within a mounted ISO file.
yes I added sort -r to the end of the unmount loop in puppy so loop mounted files get removed first but I mount them to /mnt/filemnt/.....
so no '+' so a different trick might be needed.

mike

menu.lst

Posted: Sun 10 Nov 2013, 01:18
by casearis
Have been following instructions, event handler is set to 0. No autosave... however i am having trouble locating the menu.lst file.

I know there is a pet somewhere which has "shutdown no save" option, just can't seem to find it again.

am using macpup 550

`case

Link to pet

Posted: Sun 10 Nov 2013, 01:27
by casearis