0

I have four questions.

I need to create exact machine clones. In short, I'm considering this approach:

1) install a base level Ubuntu from a DVD (say 12.04.3) on each Clone 2) replace the /etc/apt/sources.list on each Clone with my own version of the file that has a single entry that points to a local server (say it's called "Master") on our network 3) apt-get upgrade each Clone from that Master server

A bit more detail:

To create the repository and add all the packages on that local server, I have seen this post:

How to create a local APT repository?

Question 1: Is this approach ok? or am I completely off-base?

He says to use this line:

deb file:/my_repo/ ./

where /my_repo is where I've stored all of the specific packages I want. And this post says I can use an ftp:/xx format:

http://manpages.ubuntu.com/manpages/hardy/man5/sources.list.5.html

Which means I only have to install an ftp daemon on the server.

Question 2: Is this correct, i.e. just ftp daemon and a single line in the sources.list?

To initially populate the directory with packages, I can just

scp -r me@some_well_configured_machine:/var/cache/apt/archives /my_repo/

or on the Master machine:

cp -r /var/cache/apt/archives /my_repo

that is, I can do a full directory tree copy from some other good machine or even from the Master machine itself.

Question 3: Am I correct? (i.e. a simple directory tree copy?)

Every once in a while, to update the /my_repo/ directory on the Master server with the latest Ubuntu packages:

  • I update the Master machine from the official Ubuntu repositories
  • copy the updated packages now in /var/cache/apt/archives into the /my_repo/ directory
  • On each Clone machine, apt-get upgrade

Question 4: Will this work? Is there a better or simpler way?

Update: The focus of all of this is having control of the changes made to these machines. So hard disk cloning/ghosting won't work in this case. Once the machines are built, I need them to stay the same even if someone does an "apt-get upgrade". Stay the same, that is, until I change the Master (then after an upgrade of all of the machines, they are the same again).

2 Answers 2

0

IF all your machines are identical(hardware wise) then..

Rather than installing ubuntu on all machines it will be better if you install and set up one machine completely and then just copy the hard disk bit by bit(there are such applications are available or even dd can do the trick). We used same approach in our computer lab where we wanted to set up 160 machines. This works like a charm and saves a lot of time.

2
  • Would be better if you could explain this in detail(explaining how to use dd, etc.)
    – jobin
    Mar 4, 2014 at 4:58
  • thanks @nullpointer, but the machines (unfortunately) are not identical.
    – JohnA
    Mar 5, 2014 at 11:45
0

First With respect to your questions there. Yes the approach in that question is correct and I tried myself before. (For other questions about ftp its better to ask each question alone)

But to be more valuable and easy for you to do the following:

  1. Install Your needed packages
  2. Download Clonezilla live CD
  3. Burn the iso file to a CD
  4. Once you finish your initial machine reboot and start your Clonezilla Live CD and make a clone from your initial harddisk to others.

Check these screenshots here and be free to ask in details for any ambiguous menu entry.

2
  • thanks @hadi, but the cloning the machines won't work for me.
    – JohnA
    Mar 5, 2014 at 11:46
  • Ok then just make a local repository and install as you like
    – Maythux
    Mar 5, 2014 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .