|
11 years ago 2 |
I finished a fresh Mint 16 Petra RC installation on a laptop after thoroughly enjoying Mint 15 Olivia
on an older desktop. After seeing some fairly complex HOWTOs on Debian package migration,
I decided to share yet another way specifically without shell scripts.
To replicate programs you installed on your "source" pc that you would like on your "destination" pc:
First, run in a terminal:
sudo dpkg --get-selections > packages.txt
This instigates the deb package manager to find installed packages and instead of displaying to the
terminal instead writes the list to the new file called "packages.txt". Use whichever file name
you are comfortable with. Run the command from your home directory or Documents folder so
you can get to the new file easily.
Then using your favourite gui text editor, such as gedit, leafpad, or an office writer, pare out the system
packages that will be duplicates.
acpi-support
acpid
adduser
~
xserver-xorg-video-tdfx
xserver-xorg-video-vmware
xterm
....and so on will be present in the correct version and if applicable the appropriate hardware build.
I have several pc's with different processors and architectures, a PowerMac, AMD Opteron, Intel
two core Pentium, and each system has its own peculiar versioning. We are aiming to duplicate our
applications, games, etc and not the base system. Therefore in removing the base packages from our
list what is left over is the programs like the my digital photography tools, games, and so on. Since
we are doing this after installing the new system the base packages would only be redundant and
possibly conflicting.
Just about anything beginning with "lib," "mint," "python," and so on are safe to take off the list particularly if the new computer is a different hardware base. My source PC is an older Athlon based system with Nvidia on-board peripherals, while the destination is an Acer laptop with a Pentium dual core and Intel chips, so I pretty much know anything with "nvidia" and "amd" in the title is not appropriate (warning! use good judgment here, amd64 IS in many package titles denoting 64bit software environment not necessarily hardware system architecture!) in terms of utilities and video (like codecs, x-servers, etc) drivers. When in doubt keep what you are unsure of and conflicts will get resolved in the next steps. (Note: ensure that the word, "install" follows the package name in all of your list entries. I had a few that read, "deinstall" so I edited them back.)
Save the edited file with a name you will remember and associate with the source computer. I used
packages.txt for the listing then packagesFrom15.txt for the edited list file name. You may save to
your home directory, or if you have the new system up already save directly to your shared or
home directory on it. Alternately, you may save to a removable device like a USB stick or SD card. My
original listing file was 77kb and the pared down file only 2kb.
Next, open Synaptic Package Manager. From the menubar select File > Read Markings. Navigate to the
file you just saved, select it, and click Open. Synaptic will read the list and mark everything on your list to install. Click the Apply icon and sit back and watch it grind in your new system's new programs based on your other system! (Be aware that if you have a lot of packages installed on the source system it could take some time to download and install them on the destination and the process does use bandwidth so if you pay per mib or gib, please watch it! Beyond the scope of this, there are tutorials laying out steps to replicate via CD/DVD, USB stick, and local network methods).
Programs like Calibre (ebooks) and Banshee (music player) utilize local libraries or stored local files so you must be diligent and find those and copy to the same relative location on the destination PC. For this to work well you should have both PC's up and running on your local network or have a thumb drive or portable USB drive available to ferry files to/from. For continuity, I merge (copy) a number of directories in my home folder (directory) such as Documents, Music, Pictures, and Videos except where space might be a premium. The older desktop, for example, has only an 80gib partition, so its Music folder only has a few files and symlinks to folders on the network while the laptop has its own fresh Mint install on a 160gib drive solely housing Linux Mint 16 RC and 5gib of music files that can leave the house if I need to compute on the go.
Unless you know what goes where on a particular distribution if the source and destination have
different ones, or even such as here going from Mint 15 to Mint 16 RC, it is probably best to leave dot
folders alone. Dot folders are directories whose name is preceded with a . and are usually hidden from
gui file managers unless you specifically allow hidden files to be seen. Likewise, unless you do ls -a
they are hidden from a terminal's view too. (Note though hidden does not mean secured!) I will copy a few dot directories and files to my new system. Thunderbird and Firefox both have numerous
discussions on the web regarding how to copy or migrate profiles from old to new computers, so I will
refrain from the details other than to say these are good examples of programs utilizing dot folders which are easily transferred to a new installation.
That is it! I know this is wordy for a simple task and I am aware there are other ways to accomplish the
same thing. This is not the end-all of Mint migration, just how I did it a few times with excellent results.
Enjoy!
JamesK (kg7fu)
TODO:
script something to periodically scan all my PC's and conflate a list or something to determine
whether I want to install on all or some.
Last Word:
Although this makes reference to Mint 16 (Petra) Release Candidate (RC), it should apply to all
varieties. Be aware that the RC may not have an upgrade path to the full Mint 16 final release.
Also, this is for debian packages and specifically Mint varietals and though it should work with
any debian based distributions, please always use your good judgment.
very useful, thnks for your effort..