Skip to content

Commit 788232e

Browse files
committed
doc: minor cleanups to the upgrade & boot order section
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent c13d184 commit 788232e

1 file changed

Lines changed: 43 additions & 50 deletions

File tree

‎doc/upgrade.md‎

Lines changed: 43 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# Upgrading & Boot Order
22

3-
For resilience purposes, Infix maintains two software images referred to
3+
For resilience purposes, the system has two software images referred to
44
as the _primary_ and _secondary_ partition image. In addition, some
55
bootloaders support [netbooting][1].
66

77
The _boot order_ defines which image is tried first, and is listed with
8-
the CLI `show software` command. It also shows Infix version installed
9-
per partition, and which image was used when booting (`STATE booted`).
8+
the CLI `show software` command. It also shows the version installed
9+
per partition, and which image the system currently runs on. This order
10+
is automatically changed when updates are installed.
1011

1112
<pre class="cli"><code>admin@example:/> <b>show software</b>
1213
Boot order : primary secondary net
@@ -17,15 +18,11 @@ secondary inactive v25.01.0 2025-04-25T10:07:20+00:00
1718
admin@example:/>
1819
</code></pre>
1920

20-
YANG support for upgrading Infix, inspecting and _modifying_ the
21-
boot-order, is defined in [infix-system-software][2].
22-
23-
2421
## Changing Boot Order
2522

26-
The boot order can be manually changed using the `set boot-order` command.
27-
This is useful for rolling back to a previous version or changing the
28-
preferred boot source.
23+
The boot order can be manually changed using the `set boot-order` command from
24+
the top-level admin-exec context in the CLI. This is useful for rolling back
25+
to a previous version or changing the preferred boot source.
2926

3027
The command accepts one to three boot targets as separate arguments, in the
3128
desired boot order. Valid boot targets are:
@@ -34,8 +31,7 @@ desired boot order. Valid boot targets are:
3431
- `secondary` - The secondary partition
3532
- `net` - Network boot (if supported by bootloader)
3633

37-
The CLI provides tab-completion for boot targets, making it easy to enter
38-
valid values.
34+
The CLI provides tab-completion for boot targets, simplifying the process.
3935

4036
Example: View current boot order and change it:
4137

@@ -91,9 +87,9 @@ admin@example:/>
9187

9288
## Upgrading
9389

94-
Upgrading Infix is done one partition at a time. If the system has
95-
booted from one partition, an `upgrade` will apply to the other
96-
(inactive) partition.
90+
Upgrading the system is done one partition at a time. If the system has
91+
booted from one partition, an `upgrade` will apply to the other (inactive)
92+
partition.
9793

9894
1. Download and unpack the release to install. Make the image *pkg*
9995
bundle available at some URL[^2]
@@ -245,7 +241,7 @@ maintenance window, can [create its own][6].
245241
<pre class="cli"><code>admin@example:/> <b>show software</b>
246242
Boot order : primary secondary net
247243

248-
NAME STATE VERSION DATE
244+
<span class="header">NAME STATE VERSION DATE </span>
249245
primary booted v26.08.1 2026-09-28T03:02:41Z
250246
secondary inactive v26.08.0 2026-08-30T03:02:12Z
251247

@@ -305,18 +301,28 @@ an occurrence that fires while an install is still running is skipped.
305301

306302
### Hosting Your Own Feed
307303

308-
Any static web server will do. Atom and RSS 2.0 both work, and each
309-
entry links to its release page as `<base>/releases/tag/<tag>`. That URL
310-
gives both the version tag and the base URL, from which the bundle for
311-
each platform is fetched by convention:
304+
Any static web server that honors HTTP range requests will do. The
305+
bundle is streamed rather than downloaded, so a server that ignores
306+
`Range` fails the install. BusyBox `httpd` and nginx both work,
307+
Python's `http.server` does not.
308+
309+
The feed is Atom or RSS 2.0, newest release first. Each entry links to
310+
its release page as `<base>/releases/tag/<tag>`, and that URL is all the
311+
device needs: the last path segment is the tag, the rest is the base
312+
from which the bundle is fetched by convention:
312313

313314
```
314315
<base>/releases/download/<tag>/<image-id>-<tag>.pkg
315316
```
316317

317318
where `<image-id>` is the running system's `IMAGE_ID`, e.g.
318-
`infix-aarch64`. An Atom feed has one `<entry>` per release, each with a
319-
`<link>` whose `href` is the release page:
319+
`infix-aarch64`. The tag goes verbatim into the filename, and a tag
320+
containing `-rc`, `-alpha` or `-beta` counts as a pre-release. The
321+
release page itself does not have to exist, its URL only provides the
322+
tag, the download base, and a link in the update notice.
323+
324+
An Atom feed has one `<entry>` per release, each with a `<link>` whose
325+
`href` is the release page:
320326

321327
```xml
322328
<?xml version="1.0" encoding="utf-8"?>
@@ -350,9 +356,15 @@ element's `<link>`:
350356
</rss>
351357
```
352358

359+
Atom is tried first. When no entry has a `link` with an `href`, the
360+
URLs are read from the text of each RSS item's `link` instead. Either
361+
way the first entry that passes the pre-release filter wins.
362+
353363
The example resolves bundles under
354364
`https://releases.example.com/infix/releases/download/<tag>/`, so lay the
355-
files out to match and name the feed whatever `update-url` points at:
365+
files out to match and name the feed whatever `update-url` points at.
366+
A device looks only for its own `IMAGE_ID`, so one feed can serve
367+
several platforms, with one bundle each per release:
356368

357369
```
358370
infix/
@@ -371,36 +383,16 @@ admin@example:/config/system/> <b>set software update-url https://releases.examp
371383
admin@example:/config/system/> <b>leave</b>
372384
</code></pre>
373385

374-
**Requirements:**
375-
376-
- **Atom or RSS 2.0.** Atom is tried first, reading the `href` attribute
377-
of each entry's `link`. When that finds nothing, the URLs are read from
378-
the text of each RSS item's `link` instead
379-
- **Newest entry first.** Selection follows feed order, so the first
380-
entry that passes the pre-release filter wins
381-
- **The tag is the last path segment** of the release URL, and it goes
382-
verbatim into the bundle filename. A tag containing `-rc`, `-alpha` or
383-
`-beta` counts as a pre-release
384-
- **One bundle per platform**, named `<image-id>-<tag>.pkg`. A device
385-
looks only for its own `IMAGE_ID`, so one feed can serve several
386-
platforms
387-
- **HTTP range requests.** RAUC streams the bundle instead of downloading
388-
it whole, so a server that ignores `Range` fails the install. BusyBox
389-
`httpd` and nginx both work; Python's `http.server` does not
390-
391-
The release page itself does not have to exist, its URL only provides the
392-
tag, the download base, and a link in the update notice.
393-
394386
> [!TIP]
395387
> Serving the feed over HTTPS requires a correct clock on the device, or
396388
> certificate validation fails and every occurrence is skipped. Plain
397389
> HTTP avoids that on an isolated network.
398390
399391
## Configuration Migration
400392

401-
The example above illustrated an upgrade from Infix v25.01.0 to
402-
v25.03.1. Inbetween these versions, YANG configuration definitions
403-
changed slightly (more details given below).
393+
The previous example shows a patch update from Infix v25.01.0 to v25.03.1.
394+
Between these versions, YANG configuration definitions changed slightly,
395+
more details given below.
404396

405397
During boot, the system inspects the `version` meta information within
406398
the startup configuration file to determine if configuration migration
@@ -412,13 +404,14 @@ definitions and applied to `running-config`, while a backup of the
412404
original startup configuration is stored in directory `/cfg/backup/`.
413405

414406
> [!IMPORTANT]
415-
> The migrated configuration is only applied to `running-config`, it is
416-
> not saved. Migration is repeated on every boot until you save it:
407+
> The migrated configuration is only applied to `running-config`, the
408+
> non-volatile `startup-config` is not touched. Migration is repeated
409+
> on every boot until you confirm the upgrade as successful and save it:
417410
>
418-
> admin@example:/> copy running-config startup-config
411+
> <pre class="cli"><code>admin@example:/> <b>copy running-config startup-config</b></code></pre>
419412
420413
<pre class="cli"><code>admin@example:/> <b>dir /cfg/backup/</b>
421-
/cfg/backup/ directory
414+
<span class="header">/cfg/backup/ directory </span>
422415
startup-config-1.4.cfg
423416

424417
admin@example:/>

0 commit comments

Comments
 (0)