[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Upgrading persistent overlay?



Hello Andrew,

Sorry for not having answered your other mails yet. :-(

On Sat, Sep 24, 2011 at 08:32:32AM -0400, Andrew wrote:
> Dear Klaus et al,
> 
> One thing standing between me and using the persistent overlay feature is
> complications on upgrading.  I would very much like to store my bookmarks,
> calendar, contacts, etc., and customizations for day-to-day use from
> multiple machines.
> 
> But how do I easily merge all the accumulated data into a new Knoppix
> version?

Actually, it's not too complicated. The overlay is mounted under
/KNOPPIX-DATA, this contains all your changes relative to the current
read-only image.

Everything in /KNOPPIX-DATA/home is "personal settings", which you can keep.
Everything in /KNOPPIX-DATA/etc is "global settings", which is in most cases also OK to keep.

Things in /KNOPPIX-DATA/{bin,bin,usr,var,boot} are more complicated to
handle, these are changes made by additionally installed packages, which
will shadow other files when upgrading the read-only image. So, if you
installed a nes Samba version, the system booted with the new read-only
part will still see your own samba version instead of the (possibly
newer one) in the overlay.

Summary:

A) If you have only modified your personal and some global settings, and
did not install any new packages, you can just copy over your
KNOPPIX/knoppix-data.img from the old version to a freshly installed USB
drive, and should be ready to go.

B) If you installed new packages or directly modified files in /usr,
/lib, ..., you have the option of keeping your changes and hoping for
the best, or you delete everything in /KNOPPIX-DATA/ except for home and
etc to start with the new, unchanged system, yet keeping your settings
from the previous one. I should probably automatize this.

> Simply copying /mnt-system/KNOPPIX/knoppix-data.aes to the new KNOPPIX
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                 knoppix-data.aes is the encrypted version.

> directory will not work.  The first problem that comes to mind is that the
> old debian package database will not be correct for the packages in the
> new /UNIONFS.  Next, there will be a number of files in /etc, /root,
> /home/knoppix, and elsewhere which will not contain new configuration
> keys, and be otherwise less than 100% compatible with new packages in the
> new /KNOPPIX.

/home/knoppix should be OK, while some files in /etc may indeed not
match newer package versions.

> I booted this system live an hour ago and find there are already 350 files
> in /ramdisk.  How many files would be in /KNOPPIX-DATA after a few months
> of usage?

Some of these files are just metadata which tell aufs that file
modification times have changed, or files were removed. I don't think
that the number of files will increase much after the first few reboots,
unless you install new packages.

> How could I possibly save my data?

I would go with the option of just keeping /KNOPPIX-DATA/home and
/KNOPPIX-DATA/etc.

You could first copy over the entire knoppix-data.aes, then boot into
runlevel 2, delete everything in /KNOPPIX-DATA/ except for home and etc,
and then reboot. This is what I usually do.

Regards
-Klaus


Reply to: