Moving Puppy install from one flash drive to another

Booting, installing, newbie
Post Reply
Message
Author
Cerberus262
Posts: 1
Joined: Tue 13 Apr 2010, 22:50

Moving Puppy install from one flash drive to another

#1 Post by Cerberus262 »

I've spent a while testing and setting up Puppy on a 256Mb flash drive and am now running out of room. I'd like to move the entire install to a 1Gb flash drive without re-installing and trying to remember how I set it all up.

Any tips on how to do this?

Another question that's been floating in my mind - why does my save file memory keep getting larger when I have not been adding anything new to the system? Just been using as an internet connection device lately - are cookie files beginning to accumulate?

Any help for a rookie would be greatly appreciated.

Thanks,
Mark
User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

Re: Moving Puppy install from one flash drive to another

#2 Post by RetroTechGuy »

Cerberus262 wrote:I've spent a while testing and setting up Puppy on a 256Mb flash drive and am now running out of room. I'd like to move the entire install to a 1Gb flash drive without re-installing and trying to remember how I set it all up.

Any tips on how to do this?
I'll ask the usual question. Full install, or frugal?

In either case, this will probably be all you need to know:

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

In particular, you should look at the posts by rcrsn51 and "Sit Heel Speak". There are a few methods outlined.

Note: if you're doing the copy, you will want to run Puppy in RAM (e.g. boot from CD, and don't load any existing files) -- if you are running from the "partition" (be it a pupsave or a real partition), your copy will likely produce undesirable results.
Another question that's been floating in my mind - why does my save file memory keep getting larger when I have not been adding anything new to the system? Just been using as an internet connection device lately - are cookie files beginning to accumulate?

Any help for a rookie would be greatly appreciated.

Thanks,
Mark
I run Firefox, and it eventually "bloats up". It also seems to ignore my requested limit on Cache size, so I tell Firefox to purge Cache, then reboot, then note that the Cache folder has refilled itself, and then manually delete the files (I think I reboot again, after that). This is a pupsave system sitting on a USB -- I don't recall if this also occurs on my frugal HDD install.
looseSCREWorTWO
Posts: 812
Joined: Thu 04 Feb 2010, 13:16
Location: Australia, 1999 Toshiba laptop, 512mb RAM, no HDD, 431 Retro & 421 Retro

#3 Post by looseSCREWorTWO »

One trick with Flash Drives is to have both plugged-in at the same time, then use Gparted's "copy and paste" function. On the 1gb Drive you will need to have some Unallocated Space which is slightly bigger than the 256mb partition being copied.

From what I've seen this method works with DOS and Linux partitions, but it never works with Windows.
DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: Moving Puppy install from one flash drive to another

#4 Post by DMcCunney »

RetroTechGuy wrote: I run Firefox, and it eventually "bloats up". It also seems to ignore my requested limit on Cache size, so I tell Firefox to purge Cache, then reboot, then note that the Cache folder has refilled itself, and then manually delete the files (I think I reboot again, after that). This is a pupsave system sitting on a USB -- I don't recall if this also occurs on my frugal HDD install.
It doesn't do that here.

Try this:
In Firefox, go to about:config. Create the string value

Code: Select all

browser.cache.disk.parent_directory
Set the value of the preference to /dev/shm

This puts the cache in POSIX shared memory, which exists in RAM or swap, but not on your file system. (I believe /dev/shm defaults to 50MB in size.)

Set the value of

Code: Select all

browser.cache.disk.capacity
to 20,000

See if you still have the issue.

(I run a full install, but I believe this should work for frugal, too.)
______
Dennis
Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#5 Post by Sylvander »

One way to avoid BLOAT:

When booting from a Puppy live optical disk...
With a pupsave on a partition on a Flash Drive...

How to stop "SAVING TO FILE" at shutdown?
...In a frugal install.


In conjunction with...
To prevent periodic [default is every 30 min] "saves" [actually a "copy"] back to a pupsave file on a [partition on a] Flash Drive.

If at the end of a session...
You know there are no changes you want to save...
You choose NOT to save the session.
Any bloat would be LOST.
User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

Re: Moving Puppy install from one flash drive to another

#6 Post by RetroTechGuy »

DMcCunney wrote:
RetroTechGuy wrote: I run Firefox, and it eventually "bloats up". It also seems to ignore my requested limit on Cache size, so I tell Firefox to purge Cache, then reboot, then note that the Cache folder has refilled itself, and then manually delete the files (I think I reboot again, after that). This is a pupsave system sitting on a USB -- I don't recall if this also occurs on my frugal HDD install.
It doesn't do that here.

Try this:
In Firefox, go to about:config. Create the string value

Code: Select all

browser.cache.disk.parent_directory
Set the value of the preference to /dev/shm

This puts the cache in POSIX shared memory, which exists in RAM or swap, but not on your file system. (I believe /dev/shm defaults to 50MB in size.)

Set the value of

Code: Select all

browser.cache.disk.capacity
to 20,000

See if you still have the issue.

(I run a full install, but I believe this should work for frugal, too.)
______
Dennis
Thanks Dennis, that patch sounds quite promising! I will give it a try this evening...

It does rather annoy me that I limited Firefox Cache to 20 MB, and then notice that it regularly bloats to 70+ MB, over time -- saving the cache to ram will cure it's uncooperative butt!
User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

#7 Post by RetroTechGuy »

looseSCREWorTWO wrote:One trick with Flash Drives is to have both plugged-in at the same time, then use Gparted's "copy and paste" function. On the 1gb Drive you will need to have some Unallocated Space which is slightly bigger than the 256mb partition being copied.

From what I've seen this method works with DOS and Linux partitions, but it never works with Windows.
And this should be done with the partition unmounted (i.e. boot to ram with the CD, not from the USB at all...)

BTW, with DOS (up through WinME) I've had good luck using Zip:

Code: Select all

zip -rS savefile.zip *
To put it on a new HDD, you create the partition, make it active (bootable) and using an OS that supports long file names, unzip the archive onto the partition.

Year ago, I would upgrade my hard disk by booting from a spare HDD (so you're not running from the partition being copied), and simply copying the contents of the original drive to the new drive, in a manner such as rcrsn51 suggested, and don't forget to set the partition active.
DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: Moving Puppy install from one flash drive to another

#8 Post by DMcCunney »

RetroTechGuy wrote:
DMcCunney wrote:Try this:
In Firefox, go to about:config. Create the string value

Code: Select all

browser.cache.disk.parent_directory
Set the value of the preference to /dev/shm

This puts the cache in POSIX shared memory, which exists in RAM or swap, but not on your file system. (I believe /dev/shm defaults to 50MB in size.)

Set the value of

Code: Select all

browser.cache.disk.capacity
to 20,000

See if you still have the issue.

(I run a full install, but I believe this should work for frugal, too.)
Thanks Dennis, that patch sounds quite promising! I will give it a try this evening...

It does rather annoy me that I limited Firefox Cache to 20 MB, and then notice that it regularly bloats to 70+ MB, over time -- saving the cache to ram will cure it's uncooperative butt!
You might want to file a bug. It should obey the max value you specify for cache.

I think setting the value directly via about:config should prevent the ballooning.

On Windows, I use a similar technique with a different target. I have 4GB of RAM on the XP box, but for technical reasons, XP itself can only see about 3GB of it. I have a RAMdisk driver that can get at and use the fourth gig, so I define a 128MB RAMdisk as drive Z:. then set browser.cache.disk.parent_directory to Z:. Works fine., and appears to help performance. (The cache goes away if I reboot, but I don't care.)

In SeaMonkey, under Edit/Preferences/Advanced/Cache, the Cache Folder Location box will let you specify where to put it. (You must click Choose Folder and navigate the file system to /dev/shm - you can't simply type a location into the box.) I wish Firefox had retained that dialog, but doing it in about:config works as well with the same end result.
______
Dennis
User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

Re: Moving Puppy install from one flash drive to another

#9 Post by RetroTechGuy »

DMcCunney wrote:
RetroTechGuy wrote:
DMcCunney wrote:Try this:
In Firefox, go to about:config. Create the string value

Code: Select all

browser.cache.disk.parent_directory
Set the value of the preference to /dev/shm

This puts the cache in POSIX shared memory, which exists in RAM or swap, but not on your file system. (I believe /dev/shm defaults to 50MB in size.)

Set the value of

Code: Select all

browser.cache.disk.capacity
to 20,000

See if you still have the issue.

(I run a full install, but I believe this should work for frugal, too.)
Thanks Dennis, that patch sounds quite promising! I will give it a try this evening...

It does rather annoy me that I limited Firefox Cache to 20 MB, and then notice that it regularly bloats to 70+ MB, over time -- saving the cache to ram will cure it's uncooperative butt!
You might want to file a bug. It should obey the max value you specify for cache.

I think setting the value directly via about:config should prevent the ballooning.
Beautiful patch, Dennis!

Interestingly, it auto filled 20480 (20 GB). So Firefox knew about the limit, but was ignoring it... I'm working on filling it up to see if it limits correctly (I think it will, as it appeared that invoking the about:config limit apparently forced Firefox to obey its disk Cache..)

And, as expected, Cache is now found in /dev/shm/
On Windows, I use a similar technique with a different target. I have 4GB of RAM on the XP box, but for technical reasons, XP itself can only see about 3GB of it. I have a RAMdisk driver that can get at and use the fourth gig, so I define a 128MB RAMdisk as drive Z:. then set browser.cache.disk.parent_directory to Z:. Works fine., and appears to help performance. (The cache goes away if I reboot, but I don't care.)
My feelings exactly.

Thanks man!
DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: Moving Puppy install from one flash drive to another

#10 Post by DMcCunney »

RetroTechGuy wrote:
DMcCunney wrote: I think setting the value directly via about:config should prevent the ballooning.
Beautiful patch, Dennis!
:D
Interestingly, it auto filled 20480 (20 GB).
Er, I think you mean 20MB...
So Firefox knew about the limit, but was ignoring it... I'm working on filling it up to see if it limits correctly (I think it will, as it appeared that invoking the about:config limit apparently forced Firefox to obey its disk Cache..)

And, as expected, Cache is now found in /dev/shm/
Mozilla browsers store all of the config information in the database shown by about:config, and if you know what you are doing, you can do all sorts of things by diddling those values.

Setting the cache size in the Options dialog should do the same thing as entering the value in about:config. If it doesn't, it's a bug, as the value is not being properly stored.
Thanks man!
You're quite welcome.
______
Dennis
User avatar
RetroTechGuy
Posts: 2947
Joined: Tue 15 Dec 2009, 17:20
Location: USA

Re: Moving Puppy install from one flash drive to another

#11 Post by RetroTechGuy »

DMcCunney wrote:
RetroTechGuy wrote:
DMcCunney wrote: I think setting the value directly via about:config should prevent the ballooning.
Beautiful patch, Dennis!
:D
Interestingly, it auto filled 20480 (20 GB).
Er, I think you mean 20MB...
Yeah...MB...GB...all about the same any more ... ;) :lol:

Except for those files eating too much space _inside_ my pupsave...

(Note: I do have a multi-TB stack of drives parked on my shelf...)
Mozilla browsers store all of the config information in the database shown by about:config, and if you know what you are doing, you can do all sorts of things by diddling those values.
Yeah, I've tinkered with some of them, but it's a bit like building a house from toothpicks... I don't like to poke around in there unless there is a serious issue.
Setting the cache size in the Options dialog should do the same thing as entering the value in about:config. If it doesn't, it's a bug, as the value is not being properly stored.
Indeed. I'll drop a note on the Mozilla list.

The one caveat is that I installed this from a .pet file, rather than raw from Mozilla... What are the chances that some setting was slightly fudged in the .pet?...
DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: Moving Puppy install from one flash drive to another

#12 Post by DMcCunney »

RetroTechGuy wrote:
DMcCunney wrote:
Interestingly, it auto filled 20480 (20 GB).
Er, I think you mean 20MB...
Yeah...MB...GB...all about the same any more ... ;) :lol:

Except for those files eating too much space _inside_ my pupsave...
As mentioned, I use a full install. But if I went frugal, there are things I'd take pains to put elsewhere than my pupsave.

Aside from the Mozilla cache, which defaults to being in the profile folder, I generally don't use the default location for the profile itself. I'd store that outside the pupsave so it would be common to all Puppy instances.

You can specify where to create the profile when you run a Mozilla browser. For instance, invoking Firefox as "firefox -P" from a terminal will start it in Profile Manager mode. From there, you can create a profile, specify the name, and specify where it will be placed. (Under Puppy, I use /root/my-documents/Mozilla/Profiles/Firefox with directories fror each profile beneath.) At any given time, I'm likely to have multiple profiles for browsers, customized for different purposes. (Mostly a matter of what extensions are installed.)

You can use any specified profile with "firefox -P <profilename>"

I also want to use the same bookmarks in each, so there is a master bookmarks file in /root/my-documents/Mozilla/Bookmarks, which I symlink into each profile directory. I have Ubuntu 9.10 on another partition on the Puppy box, and Puppy and Ubuntu mount each others partitions on start up. Browsers on the Ubuntu side use the Puppy bookmarks file, courtesy of a symlink. (Since I normally run as an ordinary user in Ubuntu, I did adjust the permissions of the Puppy side to permit access from non-root IDs.)
Mozilla browsers store all of the config information in the database shown by about:config, and if you know what you are doing, you can do all sorts of things by diddling those values.
Yeah, I've tinkered with some of them, but it's a bit like building a house from toothpicks... I don't like to poke around in there unless there is a serious issue.
I don't normally, either, but some things have to be done that way, as there isn't a UI for them. Ultimately, the preferences are stored in the prefs.js file in the profile directory, but that's created and maintained by the browser, and shouldn't be edited directly. If you have customizations you want permanent that don't have a UI, you can put them in a user.js file in the profile directory. If that file exists, it will be read, and things specified in it will override the settings in prefs.js. I use thet technique under Windows to get multiple profiles to use the same bookmarks.html file, by specifying the location in user.js.

(Firefox 3 shifted to an SQLite database and removed the preference that lets you specify where it lives, so I use a different technique for it.)
Setting the cache size in the Options dialog should do the same thing as entering the value in about:config. If it doesn't, it's a bug, as the value is not being properly stored.
Indeed. I'll drop a note on the Mozilla list.
File a bug in Bugzilla.
The one caveat is that I installed this from a .pet file, rather than raw from Mozilla... What are the chances that some setting was slightly fudged in the .pet?...
Possibly. I install SeaMonkey from static builds created by Phillipe Martinez in France, from tar.bz2 files, so I'm getting a default Mozilla configuration. I drop them into /opt and adjust from there.

And I download the Firefox Linux binaries from Mozilla and install the same way. (Firefox 3+ can't be built static, so no advange to a third party build.)

(And because Puppy and Ubuntu mount each other's partitions as mentioned above, I'm actually using the browsers installed on the Puppy partition in Ubuntu. To the extent possible, I want one copy of a program shared between both distros, since disk space is finite and it's easier to keep things in sync.)

The advantage to a PET is added entries in Puppy's menus and the ability to remove from PetGet, but I use Xfce4 instead of JWM, and removing apps I install that way is a matter of deleting the install directory tree, as they are "self-contained", and everything lives under the install directory. Delete the install dir, and Poof! It's gone! :)
______
Dennis
gcmartin

Mozilla Browser directions, advise and recommendations

#13 Post by gcmartin »

@DMcCunney, thanks for the enlightening. You gives some very plausible advice. I like the ideas as you presented, here.

My one question is: Would there be any issue with a save-session (Pupsave) maintain each of these changes you outline in both Options and in about:config?

Thanks in advance.
DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: Mozilla Browser directions, advise and recommendations

#14 Post by DMcCunney »

gcmartin wrote:@DMcCunney, thanks for the enlightening. You gives some very plausible advice. I like the ideas as you presented, here.

My one question is: Would there be any issue with a save-session (Pupsave) maintain each of these changes you outline in both Options and in about:config?

Thanks in advance.
The use of /dev/shm as the cache location is actually stored in the browser's prefs.js file, which is where all the preferences live. It shouldn't matter whether you set the option from the UI, or do it in about:config - you are ultimately creating and storing the same preference in prefs.js. (RetroTechGuy's issue above was a new one on me, though bypassing the Options dialog and doing it directly in about:config seemed to fix his problem.)

The prefs,js file lives in the browser profile folder for whichever profile you use. If the profile folder is included in the pupsave, the changes should persist. If the profile folder is outside the pupsave and common across sessions, the changes should still persist.

I'm running FF 4.0 at this point (on the Windows side - haven't updated in Linux yet) and things still work as expected. To make life even more fun under Windows, I boosted the size of the ramdisk to 256MB, and I now run Firefox itself from the ramdisk, as well as keeping the profile there. Firefox and the profile I use are stored in zip files on the HD. A logon script unzips them to the ramdisk for use. A logoff script stores them back to the zip to save any changes made during a session. Speed... :D
______
Dennis
Bruce B

#15 Post by Bruce B »

There are so many ways to take control of things.

I have an opposite situation. I want a smaller file.

Here is an outline of a what-to-do.
  • 1) make smaller pupsave.3fs

    2) mount old and new files

    3) copy from big file to little file

    4) unmount files

    5) delete big file

    6) copy, move or whatever else is obvious
I won't bother posting how-to, this is a what-to.

If someone wants how-to, please ask.

~
Bruce B

Re: Mozilla Browser directions, advise and recommendations

#16 Post by Bruce B »

DMcCunney wrote:To make life even more fun under Windows, I boosted the size of the ramdisk to 256MB
Dennis
Please tell me how you make a ramdisk in Windows.

~
Post Reply