amduat-api/notes/What works in a container.md
2026-01-17 00:19:49 +01:00

2.3 KiB
Raw Blame History

Yes — you can absolutely do most of this inside a Debian-based container (or even on Linux Mint, which is Ubuntu-based), with some caveats:


1 What works in a container

  • Debootstrap / building the ISO filesystem you can create the chroot and populate it inside a Debian container.
  • Copying your tools (asl-auth-host, asl-rescue, helpers) into the ISO root.
  • Overlay scripts and directory structure fully container-compatible.
  • Generating the ISO using genisoimage or xorriso works fine in a container.

2 What wont fully work in a container

  • ZFS pool creation (zpool create) you need kernel support for ZFS, and containers usually dont have full access to /dev to create loopback-backed pools.

    • Workarounds:

      • Use a loopback file inside the container and mount ZFS on the host after building.
      • Or skip actual pool creation, just pre-create the dataset folder structure, and mount ZFS later on the real machine.
  • Boot testing you can build the ISO in a container, but to actually boot and test, youll need a VM or real hardware.


3 Suggested container workflow

[Host Linux Mint]
       |
       v
[Debian container] --> run build_asl_auth_host_iso.sh
       |
       v
[Output ISO] --> copy to VM or USB to test boot

Steps:

  1. Run a Debian container:
docker run -it --name asl-build -v $PWD/work:/work debian:bullseye bash
  1. Inside the container, install required packages:
apt update
apt install -y debootstrap genisoimage squashfs-tools xorriso
  1. Copy your scripts and binaries into the container (/work folder).

  2. Run the ISO build script (build_asl_auth_host_iso.sh).

  3. Copy the generated ISO back to your host for boot testing.


Bottom line:

  • You can build the ISO entirely in a container.
  • For ZFS pools or boot testing, you need either host privileges or a VM for full functionality.
  • On Linux Mint, the container approach keeps your host clean and reproducible.

If you want, I can rewrite the build script specifically for container-friendly execution, skipping ZFS creation but keeping the dataset folders so its ready to mount ZFS later. This is the smoothest workflow for Linux Mint.

Do you want me to do that?