Replicating packages on Debian

William O'Higgins Witteman william.ohiggins-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Thu Feb 28 15:04:00 UTC 2008


On Fri, Feb 22, 2008 at 10:31:26AM -0500, William O'Higgins Witteman wrote:
>On Thu, Feb 21, 2008 at 12:38:50PM -0500, CLIFFORD ILKAY wrote:
>> George Nicol wrote:
>>> 1) On machine #1:
>>>
>>>    dpkg --get-selections > packages.txt
>>>
>>>    This creates a list of installed (and removed) packages.
>>>
>>> 2) Do a base install on machine #2.
>>>
>>> 3) Move packages.txt to machine #2.
>>>
>>> 4) On machine #2:
>>>
>>>    dpkg --set-selections < packages.txt
>
>Thanks to several who sent the above commands - I failed to RTFM for
>dpkg - I had focused on apt - and I am grateful for the kind direction
>to the correct source.
>
>>> 5) On machine #2:
>>>
>>>    dselect install
>>>
>>> 6) Bask in the light of your newly cloned machine.
>
>I had figured out step 6, but 5 was the missing link - thank you.
>
>>> One limitation: If you are running something old, then your packages.txt
>>> will not point to the right version of the packages. If you are working
>>> with a recent version of your distro, then this is not a problem.
>>
>> I always replace Exim with Postfix. How does this method deal with that  
>> situation?
>
>The output of --get-selections has the exim packages set for removal,
>and the postfix ones for installation.  So, the above process works as
>well as I knew it should.  Thanks to all.

One caveat to the above procedure; if you are using Debian kernels, you
should cut those lines out of the packages.txt - they start with the
words "linux-image".  I do this because I find that I want an
architecture-specific kernel, but installing a 686 kernel on an Opteron
may work, but it is not ideal, and if it doesn't work but you previously
removed your stock kernel, you could be in trouble.

So, I can now clone a machine very neatly, as long as I am careful about
which kernels I am removing.
-- 

yours,

William

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://gtalug.org/pipermail/legacy/attachments/20080228/81fb58ff/attachment.sig>


More information about the Legacy mailing list