DEBOOTSTICK(8)

NAME
debootstick - Generate a bootable image from a Debian-based chroot environment

SYNOPSIS
debootstick [options] SOURCE DEST

DESCRIPTION
debootstick generates a bootable image (at DEST) from a Debian-based chroot environment (at SOURCE).

SOURCE must be a directory containing a standard Debian-based chroot environment (such as one generated with debootstrap(8)). The output image generated at DEST should then be copied to a USB stick or disk.

The embedded system is:
- ready to be used (no installation step)
- viable in the long-term, fully upgradable (kernel, bootloader included)
- compatible with BIOS and UEFI systems

OPTIONS
debootstick follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below.

-h, --help
    Show summary of options.

-v, --version
    Show version of program.

--help-os-support
    Describe which chroot environments are supported.

--config-root-password-ask
    Prompt for the root password of the embedded system and set it accordingly.

--config-root-password-none
    Remove the root password of the embedded system (root login will not prompt any password).

--config-grub-on-serial-line
    Update grub configuration to show boot menu on serial line.

EXAMPLES
The most common workflow is the following.

1- Generate a chroot environment:
debootstrap --arch=amd64 --variant=minbase trusty /tmp/trusty_tree

2- (Optionaly) customize it:
chroot /tmp/trusty_tree; [...]; exit

3- Generate the bootable image:
debootstick --config-root-password-ask /tmp/trusty_tree /tmp/img.dd
Enter root password:
Enter root password again:
OK
[...]

4- Test it with kvm.
cp /tmp/img.dd /tmp/img.dd-test # let's work on a copy, our test is destructive
truncate -s 2G /tmp/img.dd-test # simulate a copy on a 2G-large USB stick
kvm -hda /tmp/img.dd-test # the test itself (BIOS mode)

5- Copy the boot image to a USB stick or disk.
dd bs=10M if=/tmp/img.dd of=/dev/your-device

The USB device may now be booted on any amd64 system (BIOS or UEFI).

NOTES
It is also possible to test the UEFI boot with kvm, if you have the ovmf package installed, by adding -bios /path/to/OVMF.fd to the kvm command line.

Many Live distributions propose a highly compressed system based on a squashfs image. They handle writes using an overlay based on a filesystem union. While this allows the system to remain compact in the first times, this also has disavantages:
- Some important files remain read-only and cannot be upgraded (that is the case of the linux kernel and the bootloader) which quickly leads to security issues or upgrade problems.
- Storing modified files in an overlay and never releasing the room needed for the original versions in the squashfs image is counter-productive in the long term.
One of the objectives behind debootstick was to provide a viable long-term live system, therefore this kind of setup has been discarded.

AUTHOR
Etienne Duble (etienne.duble@imag.fr)

SEE ALSO
debootstrap(8), kvm(1).