29 Commits

Author SHA1 Message Date
Andrey Smirnov
7cf1de2794
fix: bring in new version of go-cmd and go-blockdevice
See:

* https://github.com/siderolabs/go-blockdevice/pull/147
* https://github.com/siderolabs/go-cmd/pull/9

Lots of changes through the code as I deprecated `Run`, `RunWithContext`
methods and allow only new `RunWithOptions` to clean up the library
usage.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-02-23 21:06:22 +04:00
Andrey Smirnov
5df10f2604
fix: use mcopy instead of diskfs to populate VFAT
The previous fix (3bd3dd7ca92401312079e37584bfbf7942eab93a) was bad, as
it actually leads to more memory usage by diskfs library.

So drop the library altogether, and populate the filesystem using
`mcopy`. This is also same way as done by `systemd` mkosi script.

Co-authored-by: Noel Georgi <git@frezbo.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-02-18 16:02:23 +04:00
Andrey Smirnov
3bd3dd7ca9
fix: memory overuse in imager VFAT
Use proper `io.Copy` instead of `io.ReadFile`. If the source UKI is
huge, it might momentarily consume lots of RAM.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-02-13 18:05:52 +04:00
Noel Georgi
27253d7317
feat: use new xfs config file
Use new xfs config file version.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2026-01-09 18:06:46 +05:30
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
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
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
Mateusz Urbanek
6c322710d6
chore: refactor mount package
Rework mount package to use new mount APIs.

Fixes #10951

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-09-03 19:44:51 +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
850579448e
feat: export SBOM as resources
Fixes #10942

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-09 16:48:48 +04:00
Andrey Smirnov
d531b682cb
fix: provide FIPS 140-3 compliance
Provide compliant unit-test runs.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-08 21:18:04 +04:00
Andrey Smirnov
fc1237343f
chore: clean up /usr/bin
Based on importing following `pkgs` PRs:

* https://github.com/siderolabs/pkgs/pull/1242
* https://github.com/siderolabs/pkgs/pull/1243
* https://github.com/siderolabs/pkgs/pull/1244

Plus removing broken symlinks that exist because static binaries
are removed.

Remove outdated cleanup steps.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-05-22 15:07:54 +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
Andrey Smirnov
efd918eeb5
feat: update dependencies
Brings in Linux 6.12.21, go 1.24.2.

Also updates Go dependencies, golangci-lint, etc.

The configuration was migrated, fix new linting errors.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-04-02 21:18:25 +04:00
Andrey Smirnov
edf5c5e29b
fix: extfs repair and resize
Fixes #10103

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-01-13 13:04:33 +04:00
Andrey Smirnov
f70b7386ac
test: add a xfs makefs test
Assert on exact allocation for different filesystem size.

Note: this test only reliably works in buildkit, with a specific version
of `xfsprogs`.

Fixes #10021

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-12-23 19:44:18 +04:00
Andrey Smirnov
b4aa5189d4
release(v1.10.0-alpha.0): prepare release
This is the official v1.10.0-alpha.0 release.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-12-23 15:15:56 +04:00
Noel Georgi
6074a870ad
feat: add e2fsprogs to talos rootfs
Bring in e2fsprogs from pkgs.

Initial support for ext* filesystems.

Fixes: #9746

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-20 21:48:26 +05:30
Noel Georgi
2ac8d2274f
chore: support unsupported flag for mkfs
Support `unsupported` flag for mkfs, so that `STATE` partition with size
less than 300M can be created by `mkfs.xfs`.

This allows to bring in newer `xfsprogs` that can repair corrupted FS
better.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-08-08 20:21:02 +05:30
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
Dmitriy Matrenichev
fa3b933705
chore: replace fmt.Errorf with errors.New where possible
This time use `eg` from `x/tools` repo tool to do this.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-02-14 17:39:30 +03:00
Noel Georgi
3f68485e44
feat: add uki iso generation
This adds code to generate a UKI ISO (UEFI only).

Fixes: #7261

Signed-off-by: Noel Georgi <git@frezbo.dev>
2023-06-02 22:44:27 +05:30
Andrey Smirnov
343c55762e
chore: replace talos-systems Go modules with siderolabs
This the first step towards replacing all import paths to be based on
`siderolabs/` instead of `talos-systems/`.

All updates contain no functional changes, just refactorings to adapt to
the new path structure.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-11-01 12:55:40 +04:00
Noel Georgi
3ae8bdd92e
chore: run xfs_repair on xfs filesystem returing EUCLEAN
Run `xfs_repair` on XFS filesystems that needs repairing indicated by
the `unix.EUCLEAN` error when mounting

Fixes #5319
Fixes #5437

Signed-off-by: Noel Georgi <git@frezbo.dev>
2022-06-08 23:59:15 +05:30
Andrey Smirnov
2b68c8b67b
fix: enable long timestamps for xfs
This "fixes" the message like:

```
xfs filesystem being mounted at /var supports timestamps until 2038 (0x7fffffff)
```

We should support Talos beyond 2038, even if we switch to a different
filesystem type by 2038 :)

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2022-04-18 16:21:03 +03:00
Artem Chernyshev
f96548e165 refactor: extract go-cmd into a separate library
To be used in the `go-blockdevice` library.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-02-16 10:31:20 -08:00
Andrey Smirnov
018086d1fa refactor: extract blockdevice library
Library `blockdevice` was extracted as `talos-systems/go-blockdevice`,
this PR finalizes the move by removing Talos copy of it.

Some functions around `mkfs`/`growfs` were extracted as `makefs`
package, as they depend on `cmd` package.

Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2020-10-05 11:18:43 -07:00