On Wed, Jul 21, 2010 at 9:11 AM, H.S. <email@example.com>
I think you are also supposed to change your sources.list file at this point (for example if your machine was using Debian Unstable but if you used a Stable or Testing installer).
On 21/07/10 08:41 AM, B. Alexander wrote:
3. Build the new machine with the netinst or businesscard cd. When asked
what type of system to build (package selection), uncheck all the boxes.
Reboot into your new system, copy pkglist.hostname from step 1 onto the
machine. Do the following:
True, I neglected to mention this. I usually copy at least /etc/apt/apt.conf, /etc/apt/sources.list (I use a universal one, so one size fits all), and /etc/apt/sources.list.d over.
I am not sure what you think about /home, but usually that is the more important consideration for me. What I usually do is:
dpkg --set-selections< pkglist.hostname
This should give you a system with a nearly identical set of packages that
you can then tweak to your hearts content.
1. Make note of the UIDs & GIDs of the users (or the order in which they were created). 'ls -nl /home' lists those.
2. Make a backup of /var as well to restore users' mail (in /var/mail) and cronjobs (in /var/spool/cron/crontabs) and perhaps at jobs (in /var/spool/cront).
Good points. I was under the assumption that you would not be transferring data over from the old to the new, so I didn't consider it. Of course, if you are managing more than a few boxes, you also might want to consider a configuration management tool like cfengine or puppet. Then you could "script" all of your UIDs and GIDs as well as other configuration details. For instance, I have a list of "essential" packages (essential for me) that I install on every box. With cfengine, I can automagically install them as well as edit/modify that list in one place.
Finally, backing up /etc and restoring it later prevents you from having to do all the configurations again.
Be careful with that. Especially if you are "cloning" a box that has been around for a while. Carte blanche copying of /etc can lead to problems. There is the problem of "etc drift," even with a fairly recently built box.
All good points.
 You can actually back these files up and have a pool of different
"types" of machine. For instance, I have a workstation packagelist, a laptop
list, as well as lists for the various types of bastion hosts in my network,
including a wiki host (mediawiki), firewall, backup server, etc.