Commit Graph

62 Commits

Author SHA1 Message Date
Itxaka
d0f0710c78
Use grub binaries and libs from rootfs (#760) 2025-04-25 10:43:21 +02:00
Itxaka
4975b9b914
Bump yip and diskfs (#717)
* Bump yip and diskfs

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-03-26 11:57:29 +01:00
Itxaka
db703db5e5
Try to fix hooks (#718)
* fix hooks


---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-03-24 16:05:39 +01:00
Itxaka
b5869b4017
Fix hooks under encrypted partitions (#702)
* Fix hooks under encrypted partitions

We had a mess of mounting and unmounting things around when we try to
copy things to persistent.

Part of the changes (using the by-label to mount the persistent) are due
to the change in kcrypt. As we set the same label to the encrypted fs
and unencrypted fs, our utils.Mount could get mistaken and return the
first hit, which usually its the encrypted one, and we cannot mount that
one.

This patch brings it up to date.

 - Makes bundles and logs hooks work when we have encrypted persistent.
   It didnt work before.
 - Makes both workflows the same.
 - Locks everything once its over, to not leave encrypted parts around
 - Mounts OEM so kcrypt can read the config if we are using a remote
   server for encryption
 - Mounts by label so there is not a change of getting the wrong device
 - Uses the mount syscall directly. The util can mistake and return the
   actual encrypted part if they both have the same label and finds it
   first

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-03-13 11:22:26 +01:00
Itxaka
488841ebf2
Use extensions dir path as source (#660)
Otherwise it will copy the dir itself and we just want to copy the
contents of the dir

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-01-14 10:59:45 +01:00
Itxaka
895e571bb3
Expose pcrs for uki encryption (#603) 2024-11-20 10:41:52 +01:00
Itxaka
dcad8beac2
Drop those stupid github and vfs deps bumps (#591) 2024-11-06 12:50:14 +01:00
Itxaka
3e99d75331
Move to use our ghw clone (#535) 2024-09-17 15:27:31 +02:00
Itxaka
02eb9d32a0
Let kcrypt add the allow discards option (#434) 2024-07-31 18:00:29 +02:00
Itxaka
0d8d534d5d
Encrypt luks partition with allow-discards (#423) 2024-07-29 09:47:03 +02:00
Itxaka
aebc8f6083
Bump kcrypt and adapt hooks (#385) 2024-06-20 11:19:29 +02:00
Björn Brauer
54a528a44a
Ensure only numeric part of systemd version is converted to int (#362) 2024-06-12 10:08:19 +02:00
Itxaka
91e18dd4b3 Copy extensions to passive as well
Signed-off-by: Itxaka <itxaka@kairos.io>
2024-06-10 15:58:44 +02:00
Itxaka
b176b47f56
Copy any found sysextensions into active+passive efi dir (#372) 2024-06-07 16:45:50 +02:00
Dimitris Karakasilis
382b1944b3
Move udevadm triggering in kcrypt
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-05-23 16:05:31 +03:00
Itxaka
d1f65cd334
Centralize uki hooks for encryption reasons (#309) 2024-04-24 16:42:51 +02:00
Itxaka
1602276133
Add missing hooks to after install uki (#307) 2024-04-23 14:37:21 +02:00
Itxaka
15a15a1f0c
Keep logs after reset (#288) 2024-04-11 11:35:31 +02:00
Itxaka
b1489daff8
Converge all yaml libs into v3 (#266)
* Converge all yaml libs into v3

Signed-off-by: Itxaka <itxaka@kairos.io>

* go mod tid

Signed-off-by: Itxaka <itxaka@kairos.io>

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2024-03-20 16:53:42 +01:00
Itxaka
8583d38b68
Retry unlock if we cant find the unlocked partitions (#241) 2024-03-19 09:27:13 +01:00
Itxaka
0ae9c04eb4
Make sure kcrypt hook umounts persistent (#244) 2024-03-07 15:11:51 +01:00
Itxaka
2e0af77fbc
Use new logger facilities (#236) 2024-03-01 12:27:26 +01:00
mudler
958ae9393d fix(after-install): run after-install hook after partitions are encrypted 2024-02-27 17:28:11 +01:00
Itxaka
33c8e8f29c
Add reset for uki (#221) 2024-02-02 13:20:06 +01:00
Itxaka
1a46f0910f
[uki] Wait for oem to appear after encryption (#216) 2024-01-30 14:28:54 +01:00
Ettore Di Giacinto
79a577d0f3
feat(uki-partitioning): respect additional encrypted partition list (#206) 2024-01-24 10:48:33 +01:00
Itxaka
53f49169b1
Fix uki mode detection (#198) 2024-01-10 10:38:31 +01:00
Itxaka
3254b8a36e
Uki upgrade (#182) 2023-12-18 11:38:26 +01:00
Itxaka
7ca39f2729
Encrypt uki partitions after install (#176) 2023-12-12 20:51:55 +00:00
Itxaka
6e1d761ded
Fix unwanted reboot from install config in upgrade/reset (#178) 2023-12-05 15:46:11 +01:00
Dimitris Karakasilis
c98c791f60
Call exec.Command properly, splitting the cmd and args
This was failing but wasn't visible because it needs

`fail_on_bundles_errors: true` to be set in the Kairos config.

We need to find whether we need a new test or an existing one can be
adapted to catch this.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-11-20 13:54:05 +02:00
Itxaka
1b967cccd8
[uki] Lyfecycle (#148) 2023-10-03 11:15:17 +02:00
Itxaka
677254e570
Pass the install event to the collector directly (#150) 2023-09-26 07:38:58 +00:00
Itxaka
3e4693d697
Workaround for bundle install in new /var/lib/extensions directory (#147) 2023-09-15 15:40:27 +02:00
Dimitris Karakasilis
51ca8a8589
Revert "debug extension"
This reverts commit 98ccb57799.
2023-09-15 15:36:42 +03:00
Itxaka
98ccb57799 debug extension
Signed-off-by: Itxaka <itxaka@kairos.io>
2023-09-15 14:33:41 +02:00
Itxaka
7c060a764e
Fix manual-install reboot/poweroff flags (#131) 2023-08-18 12:54:42 +02:00
Itxaka
f7bdba2dda
Merge elemental config into agent config (#102) 2023-07-25 15:21:34 +02:00
Itxaka
5b945303c9
Drop runconfig in favour of config (#101) 2023-07-25 11:08:27 +02:00
Itxaka
956f86f99c
Rework reboot/shutdown to use the hooks (#96) 2023-07-24 12:28:59 +02:00
Itxaka
9bff3742c1
Load elemental config/spec from cloud config (#82) 2023-07-20 15:53:48 +02:00
Itxaka
9c5731baa2
Rename go module kairos-agent (#81) 2023-07-10 14:39:48 +02:00
Itxaka
1afe3c2dbd
Run stages directly from code instead of shelling out (#23)
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-05-16 18:06:49 +02:00
Itxaka
cda46877ba
Mount OEM during kcrypt hook (#18) 2023-05-09 21:57:16 +02:00
Itxaka
10df8d98cb
Drop kcrypt mappings (#14) 2023-05-08 09:43:47 +02:00
Mauro Morales
961804be0a arrow_up: Bump go in Earthly and workflows to ^1.20 (#1213)
* Bump go in Earthly and workflows to ^1.20

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Update go.mod version

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Lint

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Remove pin of go version to get the latest

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Remove minor version

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-03-30 16:42:25 +02:00
Dimitris Karakasilis
e7807dd66c Change module path according to Go docs (#1220)
https://go.dev/doc/modules/major-version

This way we can bump the kairos dependency on the provider-kairos repo

which otherwise produced the error:

```
~/workspace/kairos/provider-kairos (main)*$ go get -u github.com/kairos-io/kairos@v2.0.0-alpha3
go: github.com/kairos-io/kairos@v2.0.0-alpha3: invalid version: module contains a go.mod file, so module path must match major version ("github.com/kairos-io/kairos/v2")
```

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-30 14:18:53 +03:00
Itxaka
75c52f520f Bump to newer sdk (#1166) 2023-03-18 10:27:18 +01:00
Itxaka
b5cfab06a7 sparkles: Use kairos-sdk module (#1140) 2023-03-15 15:45:00 +01:00
Jacob Payne
d8d97097a7 bug: remove kcrypt hook after reset (#982)
remove kcrypt hook after reset

Signed-off-by: Jacob Payne <jacob@spectrocloud.com>
2023-02-28 15:57:47 -07:00