<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-build.git/scripts/image-build/raw_image.py, branch rolling</title>
<subtitle>VyOS image build scripts (mirror of https://github.com/vyos/vyos-build.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-build.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-build.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/'/>
<updated>2026-03-02T22:09:28+00:00</updated>
<entry>
<title>Revert "T8265: leave config path hint in raw image install_image"</title>
<updated>2026-03-02T22:09:28+00:00</updated>
<author>
<name>John Estabrook</name>
<email>jestabro@vyos.io</email>
</author>
<published>2026-03-02T20:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=0208d4971ffa06e88970a8f307d352f8fc88861f'/>
<id>urn:sha1:0208d4971ffa06e88970a8f307d352f8fc88861f</id>
<content type='text'>
Revert in favor of alternative approach (T8335).

This reverts commit b92471d684f0131fb8885e766cd90ee80dc8ed38.
</content>
</entry>
<entry>
<title>T8265: leave config path hint in raw image install_image</title>
<updated>2026-02-13T03:36:47+00:00</updated>
<author>
<name>John Estabrook</name>
<email>jestabro@vyos.io</email>
</author>
<published>2026-02-13T02:34:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=b92471d684f0131fb8885e766cd90ee80dc8ed38'/>
<id>urn:sha1:b92471d684f0131fb8885e766cd90ee80dc8ed38</id>
<content type='text'>
The raw_image.py script as part of the build-image tools neglects to
leave the canonical hint file in the config install path. This is
standard in the op mode image_installer.py script and is used to detect
previous installations.
</content>
</entry>
<entry>
<title>Remove a stray debug output</title>
<updated>2025-06-10T14:43:29+00:00</updated>
<author>
<name>Daniil Baturin</name>
<email>daniil@baturin.org</email>
</author>
<published>2025-06-10T14:43:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=75f72ab9013c7ae5226497526e4db6e36dd43678'/>
<id>urn:sha1:75f72ab9013c7ae5226497526e4db6e36dd43678</id>
<content type='text'>
</content>
</entry>
<entry>
<title>T7453: handle dynamic partition mapping in raw image build</title>
<updated>2025-06-06T18:59:22+00:00</updated>
<author>
<name>Gabin-CC</name>
<email>gabin.laurent@rte-international.com</email>
</author>
<published>2025-06-06T18:54:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=02c2e306228a3de24623946499923604341884d3'/>
<id>urn:sha1:02c2e306228a3de24623946499923604341884d3</id>
<content type='text'>
Enhanced the raw image creation logic to dynamically detect and assign
EFI and root partitions based on the number of partitions created by kpartx.

- Supports both 2-partition and 3-partition layouts
- Adds debug output for mapped partitions
- Avoids hardcoded assumptions about partition order
- Improves resilience in cloud-init and containerized build contexts

Fixes build failure when /dev/loopXp3 is missing or not mapped properly.

Signed-off-by: Gabin-CC &lt;gabin.laurent@rte-international.com&gt;
</content>
</entry>
<entry>
<title>T7453: Enhance raw/qcow2 image creation</title>
<updated>2025-06-06T18:58:04+00:00</updated>
<author>
<name>Gabin-CC</name>
<email>gabin.laurent@rte-international.com</email>
</author>
<published>2025-06-05T01:37:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=1cda2d42bb5064868c6435c14a5d3e4b047500d8'/>
<id>urn:sha1:1cda2d42bb5064868c6435c14a5d3e4b047500d8</id>
<content type='text'>
Description
This pull request introduces improvements to the raw_image.py script responsible for building raw disk images in the VyOS build process.

Main Changes
Added use of kpartx to reliably map EFI and root partitions from the loop device.
Introduced disk_details as an attribute on the BuildContext object to pass partition metadata through the image build steps.
Improved the __exit__ method for BuildContext to unmount all mount points and clean up kpartx mappings and loop devices, even in failure cases.
Fixed a crash in mount_image() when con.disk_details was not set.
Added useful debug logs for loop device usage and partition mapping.
Motivation
The previous implementation assumed partitions like /dev/loopXp3 would appear automatically, which is unreliable across some environments (especially containers or newer systems).

This PR makes the process more reliable by explicitly mapping partitions with kpartx, a tool designed for this purpose.

It also ensures proper resource cleanup by unmounting and detaching everything cleanly, preventing leaked loop devices or stale mount points.

Test Instructions

Flavor : cloud-init.toml
packages = [
  "cloud-init",
  "qemu-guest-agent"
]

image_format = ["qcow2"]
disk_size = 10

[boot_settings]
console_type = "ttyS0"

Run:

sudo ./build-vyos-image --architecture amd64 \
  --build-by "you@example.com" \
  --reuse-iso vyos-1.5-rolling-*.iso \
  cloud-init
Expected behavior:

The build completes without errors.
The .qcow2 image file is generated and bootable (e.g., in KVM or Proxmox).
Partitions are mounted correctly via /dev/mapper/loopXp*.

Signed-off-by: Gabin-CC &lt;gabin.laurent@rte-international.com&gt;
</content>
</entry>
<entry>
<title>build: T6904: allow development builds to have version strings</title>
<updated>2024-11-20T15:52:55+00:00</updated>
<author>
<name>Daniil Baturin</name>
<email>daniil@baturin.org</email>
</author>
<published>2024-11-20T15:52:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=1b12eeb9a1e4774644a48d7329655fbf591c791a'/>
<id>urn:sha1:1b12eeb9a1e4774644a48d7329655fbf591c791a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>T6386: added caller workflows and codeowners (#634)</title>
<updated>2024-05-23T06:52:26+00:00</updated>
<author>
<name>Vijayakumar A</name>
<email>36878324+kumvijaya@users.noreply.github.com</email>
</author>
<published>2024-05-23T06:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=e43017472c254c5d0698d1a37f66870ef326fdbf'/>
<id>urn:sha1:e43017472c254c5d0698d1a37f66870ef326fdbf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>build-script: T3664: Add flavor and architecture to image name (rework)</title>
<updated>2024-05-14T18:00:20+00:00</updated>
<author>
<name>zsdc</name>
<email>taras@vyos.io</email>
</author>
<published>2024-05-14T16:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=31b720b8f100670f0e933dfbf9993a5315f5a904'/>
<id>urn:sha1:31b720b8f100670f0e933dfbf9993a5315f5a904</id>
<content type='text'>
The previous version did not work for all flavor types. This one should be
universal.
</content>
</entry>
<entry>
<title>build: T3664: modify the module-level template path</title>
<updated>2024-05-06T16:19:26+00:00</updated>
<author>
<name>Daniil Baturin</name>
<email>daniil@vyos.io</email>
</author>
<published>2024-05-06T16:19:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=58fbf3a226f05d4a5673dff92875e2490fdb1d10'/>
<id>urn:sha1:58fbf3a226f05d4a5673dff92875e2490fdb1d10</id>
<content type='text'>
instead of setting an environment variable
</content>
</entry>
<entry>
<title>build: T3664: fail the build on external command errors</title>
<updated>2024-04-29T14:33:25+00:00</updated>
<author>
<name>Daniil Baturin</name>
<email>daniil@vyos.io</email>
</author>
<published>2024-04-29T14:33:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=7dfd9232da787a7befbc4338d4eb21fee4325174'/>
<id>urn:sha1:7dfd9232da787a7befbc4338d4eb21fee4325174</id>
<content type='text'>
</content>
</entry>
</feed>
