210 Commits

Author SHA1 Message Date
Dmitrii Sharshakov
9758bd4fe0
feat: update Go to 1.26
Via tools/pkgs, also pulling in Clang-built Linux

Update go.mod dependencies

Fix linter errors with new golangci-lint, modernize, use new()

Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-02-19 22:15:19 +01:00
Andrey Smirnov
ddd6b186eb
refactor: generate GRUB images
Simplify the flow a bit by using live partition info,
avoid doing some calculations which are already done in the
partition code.

Remove some steps I believe we don't need to do.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-01-21 16:37:25 +04:00
Noel Georgi
70e67787d6
feat: imager: populate filesystems with root owned files
Populate filesystems from source directories with root owned files.
This completes running imager fully rootless.

Fixes: #12498

Signed-off-by: Noel Georgi <git@frezbo.dev>
2026-01-05 21:13:42 +05:30
Noel Georgi
dc2009e477
chore: use context when creating filesystems
Pass in context when creating filesystems with `mkfs.*` commands.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2026-01-05 15:29:35 +05:30
Noel Georgi
226cd6bc1d
fix: do not allocate for the actual disk image file
Do not allocate space for the actual full disk image file, this defeats sparsing.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-12-26 15:03:15 +05:30
Noel Georgi
53f5bf8d2c
fix: overlay installers
Overlays installers assume the `/boot/EFI` path, so we generate assets into `/boot/EFI` then move that directory to the mountPrefix+/EFI.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-12-26 15:03:11 +05:30
Noel Georgi
77086694d1
fix: partition data population
`FileSystemTypeZeroes` and `FileSystemTypeNone` doesn't need data to be populated.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-12-26 15:03:03 +05:30
Noel Georgi
4d5657b1a3
fix: drop SBC board code
Boards were deprecated in favor of overlays from Talos 1.7.

Now completely remove all board specific code.

Part of: #12492

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-12-26 14:45:17 +05:30
Noel Georgi
8f2b337994
feat: imager support rootless builds
Also changes the bootloader interface.
Disks are formatted/created with pre-populated source directories in Install/Image mode.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-12-24 11:02:37 +05:30
Noel Georgi
c7525a97ef
feat: support creating filesystems from folder
Support creating filesystems from `SourceDirectory`, this implies partitions can have the data populated when formatted.

ImageCache handling is now using `SourceDirectory` while formatting simplifying the code.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-12-23 18:13:01 +05:30
Noel Georgi
e2bffb5ceb
chore: refactor imager code so it's more clear
Refactor imager code to simplify code flow.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-12-23 18:12:58 +05:30
Andrey Smirnov
ba13b67865
fix: correct condition to use UKI cmdline in GRUB
Use UKI cmdline either if the config is missing completely, or if the
incomplete machine config is present (we are in maintenance mode).

Fixes #12349

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-12-05 16:28:07 +04:00
Andrey Smirnov
6063fbf912
feat: update dependencies
Many small changes, linting fixes, migration to moby/moby client
package.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-14 14:49:44 +04:00
Andrey Smirnov
92eeaa4826
fix: update YAML library
Update COSI, and stop using a fork of `gopkg.in/yaml.v3`, now we use new
supported for of this library.

Drop `MarshalYAMLBytes` for the machine config, as we actually marshal
config as a string, and we don't need this at all.

Make `talosctl` stop doing hacks on machine config for newer Talos, keep
hacks for backwards compatibility.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-04 15:21:57 +04:00
Andrey Smirnov
ec0a813fac
feat: unify cmdline handling GRUB/systemd-boot
Use cmdline from the UKI in Talos 1.12+ by default for new installs.

This brings GRUB in line with systemd-boot vs. cmdline behavior.

Fixes #12019

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-17 16:00:46 +04:00
Andrey Smirnov
493f7ed9d2
feat: support embedded config
Support embedding machine config via a virtual extension to
a fixed path.

Fixes #11824

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-09-26 16:27:53 +04:00
Mateusz Urbanek
1fc670a08d
fix: dial with proxy
Fixes #11536

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-08-18 09:53:14 +02:00
Andrey Smirnov
c079119337
chore: refactor how tools are being installed
Move stuff into `tools/go.mod`.

Also fix linting issues on the way (updating golangci-lint).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-14 17:45:39 +04:00
Andrey Smirnov
7e6052e63a
feat: increase boot partition to 2 GiB
See https://github.com/siderolabs/talos/discussions/10994

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-22 14:48:00 +04:00
Andrey Smirnov
a966321cce
fix: add more bootloader probe logs on upgrade
See #11210

This doesn't fix anything, but the logs will be more helpful to
understand what exactly is wrong.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-11 16:07:09 +04:00
Andrey Smirnov
4da2dd537d
feat: enforce Kubernetes version compatibility
Fixes #11198

We should enforce in following places:

* before starting `upgrade-k8s`, check that all Talos machines would end
  up with a valid version
* validate in Talos machine configuration, this will cover both
  upgrades, new installs, and any machine configuration manual edits

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-06-27 20:03:23 +04:00
Noel Georgi
250fc1413c
feat: support xfs mkfs config version
Use xfs mkfs config versions based on Talos versions.

Fixes: #9955

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-04-04 08:39:33 +02:00
Noel Georgi
8f918a34e1
fix: upgrades with kexec
Fix by setting the default booted entry as like sd-boot.

Fixes: #10577

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-03-31 17:34:07 +05:30
Noel Georgi
2b8e082344
feat: deprecate .machine.install.extensions
Fully deprecate `.machine.install.extensions`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-03-14 17:45:57 +05:30
Noel Georgi
b1d410cb62
feat: dual boot disk image
Generate disk image with both grub and sd-boot.

Fixes: #10332

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-02-25 21:21:10 +05:30
Robin Elfrink
7ce053638d
fix: ignore digest part of images when checking version
When using digests with images in machineconfig (e.g.
`repo/kubelet:v1.32.1@sha:...`) strip the digest part before checking
semantic version validity.

Signed-off-by: Robin Elfrink <robin@15augustus.nl>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-02-14 15:50:44 +04:00
Andrey Smirnov
8212e4864d
refactor: use quirks in kernel args
Make default args depend on quirks, and also pass quirks down to
platform code.

Reduces amount of hacks, but it is functionally equivalent.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-12-23 18:52:06 +04:00
Noel Georgi
939c555f9a
fix: imager disk image-cache generator
Move things around so `talosctl` is not dependent on `go-blockdevice`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-26 21:47:08 +05:30
Noel Georgi
1bac0b183a
feat: support generating disk images with image cache
Add support for generating disk images with image cache.

Fixes: #9616

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-26 18:52:25 +05:30
Noel Georgi
77cf84fb57
feat: support generating iso with imagecache
Support generating iso with imagecache.

Part-of: #9616

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-21 20:40:05 +05:30
Noel Georgi
682718d4c9
fix: use imager incoming version for extension validation
Use the version coming from imager to validate extension constraints.

Part of : #9694

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-12 15:26:59 +05:30
Andrey Smirnov
6f7c3a8e5c
fix: build of talosctl on non-Linux arches
Move META constants out to machinery, and fix up imports. The internal
`pkg/meta` package shold not be consumed in public-facing commands.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-08-30 22:17:38 +04:00
Andrey Smirnov
b453385bd9
feat: support volume configuration, provisioning, etc
This implements the first round of changes, replacing the volume backend
with the new implementation, while keeping most of the external
interfaces intact.

See #8367

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-08-30 18:32:34 +04:00
Noel Georgi
19a44c2b0b
chore: drop console ttyS0 argument
Drop `console=ttyS0` argument for metal images/installer.

`console=ttyS0` causes lot of issues with bare metal hardware when
trying to use a physical serial port.

Ref:

* https://bugzilla.redhat.com/show_bug.cgi?id=1839923
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763601;msg=17
* https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html
* https://github.com/coreos/fedora-coreos-tracker/issues/567

Fixes: #8695
Fixes: #8657
Fixes: #8127

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-08-27 22:24:59 +05:30
Jean-Francois Roy
fd54dc191d
feat(talosctl): append microsoft secure boot certs
This patch adds a flag to `secureboot.database.Generate` to append the
Microsoft UEFI secure boot DB and KEK certificates to the appropriate
ESLs, in addition to complimentary command line flags.

This patch also includes a copy of said Microsoft certificates. The
certificates are downloaded from an official Microsoft repo.

Signed-off-by: Jean-Francois Roy <jf@devklog.net>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-07-22 14:15:42 +04:00
Dmitriy Matrenichev
dad9c40c73
chore: simplify code
- replace `interface{}` with `any` using `gofmt -r 'interface{} -> any -w'`
- replace `a = []T{}` with `var a []T` where possible.
- replace `a = []T{}` with `a = make([]T, 0, len(b))` where possible.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-07-08 18:14:00 +03:00
Andrey Smirnov
be35f380cc
chore: update pkgs/tools/extras
This brings in Go 1.22.5 and new Flannel CNI plugin.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-07-03 20:38:55 +04:00
Andrey Smirnov
82d9cd3229
fix: add upgrade errata for arm64/zboot kernels
Fixes #8854

Talos 1.8.0 instroduces EFI ZBoot compression, and kexec from 1.7.0 to
compressed kernel doesn't work.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-06-03 20:10:24 +04:00
Andrey Smirnov
92a274e9a0
fix: workaround problems with udevd races
When `udevd` rescans block device partitions while Talos is doing
partitions, it might be that Talos can hit the following error
while trying to open/mount a partition:

```
no such device or address
```

Previous attempts to fix that were using `ENODEV`, while the proper code
is `ENXIO`.

Also take exclusive lock while working with user disks to prevent
concurrent udevd rescan.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-05-24 21:22:07 +04:00
Artem Chernyshev
42ac5cd0c2
fix: check for nil machine config during installation
Otherwise we get `nil reference` exception during maintenance mode
upgrade with partial machine configs.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2024-05-08 16:34:55 +03:00
Andrey Smirnov
4c0c626b78
feat: use zstd compression in place of xz
Initramfs and kernel are compressed with zstd.

Extensions are compressed with zstd for Talos 1.8+.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-04-29 18:09:12 +04:00
Andrey Smirnov
0a785802ea
fix: overlay installer operations
1. Use overlay installer to build the `cmdline` when running in
   install/upgrade mode.

2. Pull down the overlay installer with the arch specific to the
   installer being generated, vs. the arch of the `imager`.

3. Print a message when running an overlay installer.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-04-16 20:07:44 +04:00
Artem Chernyshev
3dd1f4e88c
chore: extract pkg/imager/quirks to pkg/machinery
To make it possible to use it without pulling the whole Talos.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2024-04-15 21:37:47 +03:00
Andrey Smirnov
090143b030
fix: allow platform cmdline args to be platform-specific
Fix Equnix Metal (where proper arm64 args are known) and metal platform
(using generic arm64 console arg).

Other platforms might need to be updated, but correct settings are not
known at the moment.

Fixes #8529

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-04-02 14:41:39 +04:00
Niklas Wik
0fc24eeb09
feat: provide insecure flag to imager
provides flag for imager to pull images insecurely from private registries

Signed-off-by: Niklas Wik <niklas.wik@nokia.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-04-01 15:53:56 +04:00
Andrey Smirnov
7d43c9aa6b
chore: annotate installer errors
I want to catch a spurious error `ENODEV`, where exactly it comes from.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-03-21 16:58:34 +04:00
Dmitriy Matrenichev
19f15a840c
chore: bump golangci-lint to 1.57.0
Fix all discovered issues.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-03-21 01:06:53 +03:00
Noel Georgi
952801d8b2
fix: handle overlay partition options
Handling of Overlay PartitionOpts was missed in the previous code.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-03-14 15:39:59 +05:30
Noel Georgi
d118a852b9
feat: implement Install for imager overlays
Implement `Install` for imager overlays.
Also add support for generating installers.

Depends on: #8377

Fixes: #8350
Fixes: #8351
Fixes: #8350

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-03-12 22:46:29 +05:30
Artem Chernyshev
3c8f51d707
chore: move cli formatters and version modules to machinery
To be used in the `go-talos-support` module without importing the whole
Talos repo.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2024-03-07 16:29:15 +03:00