Keep your savefile slim and healthy

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Keep your savefile slim and healthy

#1 Post by shinobar »

(Related article: Enrich 'Frugal' instead of doing full install)

Understand that the files under /mnt/home is not included in the save file.
For example, think you save a large file in /root/my-documents, say /root/my-documents/large.pdf.
At shutdown, it is saved in /mnt/home/puppy/pupsave.3fs (assume you installed Puppy in the directory puppy).
Make a directory, say /mnt/home/mydata, and place the large file there, say /mnt/home/mydata/large.pdf.
At shutdown, it is not saevd in the /mnt/home/puppy/pupsave.3fs. it is still there, /mnt/home/mydata/large.pdf.

And the files under /tmp is on RAM but not included into the savefile at shutdown. You can use /tmp for the cache if you have enough RAM and swapping space.

You can manage with small savefile:
  • Save your personal data under /mnt/home.
  • Use SFS files for large additional applications.
  • Download files to /mnt/home/tmp.
  • Limit the cache sizes the applications make. Or you can use /mnt/home/tmp for the cache.
    You can use /tmp for cache if your PC has enough RAM and swapping space. You can see the size, on terminal, type 'df /tmp' and type 'free' to see swap space:
Gdmap
You can find which file consumes the puppy space using the application Gdmap found under the menu >> File system. Run the gdmap and load /initrd/pup_rw. Some Puppy like Lupu-528 has ROX-Filer right click option. Open the folder /initrd with the ROX-Filer, right-click the folder icon of pup_rw, and select gdmap. Also pup_ro1 for install on flash.

Alternative: Large Files Finder by SFR
http://www.murga-linux.com/puppy/viewtopic.php?t=77779

Portable applications
Some browsers/applications provided as a 'Portable' to be placed outside the Puppy Space(savefile).
Google Chrome
Firefox
SeaMonkey
Thundrbird
Wine
Gimp

CUPS:
The cups daemon makes cache under /var/spool/cups/tmp. You can automatically delete the cache files at shutdown by editing the script /etc/init.d/cups. Insert a line at line 186 or somewhere called when 'cups stop':

Code: Select all

rm -fr /var/spool/cups/tmp/*	# shinobar: clean up cache
Example using seamonkey2:
Open from the seamonkey2 tool bar: Edit >> Preferences...
  1. Browser >> Downloads >> When saving a file, choose 'Save files to' '/mnt/home/tmp'.
    Image
  2. Advanced >> Cache >> Set Cache Options >> Cache Folder Location:, set '/mnt/home/tmp'.
    Image
  3. Advanced >> Privacy & Security >> Validation: Tick off OCSP.
    Image
Firefox
  1. Save files to /mnt/home/tmp.
    Image
  2. Limit cache.
    Image
  3. Tick off 2 'Block ...'.
    Image
Case of chrome:
http://www.murga-linux.com/puppy/viewto ... 721#468721

Gimp:
Edit >> Preferences
At 'Environment', you can restrict the cache size.
Image

But more important is where to make cache and swap file.
Go to 'Folders'.
Image
There are 2 strategies:
  1. Set the cache/swap folder at '/tmp' if your PC has enough RAM. It makes fast and does not consume pupsave.
  2. Set at '/mnt/home/tmp' for PC's with small RAM size. It does not consume pupsave. But it may slow down the performance.
Last edited by shinobar on Sun 04 May 2014, 03:12, edited 19 times in total.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#2 Post by DaveS »

When you move /create a file or folder at /mnt/home (or anywhere else for that matter), you can drag it back to /root and from the pop-up menu select to make a symlink. This way, Puppy will THINK the file/directory is in /root when it is actually at /mnt/home.
Also, if you have more than one puppy version installed, they can ALL see and use any file or directory at /mnt/home, so if you put your data there, it is available in any puppy version you boot into.
Once you get the hang of this, you can do the same for all kinds of stuff, like configuration files, and even whole programs.
Its a tinkerers dream :)
Spup Frugal HD and USB
Root forever!

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#3 Post by Sylvander »

Problems?

1. I'm no Puppy Linux expert.

2. I have 6 Puppies in use.
Each is loaded using its own "live" CD-RW disk.
(a) Dpup-010
(b) Teenpup mini 2010 beta
(c) Luci-237
(d) Lupu-511
(e) Boxpup-431
(f) Lighthouse-5.00-F (build 500)

3. Pupsaves are held:
(a) Each in one of 6 1.3GB ext3 partitions on an 8GB Flash Drive...
PLUS...

(b) Some of the pupsaves are copied into a suitably named folder in the root of a partition on an internal PATA HDD.

Hence:
4.
(a) The "Home" location for each Puppy is different, depending upon which CD+pupsave is chosen for use. :(

(b) Would SFS files work with all the different Puppies?

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#4 Post by nooby »

Once you get the hang of this, you can do the same for all kinds of stuff, like configuration files, and even whole programs.
Yes it works very good when it works but fails if one are careless.

I screwed up a working Quirky installation I had and had to start all over.

I had even tried to avoid that by saving the pupsave as a backup copy but I screwed up that one too. So one need to be careful and not be in too much haste doing it but it is a cool thing when one know what one do. So save a backup of pupsave by going pfix=ram and making a copy of the save file first and then do the experiments.

That is for frugal install I don't know if it works on full install as I don't do them
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

pfix=fsck boot opton

#5 Post by shinobar »

Are you aware that the pupsave does easily crrupt?
Most likely when you install applications, drivers or something mismatching.
But also it corrupts with other reasons. It may be a reason Puppy runs with 'root' user.
The 'pfix=fsck' boot option may some help.
I am adding the option in the menu.lst (or syslinux.cfg for syslinux).
It takes a time at boot, but not much for usual hardware.
title Lupq 511 (sda3/puppy5)
find --set-root --ignore-floppies /puppy5/initrd.gz
kernel /puppy5/vmlinuz pmedia=atahd psubdir=puppy5 pfix=fsck
initrd /puppy5/initrd.gz
Using ext3 file sistem (pupsave.3fs) rather than ext2 may be better for the recent Puppy.

Well... but it is not always the rescue.
Keep in mind: the pupsave does easily crrupt.
Never save private files under /root, but save them under /mnt/home.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

How to run Puppy with RAM mode?

#6 Post by shinobar »

If your pupsave is suspected, you can run Puppy same as the initial without pupsave.
Here is 3 way to run your Puppy with RAM mode:
  1. Type 'puppy pfix=ram' at the boot prompt.
  2. Or make an entry in the menu.lst(or syslinux.cfg for syslinux). such as like:
    title Lupq 511 (sda3/puppy5)
    find --set-root --ignore-floppies /puppy5/initrd.gz
    kernel /puppy5/vmlinuz pmedia=atahd psubdir=puppy5 pfix=ram
    initrd /puppy5/initrd.gz
  3. You can't?
    Then run as usual. Make a dummy file.
    Open the directory your puppy is installed, say /mnt/home/puppy5 for example, with a ROX-Filer.
    Right-click at a space in the window, select 'Make new...' >> 'New file', name as pupsave-dummy.2fs'.
    ('pupsave' should be 'lupusave' for Lucid Puppy, 'warysave' for Wary, and etc.)
    Reboot.
    The Puppy offers a menu:
    0 none
    1 pupsave.2fs
    2 pupsave-dummy.2fs
    Type '0' here, then the Puppy runs without any pupsave.
Last edited by shinobar on Wed 05 Oct 2011, 01:26, edited 2 times in total.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#7 Post by PaulBx1 »

The 'pfix=fsck' boot option may some help.
This is still broken for encrypted pupsaves. :cry:

The way to fsck heavy-encrypted pupsaves is this:

boot "pfix=ram"
if your partition is ext2, then do e2fsck -y /dev/sda1, or wherever you have puppy
mount that partition
cd to your pupsave directory
modprobe cryptoloop (ignore any warning messages)
modprobe aes
losetup-FULL -e aes /dev/loop6 yourpupsavefilename
GIVE IT THE PASSWORD
e2fsck -y /dev/loop6
then reboot...

Pupsaves do seem a bit fragile. Moral of the story: back it up before you install anything or mess with it in any way.

Getting back to the OP, I have gone from a fat pupsave to a small one, mostly by moving my /root/.mozilla directory over to /mnt/home (or in my case, /mnt/truecrypt1) and linking it back to /root. I also remastered to get installed programs out of the pupsave. It is 128M now. I like it better this way; dealing with very large pupsaves is irritating.

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

Re: Keep your savefile slim and healthy

#8 Post by johnywhy »

shinobar wrote:Understand that the files under /mnt/home is not included in the save file.
does that mean files under /mnt are lost (deleted) when shutting down?

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#9 Post by p310don »

Johnnywhy wrote
does that mean files under /mnt are lost (deleted) when shutting down?
No, the files will remain on your hard drive, but they won't be in the save file. The save file is useful for making backups of settings, and for taking your puppy to another computer. This is especially useful when using puppy from a flash drive for example.

The only files that might be lost upon shut down are those stored in a tmp directory, or in a ramdisk. By default, nothing is stored in a ramdisk, and usually only cache in a tmp directory.

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#10 Post by johnywhy »

So, I thought the only objects in mnt which point to my hard drive are drives that have been mounted, and assigned to specific folders inside mnt, such as sda1.

Oh, I think you're saying that, aside from mounted drives, everything in mnt points to free space on the partition where puppy is installed, outside the save file. Correct?

In which case, if puppy is installed on a flash drive, then mnt points to the free space on the flash drive? in which case, saving stuff to mnt is still saving to my flash drive, not the hard drive. No?

confused!

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#11 Post by p310don »

Puppy, and all Linuxes put everything into a directory, even other hard drives. In your save file, you will find the /mnt directory. In all Linuxes you will also find /mnt , but not in a save file, that is *almost* unique to Puppy.

The subdirectories under /mnt are your drives and partitions. For example, /mnt/sda1 is the first partition on the first hard drive. The drive your save file is saved on is known as /mnt/home , as well as /mnt/sdXY with X and Y being drive letter and partition numbers. Its a little confusing when you're new to it.

If you boot from a flash drive, you will have the /mnt directory on the flash drive. This isn't the whole flash drive, but, if you want to use the spare space, besides Puppy, go to /mnt/home . That is the space on your flash drive.

As shinobar explains at the top of this thread, by utilising this spare space on your flash drive, you keep your save file from filling up, but you do keep your stuff on your flash drive.

Hope that helps, without being too confusing!!

Paul

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#12 Post by johnywhy »

yes, and thanks!

so shinobar's recommendation WILL save room in my personal save file, but will NOT save room on the flash drive (or wherever puppy is installed).

so, correct me if i'm wrong:

if a user wants to use the flash drive just for the OS, and use their hard drive for files, then they should save stuff in mnt/sda1 (or some other hard disk folder), and NOT in mnt/home.

right?

(i realize this thread is just about saving room in the personal save file, but i think this clarification is relevant, especially for noobs like me!)

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#13 Post by p310don »

Correct.

Save to /mnt/home will put the files on your flash drive, which is great if you want to take it with you and use it on other computers.

Save to /mnt/sda1 (or similar) will put the files on your computer's hard disk drive, which is great because it doesn't fill up your flash drive, but doesn't offer any portability.

I'm glad to see you're getting it. Give it a few more years, and you can take off your noob tag...!! :-)

(I am yet to take mine off)

Hasimir
Posts: 8
Joined: Thu 15 Sep 2011, 21:06

#14 Post by Hasimir »

Hi :)

I installed a fresh Lucid Puppy 529 on a 16Gb usb PenDrive.
Following the suggestions in this topik and this one too I tried to slim down my savefile.

But I must be doing something wrong because my 512Mb savefile (ext3) shows as almost full in the system tray :(

I only installed:
- instant update
- chromium 15
- cursor themes 1
- vcl 1110

and yet the tray icon tells me I only have 61mb free :P

what could the problem be?

EDIT:
I must be doing something wrong when I try to store my Chromiun cache in the Home dir.

As instructed I:
- close Chromium
- create a /mnt/home/temp_files/cache/chromium dir
- move the contents of root/.cache/chromium (aka the "Default" dir) into the external space
- create a link (I tried both relative and absolute) back into its place

but when I reboot the machine and I go look into the .cache dir I find a NEW "chromium" dir ... inside it I find my link and a NEW "default" dir beside it.

basically the system restores everything back to normal as if I did nothing :P

Why?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#15 Post by disciple »

Yes, Chrome (and presumably Chromium) is too smart for its own good. On my machine I link its cache directory to somewhere outside the save file, but if I temporarily fill up the partition that directory is on, instead of just running slowly like a normal browser with no cache space, it renames my link and creates a new cache directory in the save file. I think there may also be other situations where it does the same thing.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Hasimir
Posts: 8
Joined: Thu 15 Sep 2011, 21:06

#16 Post by Hasimir »

Question:

how do I install a program so that the bulk of files are stored outside the savefile, and only the settings are kept into it?

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#17 Post by big_bass »

Hasimir wrote:Question:

how do I install a program so that the bulk of files are stored outside the savefile, and only the settings are kept into it?
there are many ways to do this if you search though the forum

but the simple way is just to have different save files for different needs

pup_save_devx

pup_save_freshboot

pup_save_office

pup_save_kids

you get the idea to keep the ram use down to a minimum

Joe

Hasimir
Posts: 8
Joined: Thu 15 Sep 2011, 21:06

#18 Post by Hasimir »

so I should reboot the system every time I need to fire-up a program like Office or Gimp?

or is there a way to install (and then access) applications into a different savefile from the current session?
there are many ways to do this if you search though the forum
searched the forum
failed to find what I was looking for

do you mean that there are "many ways to install apps outside the savefile" ... or do you mean that evey application has a different and specific way to be saved outside the savefile?

Could you (or someone else) offer some links?

Thank a lot ^_^

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#19 Post by nooby »

Haha if you teach me to do this ^_^ then I maybe just maybe give link.

Truth is that I am not sure how one does it and I have searched and searched too and even started threads and asked and asked.

But some has told me but to find these threads and posts. Hm takes much effort.

Anyway here is what you can test to do.

1. First things first. Kernel has to be same on Firefox pet and the puppy linux os you install it on.

2. Suppose you make a frugal install of lupu-528 and you go to quickpet or what the name is. There you chose FF 4 or 5 or what is there now.

You install it and let it get flash and then reboot?

3. Then you boot and use Rox and open up two Rox windows
and one is the root with all showing so you can see the .mozilla
that the install created.

4. Now you move that one from root to /mnt/home/ so it is there
instead of in the root and that move it out of pupsave.

oops forgot to tell you the most important part.
One makes an absolute symlink back to root from /mnt/home/

How does one do such? Not sure. One click and hold the click down and
drag and drop as absolute symlink. One have to test until one get it.

Then you learn what works and not work having it that way. You have to search and ask and test and be your own expert on when it works well and when not.

Another way to keep the pupsave lean is to use .sfs and sfs-load on fly or similar.

I use seaside's SFS-exec instead. That allow me to have Opera and Chromium and Iron and different FF and such on instant access as sfs files outside of pupsave.

one can also have LMMS and other big files that way.
I use Google Search on Puppy Forum
not an ideal solution though

zaivala
Posts: 125
Joined: Mon 21 Mar 2011, 07:14

Resize Puppy Savefile

#20 Post by zaivala »

OK, what about just resizing the pupsave file? The only problem is, I can't find how to do this in LuPu 528... it is done quite easily in MacPup 528... any hints?

Post Reply