tgz-g5k - a tool to create neutral deployment tgz image
tgz-g5k is intended to create system deployment image that do not possess any site-flavour.
tgz-g5k remounts root partition to avoid pollution from virtual partitions like
/dev. Then, it archives root partition content excluding some of the site-specific files and overwritting most of the others with their site-neutral counterpart.
If asked, the system archive can be sent on a distant host through a SSH connection after being created on the local host.
System archive creation
System archive creation is a not so easy task and
tgz-g5k is made to provide an easy archive creation command, which deals with the following related issues.
tmpfs filesystem is mounted on
/dev during the boot process of the system. Hence, if you do a create a tar-archive of root filesystem through the
/ mount point, you will not archive the static content of
/dev which does exist on the root filesystem, but which is hidden under udev’s virtual filesystem. Same behaviour happens with
devfs, as a
devfs filesystem is mounted on
So, you will then untar an system environment with nothing in
/dev, which leads to a kernel panic during the boot process of deployed node, because kernel needs the
/dev/null device files for instance, before the
devfs service is started.
To be sure to archive the whole content of the root filesystem,
tgz-g5k remounts it in another location:
/mnt/root. This way, no subsequent mounts on subdirectories, like
/home, are present anymore.
File name's leading
For the system archive to be usable in a deployment managed by
kadeploy, files it contains must be free of any leading characters like
Avoiding leading characters on archive’s files is done by launching the archive creation directly from the root filesystem remount point and specifying all the top files and directories to include in it.
When a system archive is deployed on Grid'5000, resulting system becomes site-specific because of system archive related postinstall and DHCP client generated configuration. So files like
/etc/inittab contains one site’s flavour.
To create an archive that is as far as possible site-neutral,
tgz-g5k excludes some site-specific files from the archive content or replaces them by their neutral counterpart. The
/usr/share/tgz-g5k/insipid directory contains the neutral files data tree used during archive creation.
-h, --help Show summary of options.
-v, --version Show version of program.
ssh root@node tgz-g5k> myimage.tgz
On debian/ubuntu, add the following line in the sources.list file :
deb http://apt.nancy.grid5000.fr/debian sid main
And install it by :
apt-get update apt-get install tgz-g5k
If you just do an upgrade, tgz-g5k should be upgraded automatically.
Take the tarball (for example with wget). Before that make sure you have configure the http proxy; you can take a look at Web_proxy_client
Untar the tarball:
Put your distribution on the second line of the Makefile.(DISTRIB=) Build and install tgz-g5k:
make make install