01-22-06 10:50 PM
Alfred wrote:
> We are trying to clone an IBM kiosk (model # 4835-152) that has Ubuntu
> 5.10 on it. We have Ghost installed and were able to successfully make
> an image and send it to the Ghost server. When I expand it on the
> server, I see each directory and it all works well there. But when I
> try to push this image to multiple kiosks we have tried (each, the same
> model number), each new system reboots and looks like this when done:
>
> GRUB
> _
>
>
> It's hung. My guess is kernel panic.
> 1) Do you know what we need to do in Ghost to get this to work?
I'd think you'd want alt.utilities.norton.ghost
> 2) If not, then can you suggest how to clone Ubuntu systems?
If you want quite identical cloning, you can use standard utilities
such as:
dd(1)
ssh(1)
gzip(1)
bzip2(1)
E.g.:
On the "master", for better compression/bandwidth results:
o null wipe free file system space (e.g:
for tmp in $filesystem_mountpoints
do
(
cd "$tmp" && {
dd if=/dev/zero of=.null.wipe.$$
bs=$filesystem_block_size
rm .null.wipe.$$
}
)
done; unset tmp
Then remount these file systems read-only (ro) or unmount them.
o Temporarily deactivate any swap (leave it configured so it will
activate at (re)boot, but don't use it presently), then null wipe it
(similar to above) then reformat it.
o Null wipe any unused disk space (don't clobber your MBR or partition
table).
o Boot from CD (or DVD or network), or boot from master hard drive(s)
but only with file systems only mounted ro and without activating
swap (this can generally be done with suitable boot options and
careful manual initialization).
o Initialize network, or make other suitable connection(s), then suck
the image via dd and compress it with gzip -9 or bzip2 -9, and save
it to as a "master image" file on some suitable server or media.
E.g:
dd if=/dev/hda bs=512 |
bzip2 -9 |
ssh -x -l $user $repository.server \
'umask 077 &&
cd '"$repository_directory"' &&
exec cat >4835-152.golden.'`date -I`.bz2
That should leave you a fairly well compressed tight little image.
You should also verify it, e.g. do md5sum and/or sha-1 hashes on it,
to make sure what you saved matches your disk image on the master,
e.g., on the master:
dd if=/dev/hda bs=512 | md5sum
and on the $repository.server:
bzip2 -d <$repository_file | md5sum
and make sure they match.
o To install, you essentially reverse the process - except the target
can't be using the local hard drive (must not be using file systems
or swap, etc., from there), so you'd typically boot it from network,
CD-ROM, etc. To install, on the repository server, or from wherever
you have that compressed image available (could even be presented
via NFS to the target):
bzip2 -d <$repository_file |
# and you pipe that to, on the target:
dd of=/dev/hda bs=512
That's basically it. You may want to tweak some things so they're not
too identical (e.g. change file system and volume identifiers, host
keys, wipe earlier log history, etc.) ... preferably you can work some
of those changes into your master image itself - and the remainder can
be done as a script to tweak things after the image is laid down.
[ Post a follow-up to this message ]
|