| Author |
Message |
Pizzasgood

Joined: 04 May 2005 Posts: 6270 Location: Knoxville, TN, USA
|
Posted: Tue 03 Oct 2006, 17:59 Post subject:
SavePuppy - click to save session (to USB only) |
|
This is a roxapp for people with Puppy installed to usb (or who are otherwise in pupmode 13 for some reason, like me). As you may know, Puppy will not save back to the usb continuously in order to preserve its life. What it does is save every thirty minutes and when you reboot. But what about if you just did something important? That's what this is for. If you click it, it will save your Puppy immediately.
This will install to /root/my-roxapps/SavePuppy. To uninstall, just delete it. Simple as that.
SavePuppy.pup
Note: This is NOT for multisession. It is for USB and mode 13. Check /etc/rc.d/pupstate (or pupmode with older Puppies) to check your mode.
EDIT: updated on 2-04-2007 with cleaned-up code and a better sanity check. The old one will still work just fine, don't worry about upgrading.
_________________ Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Last edited by Pizzasgood on Sun 04 Feb 2007, 20:32; edited 3 times in total
|
|
Back to top
|
|
 |
pmshah
Joined: 31 Aug 2006 Posts: 84 Location: India
|
Posted: Sun 08 Oct 2006, 09:06 Post subject:
Don't need to worry |
|
The flash memory chips are supposed to allow you a minimum of 50,000 cycles of erase & rewrite. A least that is rthe specification I gor with my toshiba nedia with Casio digicam.
At this rate unless one goes overboard with it your USB drives should last you at least for 4-5 years.
|
|
Back to top
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9846 Location: Arizona USA
|
Posted: Sun 08 Oct 2006, 11:00 Post subject:
|
|
50,000 would be a very conservative minimum guarantee. From what I've been able to find, flash memory typically lasts 100,000 cycles before it begins to fade, and doesn't become useless until it has been written to and erased a million times.
One way flash memory is superior to a hard drive is that it fails slowly due to gradually increasing errors, rather than suddenly with a loud screech and a puff of smoke.
|
|
Back to top
|
|
 |
Pizzasgood

Joined: 04 May 2005 Posts: 6270 Location: Knoxville, TN, USA
|
Posted: Sun 08 Oct 2006, 16:48 Post subject:
|
|
Then you take into account that that is for each sector, not the entire thing as a whole. So my new 1GB flash Ogg-player will last for 100 terabytes of data before it starts to degrade (no, I haven't installed Puppy to it. I considered it, but I need the entire gigabyte for music)
_________________ Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

|
|
Back to top
|
|
 |
vern72023
Joined: 26 Dec 2005 Posts: 158 Location: Jacksonville Fl
|
Posted: Sun 22 Oct 2006, 10:42 Post subject:
|
|
i like this little app - but modified it by adding the following 2 lines just prior to the save current session
#Backup Puppy
cp /mnt/home/pup_save.3fs /mnt/home/pup_save.bak.3fs
that way i get a backup in case i really messup
_________________ george
|
|
Back to top
|
|
 |
Dougal

Joined: 19 Oct 2005 Posts: 2505 Location: Hell more grotesque than any medieval woodcut
|
Posted: Mon 23 Oct 2006, 10:25 Post subject:
|
|
| vern72023 wrote: | #Backup Puppy
cp /mnt/home/pup_save.3fs /mnt/home/pup_save.bak.3fs
that way i get a backup in case i really messup |
You should probably make it "cp -f", so that on subsequent saves (when there's already the .bak) it'll still work.
_________________ 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
|
|
 |
Pizzasgood

Joined: 04 May 2005 Posts: 6270 Location: Knoxville, TN, USA
|
Posted: Mon 23 Oct 2006, 17:27 Post subject:
|
|
It does it anyways.
| Code: | sh-3.00# cat a
Cheese
sh-3.00# cat b
Cake
sh-3.00# cp b a
sh-3.00# cat a
Cake
sh-3.00#
|
Though -f might be safer in terms of portability.
_________________ Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

|
|
Back to top
|
|
 |
Black_64

Joined: 12 Sep 2006 Posts: 53
|
Posted: Sun 12 Nov 2006, 14:48 Post subject:
|
|
| vern72023 wrote: | i like this little app - but modified it by adding the following 2 lines just prior to the save current session
#Backup Puppy
cp /mnt/home/pup_save.3fs /mnt/home/pup_save.bak.3fs
that way i get a backup in case i really messup |
Is this working on Puppy 2.11? Because i dont have /mnt/home/pup_save.3fs
|
|
Back to top
|
|
 |
vern72023
Joined: 26 Dec 2005 Posts: 158 Location: Jacksonville Fl
|
Posted: Sun 12 Nov 2006, 15:31 Post subject:
|
|
you are probably using a different installation method
I use either usb or frugal installs
and it works fine in 212 now as well except I called my pup pup_save.212.3fs so that i could run the 211 and 212 parallel
I have a linuz11, initrd11.gz and pup_save.211.3fs and a linuz12;initrd12.gz, pup_save.212.3fs and in syslinux.config can flip between the 2
label 2
kernel linuz11
append root=/dev/ram0 initrd=initrd11.gz PMEDIA=usbflash quiet
label 3
kernel linuz12
append root=/dev/ram0 initrd=initrd12.gz PMEDIA=usbflash quiet
thought now I think i will be getting rid of the 211 as the latest 212 seems very stable
george
_________________ george
|
|
Back to top
|
|
 |
Black_64

Joined: 12 Sep 2006 Posts: 53
|
Posted: Sun 12 Nov 2006, 16:01 Post subject:
|
|
Ok thanks.
How can i find my pup_safe?
|
|
Back to top
|
|
 |
Pizzasgood

Joined: 04 May 2005 Posts: 6270 Location: Knoxville, TN, USA
|
Posted: Sun 12 Nov 2006, 23:10 Post subject:
|
|
If you have one, it should be at /initrd/mnt/dev_save/pup_save.3fs. That directory is symlinked to /mnt/home/, so it should also be in /mnt/home/pup_save.3fs.
If it is neither, then you don't have one, which means you are using some other type of installation, not USB or frugal. Multisession and full-hd installs are the only ones I can think of that would not have one. Unless you're just running in ram, without saving your settings.
This script will only work if the /etc/rc.d/PUPSTATE file says you're in PUPMODE=13. It shouldn't be necessary in other versions anyways, as the savefile is mounted directly. All that would be needed in them to make sure everything is saved is opening a terminal and typing sync. Except multisession, of course, which should already have an icon on the desktop for saving it if I remember correctly.
_________________ Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

|
|
Back to top
|
|
 |
Black_64

Joined: 12 Sep 2006 Posts: 53
|
Posted: Mon 13 Nov 2006, 04:49 Post subject:
|
|
PUPSTATE=13 and puppy is installed on CF-card.
But mine /initrd/mnt/dev_save is empty!
I find a pup_save.3fs in //initrd/mnt/dev_ro1.
What do this mean?
When i type "sync" in a terminal window will this save my current state of puppy to pup_save.3fs?
|
|
Back to top
|
|
 |
Pizzasgood

Joined: 04 May 2005 Posts: 6270 Location: Knoxville, TN, USA
|
Posted: Mon 13 Nov 2006, 18:39 Post subject:
|
|
Hmm... I'm not sure of the reason for the different location. Where Puppy mounts things in the initial ramdisk stage is mostly beyond me, but Puppy knows what he's doing. My script should work for you, because it's independent of the locations. All it really is is a hacked and slashed version of the auto-save daemon already in Puppy, so if that works this will work.
As for sync-ing, it will sync any drives mounted, and maybe the ramdisk, but it won't shunt anything into the save-file when using mode 13.
_________________ Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

|
|
Back to top
|
|
 |
Black_64

Joined: 12 Sep 2006 Posts: 53
|
Posted: Tue 14 Nov 2006, 07:51 Post subject:
|
|
Ok, Thanks
|
|
Back to top
|
|
 |
|