You may build and test your live image with QEMU many times. Here are two ways you can save time and bandwidth by reusing cached deb package files instead of repeatedly downloading them.

Reuse the packages cached in debian-live/cache/*

The simplest way to build the initial live ISO image is by using the command "make-live". It is issued in the directory you have chosen for the build root.

# cd {build root}
{build root}# make-live config

(Make optional configuration changes to {build root}/debian-live/config)

{build root}# make-live

After the first build, downloaded deb packages remain in these directories:

{build root}/debian-live/cache/packages_bootstrap  
{build root}/debian-live/cache/packages_packages  
{build root}/debian-live/cache/packages_packageslists

You can reuse these packages in subsequent builds by using live-helper commands directly rather than using "make-live" again. The live-helper commands are "lh_clean" (to clean up the build directories) and "lh_build" (to build the new image). They must be issued from the "{build root}/debian-live" directory.

{build root}# cd debian-live
{build root}/debian-live# lh_clean
{build root}/debian-live# lh_build

Cache package downloads with apt-cacher

If you are likely to build from scratch repeatedly using "make-live", you can set up apt caching on your computer. Install apt-cacher and configure live-helper to fetch deb files from the apt-cacher cache. If the file does not exist in its cache, apt-cacher will download it from the mirror you normally use and store it in the cache for future use.

Install apt-cacher

# aptitude install apt-cacher

Configure apt-cacher by editing "/etc/default/apt-cacher"

# nano /etc/default/apt-cacher

Enable apt-cacher by setting the daemon to start at boot time (AUTOSTART=1). You can change the port or leave it as the default (3142).

The location of the cache is set in /etc/apt-cacher/apt-cacher.conf. The default is "cache_dir=/var/cache/apt-cacher"

Start the apt-cacher daemon

# /etc/init.d/apt-cacher start

Apt cacher will now be used whenever you fetch a package from the new local mirror http://localhost:3142/{debian mirror}. For example, http://localhost:3142/ftp.debian.org/debian/.

Configure live-helper to use apt-cacher

Set up a new build directory.

# cd {build root}
{build root}# make-live config

Edit {build root}/debian-live/config/bootstrap.

# nano {build root}/debian-live/config/bootstrap

Set the build environment's main mirror and the mirror for security updates to use apt-cacher by inserting localhost:3142/ after http://.

# $LIVE_MIRROR_BOOTSTRAP: set mirror to fetch packages from
# (Default: http://ftp.debian.org/debian/)
LIVE_MIRROR_BOOTSTRAP="http://localhost:3142/ftp.debian.org/debian/"

# $LIVE_MIRROR_BOOTSTRAP_SECURITY: set security mirror to fetch packages from
# (Default: http://security.debian.org/)
LIVE_MIRROR_BOOTSTRAP_SECURITY="http://localhost:3142/security.debian.org/"

You can do the same for the binary image's mirrors. These are the mirrors that end up in the image's /etc/apt/sources.list. This will save you the few minutes needed to download the "Release" and "Packages" files from the repository while you are building the image. However, these mirrors will not be available to the final live ISO image. If you wish to have a usable /etc/apt/source.list in the final live image, remove "localhost:3142/" from these two entries before the final build.

# $LIVE_MIRROR_BINARY: set mirror which ends up in the image
# (Default: http://ftp.debian.org/debian/)
LIVE_MIRROR_BINARY="http://localhost:3142/ftp.debian.org/debian/"

# $LIVE_MIRROR_BINARY_SECURITY: set security mirror which ends up in the image
# (Default: http://security.debian.org/)
LIVE_MIRROR_BINARY_SECURITY="http://localhost:3142/security.debian.org/"

Try a new build

{build root}# make-live

Check that the screen messages show files being downloaded from the "localhost" mirror.

As this is the first time it will take as long as usual, but the debs are being cached. The next time you repeat the process ("configure live-helper to use apt-cacher" and "try a new build") it will take much less time.