Re: using emdebian in VirtualBox

Neil Williams <[email protected]>
Newsgroups gmane.linux.debian.devel.embedded
Message-ID <[email protected]>
On Sat, 15 Jun 2013 23:03:08 +0200
Christian Beer <[email protected]> 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/
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBCAAGBQJRvOJgAAoJEPFn5DyBQ7aC9qAQAK59DCuJraDKGwFuRILXawcE
iQ2Q7B8Kog5qWKEIZW5eCT1zqK4hP1ll5kOmU1QaTMbgLA6XAG8BK4oIwncgypHb
BBfd8rCop/tjvrz1ocUa3rD9kA19qeVtwNAL+1SKAqTY6PGiPKbn1lzmkCWezAqT
e5bb/iI7jMlusISDTbwxongh1gdWPzrE/Y0pYAocoJdPIexURFFbQjS83bDKWYRe
Pamf8Ovsqz4fp4PG5UTS1BYLmvysKzxAJRUhl6UxYXSqtPrSJ5Nl3juhgpIdLKyD
/z8UYnYgtbga7i8d07D4B1qPXOYWHHL+rSvL3pJnHP8gr+5/XZnCMxN0UPyXg5XL
GJbl0Mep1atAz531OakOLtpqChnKb85luNlMOrUM5IW4H2DTLenGEIcpwIO5PSZB
7A3u8PZ3hRaGfuOHLNbCKVRkwT+rEMTFBUqP2BXMVzhGWUrEVj315ysdrNZj8irO
lR9/VDI2GzpWfOORh0TSdqTBdQBUuWI3tYxR2wz5xGcl03XD7S+L7MLph+Y9jo2L
gJr0ygFRHaXEGlsVes5Lsblxt2Gri00m8aIj+BrCAy+ayqJMpLmgYSjEYjh8tRGb
cfonpDAmpqqcW/ZUR0yQ6tpgS0SZQp+DHqTVeg6YP5EBvmANaIQdplgBhrP3ursB
BjSTYJpkGaDnrZgsD+Jq
=jScB
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.