[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using emdebian in VirtualBox



On Sat, 15 Jun 2013 23:03:08 +0200
Christian Beer <djangofett@gmx.net> wrote:

> for a distributed computing project we want to execute a statically
> linked executable inside a VirtualBox on different computers. At the
> moment I use a preinstalled debian VirtualBox that is 1.3 GB
> uncompressed (or 300 MB compressed). This is not acceptable because we
> also want to do snapshots of this VirtualBox on the client and not
> consume too much hard disk space.

Your first problem is that reducing the amount of installed data inside
the .vbi will *not* reduce the size of the .ova export. To do that, you
need to make the virtual disc smaller in the first place. Emdebian
could mean that you get more free space within the original image but
it won't change the size of the export except indirectly by reducing
the size of the original.

It is theoretically possible to write zeroes over all of the free space
in the hope that the compression will find it easier to work with this
compared to the typical free space in an image. If you start with an
image file of your own, you could ensure that starts with all zeroes
(dd if=/dev/zero ...) and then use debootstrap to put the system in:

$ sudo apt-get install emdebian-archive-keyring debootstrap
$ sudo debootstrap --keyring /usr/share/keyrings/emdebian-archive-keyring.gpg wheezy-grip wheezy-grip-dbs http://www.emdebian.org/grip /usr/share/debootstrap/scripts/wheezy

That's just theory, whether it actually makes any difference is up to
you to find out.

> I got the tip that I could build a VirtualBox with emdebian and thus
> limit the used disk space. I than tried to understand the documentation
> and also tried to install using the .iso files. The installation failed
> because it couldn't find a package.

The cdimage .iso files are experimental and unofficial. You were also
probably using the Squeeze images (oldstable) which require extra
components to be setup to be able to see all the available packages. The extra components were dropped for Wheezy-Grip (Emdebian Grip 3.0).

You could install standard Debian and then upgrade to Emdebian Grip by
changing the apt sources. That will save space but will *not* make the
final size of the compressed image any smaller.
 
> I'm relative new to the concept of bootstrapping, fake-root, cross
> compiling and stuff.

There is no cross-compiling involved in Emdebian Grip and the other
flavour of Emdebian (Crush) is no longer updated.

> Does anyone has a simple guide on how I can create
> a VirtualBox based installation of emdebian for amd64? I than want to
> test if our application runs in this environment.

Short answer: no. I'm not aware of anyone who has done this. As above,
I think you are misunderstanding how the image will work.

Do you actually need a VM? Can you get away with a simple chroot which
will compress much more easily? You only really need virtualisation to
run a different OS. A Debian, Ubuntu or Fedora system will easily cope
with a compressed chroot of any of the others. A chroot only contains
the files, not the free space, which sounds more like what you wanted
originally.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpfrgYZvbx02.pgp
Description: PGP signature


Reply to: