Skip to content
Etienne Dublé edited this page Oct 20, 2022 · 5 revisions

The most simple way of generating a bootable image using debootstick is to follow the steps listed below.

  1. Generate a chroot environment:
debootstrap --arch=amd64 --variant=minbase focal /tmp/focal_chroot  # use different path in case /tmp/ is mounted noexec
  1. Customize it:
$ chroot /tmp/focal_chroot
$ passwd       # update root password
$ [...]        # other customizations
$ exit         # exit from chroot
  1. Generate the bootable image:
$ debootstick /tmp/focal_chroot /tmp/img
  1. Test it with qemu/kvm.
$ cp /tmp/img /tmp/imgtest       # let's work on a copy
$ truncate -s 16G /tmp/imgtest   # simulate a copy on a 16G-large USB stick
$ kvm -m 2048 -hda /tmp/imgtest  # the test itself
  1. Copy the boot image to a USB stick or disk.
$ dd bs=10M if=/tmp/img of=/dev/your-device

Clone this wiki locally