Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions images/hooks/talos-embed-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,28 +128,25 @@ embed_config() {
echo "Creating ISO with embedded configuration..."
echo " Talos version: ${talos_version}"

# Create output directory for imager
mkdir -p "${WORK_DIR}/out"

# Copy config to a location the imager can access
cp "${config_file}" "${WORK_DIR}/machine.yaml"

# Run the imager to create a new ISO with embedded config
# The imager creates a fresh ISO from scratch - it doesn't modify the downloaded ISO
docker run --rm \
-v "${WORK_DIR}:/work" \
# Mount work dir to /out (imager's default output directory)
docker run --rm -t \
-v "${WORK_DIR}:/out" \
"ghcr.io/siderolabs/imager:${talos_version}" \
iso \
--arch amd64 \
--output-path /work/out \
--embedded-config-path /work/machine.yaml
--embedded-config-path=/out/machine.yaml

# Find the generated ISO
local output_iso="${WORK_DIR}/out/metal-amd64.iso"
# Find the generated ISO (imager outputs to /out/metal-amd64.iso)
local output_iso="${WORK_DIR}/metal-amd64.iso"

if [[ ! -f "${output_iso}" ]]; then
echo "ERROR: Output ISO not found: ${output_iso}" >&2
ls -la "${WORK_DIR}/out/" >&2
ls -la "${WORK_DIR}/" >&2
exit 1
fi

Expand Down