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).