Repository navigation
Add initial live-build ISO image scripts & integrate into CI workflow - #715
Open
Christopher Obbard (obbardc) wants to merge 15 commits into
Open
Christopher Obbard (obbardc) wants to merge 15 commits into
Christopher Obbard (obbardc) wants to merge 15 commits into
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Christopher Obbard (obbardc)
force-pushed
the
wip/obbardc/iso-installer
branch
from
October 8, 2026 21:32
98d7b1e to
39bce77
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Christopher Obbard (obbardc)
force-pushed
the
wip/obbardc/iso-installer
branch
from
October 16, 2026 14:15
a7a120f to
429d26f
Compare
Christopher Obbard (obbardc)
force-pushed
the
wip/obbardc/iso-installer
branch
from
October 16, 2026 14:24
429d26f to
43904f4
Compare
This comment has been minimized.
This comment has been minimized.
Christopher Obbard (obbardc)
force-pushed
the
wip/obbardc/iso-installer
branch
10 times, most recently
from
October 18, 2026 12:38
f75695e to
363d533
Compare
This was referenced Oct 20, 2026
Christopher Obbard (obbardc)
force-pushed
the
wip/obbardc/iso-installer
branch
3 times, most recently
from
November 6, 2026 10:48
6b52e1c to
dfa0816
Compare
Loïc Minier (lool)
left a comment
Contributor
There was a problem hiding this comment.
I started reviewing this, but it's way too big; I'm worried that I won't have a block of time large enough to review this. Can we split this somehow? Ideas:
- reduce scope
- separate installer and live image work
- keep improvements to initramfs-tools and dracut to separate PRs, ideally to overlay package
- use our branch of live-build / send patches to upstream live-build
I've left a few suggested improvements, but I didn't manage to review everything.
| - cron: '00 13 * * *' | ||
| # allow manual runs | ||
| workflow_dispatch: | ||
| # HACK: temporary, drop before merging: build the installers on pushes |
Contributor
There was a problem hiding this comment.
(reminder to drop)
| jobs: | ||
| event-file: | ||
| name: "Upload event file" | ||
| # HACK: temporary, drop before merging: skip PRs from the installer branch |
| set -eux | ||
| mkdir -v kernel | ||
| case "${KERNEL}" in | ||
| qcom-7.2|qcom-next) |
| EOF | ||
| apt update | ||
|
|
||
| # download the real linux-image-<version> package the kernel's |
Contributor
There was a problem hiding this comment.
this feels like a lot for github CI; let's maybe have a standalone script that does whatever is needed for the image, and call it from GH workflow?
Christopher Obbard (obbardc)
force-pushed
the
wip/obbardc/iso-installer
branch
2 times, most recently
from
November 13, 2026 19:50
6ad1342 to
888f30c
Compare
Christopher Obbard (obbardc)
force-pushed
the
wip/obbardc/iso-installer
branch
2 times, most recently
from
November 26, 2026 14:35
e921fcd to
1d89d93
Compare
Christopher Obbard (obbardc)
marked this pull request as ready for review
November 26, 2026 14:54
Christopher Obbard (obbardc)
force-pushed
the
wip/obbardc/iso-installer
branch
from
November 27, 2026 18:03
1d89d93 to
593bfcb
Compare
The installer image is an iso-hybrid image, which d-i's cdrom-detect and live-boot mount as ISO 9660, so the kernel needs ISO9660_FS. The values match Debian's kernel config. The live squashfs uses live-build's default xz compression, which squashfs.config already enables. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Debian's own installer images can't boot Qualcomm devices: they lack the kernel, firmware and DTB handling these need. Add a live-build based script that builds a debian-installer cdrom image as an iso-hybrid image, which can be written to a USB stick and booted by the UEFI firmware, as the base for the customisations that follow. The image only carries the installer and its pool, so live-build's rootfs stages are skipped. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
The stock d-i kernel doesn't support the Qualcomm hardware. Replace the installer's kernel and modules with the ones from the given linux-image package, trimmed to what the installer needs, and add the package to the pool so the target installs the same kernel. Drop the stock kernel's packages and module udebs from the pool, which the custom kernel can't use, along with the udebs for hardware the image doesn't target. Pass the kernel arguments the Qualcomm devices need from kernel/kernel-cmdline to live-build's boot entries, and to the target through d-i's add-kernel-opts, as d-i doesn't copy the arguments before the "---" to the target. Name the build directory after the suite and the kernel, so builds of different kernels don't collide, and add Makefile targets to build and clean it. Unpack the d-i initrds without their device nodes (dev/console and dev/null) and write the nodes back as a second cpio archive after the repacked one, which the kernel unpacks in turn. Unpacking made cpio mknod them, which needs CAP_MKNOD, and a rootless (e.g. podman) container lacks it even with --privileged. fakeroot isn't an option, as it hung in the CI container. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
live-build's pool only holds the bootstrap packages and lb installer's short list, all without Recommends, so steps of the install that install more packages into the target fail without a network. Add the packages d-i installs itself, and tasksel's standard task, so a standard system can be installed offline. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
The target needs the device firmware to bring up storage, display, DSPs and wifi. Add the firmware packages to the pool and install them on the target, and enable non-free-firmware there. Stop lb installer from adding every package that ships firmware to the pool, which pulls in many unrelated packages, and move the firmware from the pool's non-free component, where live-build files it, to non-free-firmware, which the image's Release lists. On trixie, take the firmware from trixie-backports, as trixie's is too old for newer kernels. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
The device's firmware doesn't provide a usable device tree, so the kernel can't boot from GRUB on its own. Wrap the installer kernel with Stubble, bundling the DTBs from the kernel package that have a Stubble HWID entry, so that the right device tree is loaded for the machine. The installed system needs the same handling, but no package ships the files it needs. Run a post-install step from d-i's late_command, which sources the postinst.d parts from the image in the target, and add a part that installs the dtb-loader kernel hooks there, from the rootfs overlay in debos-recipes/overlays/ so the images and the installer agree. Install stubble and systemd-boot-efi from the pool for them. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Installing from the pool alone leaves the target without an APT mirror, so it can't install updates or more packages. Offer a network mirror (and backports on stable suites) in the installer, which needs apt-mirror-setup that live-build's udeb_exclude would otherwise drop. Also skip the root login and swap questions, which don't make sense for these machines, and add sudo to the pool for the first user. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Let the hardware be tried out before installing anything: build a live GNOME system from live-build's chroot, with the custom kernel and the firmware, and boot it by default from live-build's menu. Use the kernel's version as the flavour so the live entry finds it, pass it the kernel arguments too, and drop the fail-safe entry, which lacks them. Add Calamares to it to install the live system to disk, running the same post-install step as d-i does on the target. The installer stays the same, and installs from the pool as before. Also add GNOME's task to the pool and tick it by default in tasksel, so the target can get the same desktop offline. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
The image depends heavily on live-build's behaviour, and the suite's live-build package differs between trixie and forky and changes whenever the archive does. Add setup-build-host.sh, which installs live-build from its git repository instead, pinned to a commit, so every build uses the same live-build and it only changes when the pin is bumped, along with its dependencies, stubble and the Qualcomm Linux APT repository. It expects a forky host for every target suite, so all builds share the same host tools, matching the live-build from git, rather than the target suite's older debootstrap, squashfs-tools and xorriso, and stubble from trixie-backports. live-build bootstraps the target suite's chroot itself, so the image still has the target suite's packages. Add download-kernel.sh to download the linux-image package a kernel metapackage (e.g. linux-image-qcom-next) depends on from that repository. Both are shared by CI and local container builds, so they build the same way. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Build the installer images for the CI kernels every night, so that changes to the installer or the kernels which break them are caught, and so that there are recent images to test with. Build in a forky container for every suite, with installer/setup-build-host.sh. Anything lb runs on the host (e.g. debootstrap, mksquashfs, the host stubble's HWID database) is then forky's, which could make a trixie image differ from one built on trixie; revert to a per-suite container if trixie builds misbehave. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Building the installer locally needs live-build and its dependencies on the host, and the host's live-build and tools may differ from the ones CI builds with. Add build-installer-container.sh, which sets up a privileged forky container with setup-build-host.sh and builds in it, as CI does, so a local build matches CI's and the host only needs podman or docker. Like CI, it downloads the kernel given by --kernel (e.g. qcom-next or qcom-7.3) from the Qualcomm Linux APT repository for the suite, or takes a locally built kernel package instead, so a kernel under development can be tried without publishing it. Rootless podman can't set up the loop devices live-build uses, even with --privileged, so run podman as root through sudo when it is rootless. Even as root, a privileged container gets a static copy of the host's /dev, so loop devices that losetup creates during the build do not show up in it; bind-mount the host's /dev so they do. The build tree is then owned by root, so create installer/build as the calling user first, and hand the tree back to them once the build succeeds. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Add run-installer-qemu.sh, which boots the image in QEMU on an arm64 host with KVM, attached as a USB stick with a virtio disk to install to, so the installer can be tried without hardware. Boot QEMU with a DT rather than ACPI: QEMU's SPCR table makes the serial port the preferred console over the image's console=tty0, so d-i would run on serial instead of the screen. Keep virtio-gpu and simpledrm in the installer initrds, so d-i has a display in QEMU. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Explain how to build the installer image, run it in QEMU and how the image and the target are customised, and point to it from the README. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
The PR for the installer branch doesn't change the debos images, so building and testing them for every push only wastes the runners and LAVA. Drop before merging. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
The nightly installer builds only run from main, so the installer branch can't be tested before it is merged. Also build on pushes to it. Drop before merging. Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Christopher Obbard (obbardc)
force-pushed
the
wip/obbardc/iso-installer
branch
from
November 28, 2026 11:58
593bfcb to
5a1eefc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add basic infrastructure for building Debian ISO images using live-build and integrating into the existing workflows.
These images boot to a live GNOME image, which contains the standard apps as well as the Calamares installer. Also, the standard Debian installer is available.
The main customisations in the image is around the integration of the Stubble DTB loader and kernel cmdline parameters, both in the installer and the installed image.
Depends on qualcomm-linux/pkg-linux-qcom#200
Closes #684