Remote install

Tutorials >

Back in 2012, I was trying everything I could do to get a customised Live CD put together so that I could start installing Debian on other PC's. I spent a long time learning how to use Live Helper, and tweaked it so that I could get a Live CD to install with about 95% of the apps and config I wanted. But then how about updating the Live CD? Another build process over the internet that can take hours.

More recently I've had success with refractasnapshot (system backup page), which makes a Live CD from an installed system. So from the system installed with my Live Helper-made Live CD, which I upgraded and dist-upgraded, and tweaked with all the config I wanted, I made a snapshot of it and now I have a grand "2nd generation" Live CD.

So, if you were to use Live Helper, you probably shouldn't spend so much time getting the config files into it, and hefty-sized deb archives, but try to build just a basic Live Debian to install on a test-bed partition. Then boot into that and make all the fine tuning you need. Finally build your 2nd and better Live CD with refractasnapshot, or even partclone (see my system backup page for those two).

Cloning the apt-cache!

I've been pondering on the task of installing Linux (Debian wheezy LXDE) to remote laptops (zero internet connectivity), but having a connected laptop at base.
Obviously, a customised Live CD would be the ideal option of installing the system with all the app's needed.
Otherwise, I could "clone" my install on the connected laptop by using the same Live CD on the remote PC's and copying the apt index and apt cache onto them. But would it work?

On connected laptop (a):
  1. Install Live CD X (preferred Debian)
  2. Remove/install apps and make apt-get remove line Y, install line Z
  3. Copy /var/lib/apt/lists/ (Apt-L), /var/cache/apt/ (Apt-C), plus config files (CF), /etc/apt/sources.list (SL), from /usr/lib/chromium/plugins to a USB stick

on remote laptop (b)
  1. Install X
  2. Fine details: add user to sudoer, "no recommends" file, edit fstab
  3. copy over Apt-L and Apt-C
  4. Execute apt-get lines Y and Z
  5. Copy over config files and CTRL-ALT F2, reboot
  6. Install other apps from deb's
  7. Copy over SL to (b) (in case of internet connectivity later) and attempt wireless driver install on (b) to make internet-ready
  8. Copy over

Future update of laptop (b) should be possible too.
  1. on (a) apt-get clean & apt-get update & apt-get upgrade
  2. copy Apt-L and Apt-C from (a)
  3. delete and replace Apt-L and Apt-C on (b) with those new from (a)
  4. on (b) run apt-get upgrade

This page here is very helpful method for installing packages on a PC with no internet connection. If it is an unknown Debian install, or it's out of date, or out of sync with the connected machine (a), then it would be necessary to find out which packages are needed as there may well be many more needed than the base PC (a) would need during an update.

The right tool

Well, now I found there's a tool that's just right for this... Keryx. It makes a database for a target box, ie with what packages it has, and what versions, and then uses an online box to retrieve what it needs to update or install new on the target - all via a USB stick.

see about... Get it here


Firstly, make a working directory where you've got some space

this is the basic build command, which may be out-dated by now:
fill in your own preferred mirror!

to make the profiles file (with package names), in my-simple-cdd dir:

simple-cdd defaults to just using main, so to also use contrib and non-free, put this in profiles/default.conf:

set up approx to cache packages
I still can't get this to work.

set the mirror and un-comment some lines in the file


import the apt cache into approx cache (only if deb files are recent)

lastly, invoke simple-cdd to pull from approx cache

useful read: live-manual/customization-overview....

1. install

add sid snapshots to sources list (not sure if this is still required?)

now find some space on a partition where all the live-build work will take place
(that will build the basic config tree)

2. Congfiguring how the live cd will be built

The command is run with options to build what you want:

example 1.

example 2.

example 3.

You can keep using "lh config" with different parameters to set up the configuration before building -but note that you can't override one that's been set unless you do a "lh clean" -it is better to use an auto script (see below). The "chroot" mirror is where packages will come from and the "binary" is what the Live CD will be set to (chroot mirror should default to --mirror-bootstrap). See

The 486 flavour with i386 architecture, or 686 with amd64, is essential for the live installer to work, or else you will just have a Live CD, so the man page says.

Or use an auto script
All config options can be put into an auto script so that one only needs to run "lh config" and the options are set from the script.


edit auto/config to look something like this -adapt to your preference, with amd64/686 or whatever. Here's how it looks with my example 3, #!/bin/sh
lb config noauto \
--architectures i386 \
--linux-flavours 486 \
--mirror-bootstrap \
--mirror-chroot \
--mirror-binary \
--mirror-chroot-security \
--archive-areas "main contrib non-free" \
--apt-recommends disabled \
--apt aptitude \
-d wheezy \
--debian-installer live \

The script is read when lh build is run.

Note: in the file config/bootstrap there is also LB_PARENT_MIRROR_BOOTSTRAP... and LB_PARENT_MIRROR_CHROOT... which seem to override the --mirror-bootstrap and --mirror-chroot parameters so that during the build packages are retrieved from, not from your prefered mirror.

3. Add package lists before the build

updated Oct 2017

su to root and run these in the build directory, to create lists which will be used to install whatever you need to the build:

First of all, those needed for successful build as they are possibly excluded by the "no-recommends" option.

then do either
1. minimal LXDE install

2. plain openbox install

For Thunar

All other apps

For build dependencies

4. Add other/customised packages

Put their .deb archives in config/packages.chroot -for example, most recent XnviewMP, refractasnapshot etc.

! Check the packages names with running dpkg-name *.deb in the dir as they must comply to be included.

Package pinning example
with thunar a few years back, the latest was found in experimental, but it had so many dependencies it failed to install just using packages.

Therefore it was necessary to pin it to the experimental repository, with all other packages defaulting to the config repository, like this


add this content

Omit a package from the build -say, if it is a recommended package or installed by a metapackage, you give it a negative Pin-Priority in config/apt/preferences,

see: .../customizing-package-installation.en.html#466

5. add the multimedia repo

add the multimedia repository (or any repo you like, same method), in my-livecd dir:
copy deb-multimedia-keyring.gpg

6. live-initramfs

(this is not in the recent debian live manual -try without first)
Enable live-helper to use the latest snapshot of live-initramfs with a sources list entry (run in my-livecd dir)

and at binary stage with

get the gpg key:

copy it to the binary

or get the live-boot-initramfs-tools deb file and put it in config/packages.chroot

7. Add files to be included in the Live cd

If you'd like to customize the Live cd environment, with autostart, no recommends files etc, you simply add the files to config/includes.chroot directory with the same dir tree as they need in a real file system.

Set groups for the Live user
make a file
and fill with [include whatever groups you require]

8. Building the live cd

to run live build, cd to my-livecd and enter (sudo or as root)

debian live manual now uses lb build (same thing?)

to cleanup the working directory to build again

to build again with changes to config (this cleans chroot so all the packages will need unpacking again with the next build)

to build with interactive options

The iso file will be created (if successful) in the "my-livecd" directory, which just needs (renaming and) burning to disk or sending to a usb stick.

You can make a live build from your installed system with (haven't tested it myself)


for p in binutils build-essential debhelper dpatch dpkg-dev g++ g++-4.7 gcc gcc-4.7 gettext gettext-base html2text intltool-debian libasprintf0c2 libc-dev-bin libc6-dev libdpkg-perl libgettextpo0 libitm1 libstdc++6-4.7-dev linux-libc-dev make patch po-debconf ;do echo $p >> config/package-lists/catfishdep.list.chroot ;done

for p inautoconf automake autotools-dev binutils build-essential debhelper dpkg-dev g++ g++-4.7 gcc gcc-4.7 gettext gettext-base gir1.2-notify-0.7 gir1.2-polkit-1.0 html2text intltool intltool-debian libasprintf0c2 libatk1.0-dev libc-dev-bin libc6-dev libcairo-script-interpreter2 libcairo2-dev libdbus-1-dev libdbus-glib-1-dev libdpkg-perl libexpat1-dev libfontconfig1-dev libfreetype6-dev libgdk-pixbuf2.0-dev libgettextpo0 libglib2.0-bin libglib2.0-dev libgtk2.0-dev libice-dev libitm1 libnotify-dev libpango1.0-dev libpcre3-dev libpixman-1-dev libpng12-dev libpolkit-gobject-1-dev libpthread-stubs0 libpthread-stubs0-dev libsm-dev libstdc++6-4.7-dev libx11-dev libxau-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfce4ui-1-dev libxfce4util-dev libxfconf-0-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxrandr-dev libxrender-dev linux-libc-dev m4 make patch pkg-config po-debconf x11proto-composite-dev x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-xext-dev x11proto-xinerama-dev xfce4-panel-dev xorg-sgml-doctools xtrans-dev zlib1g-dev ;do echo $p >> config/package-lists/xfce4-pman-dep.list.chroot ;done

Install problems