Skip to content

Commit 955be8e

Browse files
committed
[boot-to-talos] Introduce simple kexec mode
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
1 parent 0ab71fd commit 955be8e

File tree

3 files changed

+36
-138
lines changed

3 files changed

+36
-138
lines changed

content/en/docs/install/talos/_index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ They have various limitations and optimal use cases:
2525
a simple installation method, which can be used completely from userspace, and with no external dependencies except the Talos image.
2626

2727
Choose this option if you are new to Talos or if you have VMs with pre-installed OS from a cloud provider.
28-
- [Boot to Talos Linux from another Linux OS using `kexec`]({{% ref "/docs/install/talos/kexec" %}}) — another simple installation method,
29-
but with some extra requirements.
3028
- [Install using temporary DHCP and PXE servers running in Docker containers]({{% ref "/docs/install/talos/pxe" %}}) —
3129
requires an extra management machine, but allows for installing on multiple hosts at once.
3230
- [Install using ISO image]({{% ref "/docs/install/talos/iso" %}}) — optimal for systems which can automate ISO installation.

content/en/docs/install/talos/boot-to-talos.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: "Install Talos Linux using boot-to-talos"
33
linkTitle: boot-to-talos
44
description: "Install Talos Linux using boot-to-talos, a convenient CLI application requiring nothing but a Talos image."
55
weight: 5
6+
aliases:
7+
- /docs/talos/install/kexec
68
---
79

810
This guide explains how to install Talos Linux on a host running any other Linux distribution using `boot-to-talos`.
@@ -12,6 +14,17 @@ It works entirely from userspace and has no external dependencies except the Tal
1214

1315
Note that Cozystack provides its own Talos builds, which are tested and optimized for running a Cozystack cluster.
1416

17+
## Modes
18+
19+
`boot-to-talos` supports two installation modes:
20+
21+
1. **boot** – Extract the kernel and initrd from the Talos installer and boot them directly using the kexec mechanism.
22+
2. **install** – Prepare the environment, run the Talos installer, and then overwrite the system disk with the installed image.
23+
24+
{{< note >}}
25+
If one mode doesn't work on your system, try the other. Different methods may work better on different operating systems.
26+
{{< /note >}}
27+
1528
## Installation
1629

1730
### 1. Install `boot-to-talos`
@@ -35,7 +48,10 @@ Make sure to use Cozystack's own Talos build, found at [ghcr.io/cozystack/cozyst
3548
3649
3750
```console
38-
$ boot-to-talos
51+
Mode:
52+
1. boot – extract the kernel and initrd from the Talos installer and boot them directly using the kexec mechanism.
53+
2. install – prepare the environment, run the Talos installer, and then overwrite the system disk with the installed image.
54+
Mode [1]: 2
3955
Target disk [/dev/sda]:
4056
Talos installer image [ghcr.io/cozystack/cozystack/talos:v1.10.5]:
4157
Add networking configuration? [yes]:
@@ -97,7 +113,25 @@ There are builds for several architectures:
97113
98114
Understanding these steps is not required to install Talos Linux.
99115
100-
`boot-to-talos` performs a series of steps after it receives the configuration values:
116+
The workflow depends on the selected mode:
117+
118+
#### Boot Mode
119+
120+
When using the **boot** mode, `boot-to-talos` performs the following steps:
121+
122+
1. **Unpacks Talos installer in RAM**<br>
123+
Extracts layers from the Talos‑installer container into a throw‑away `tmpfs`.
124+
Note that Docker is not needed during this step.
125+
2. **Extracts kernel and initrd**<br>
126+
Extracts the kernel (`vmlinuz`) and initial ramdisk (`initramfs.xz`) from the Talos installer image.
127+
3. **Loads kernel via kexec**<br>
128+
Uses the `kexec` system call to load the Talos kernel and initrd into memory with the provided kernel command line parameters.
129+
4. **Reboots into Talos**<br>
130+
Executes `kexec --exec` to switch to the Talos kernel without a physical reboot. After booting, you can apply Talos configuration to complete the installation.
131+
132+
#### Install Mode
133+
134+
When using the **install** mode, `boot-to-talos` performs the following steps:
101135
102136
1. **Unpacks Talos installer in RAM**<br>
103137
Extracts layers from the Talos‑installer container into a throw‑away `tmpfs`.

content/en/docs/install/talos/kexec.md

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)