Commit Graph

31 Commits

Author SHA1 Message Date
Itxaka
19a0c2d681
Add a UKI transition step (#460) 2025-04-09 18:48:49 +02:00
Itxaka
367ab5610e
Implement generic sysext management (#459) 2025-04-09 11:21:22 +02:00
Itxaka
adc29fca67
Add modules for mmc disks (#380) 2024-09-27 13:07:21 +02:00
Itxaka
c9924a3205
Support copying sysextensions into final dir (#330) 2024-06-10 10:10:54 +02:00
Itxaka
cbf38f553c
Use a pure golang pcr extend (#286) 2024-04-19 13:43:05 +02:00
Itxaka
ade21d4663
Fix lint and new uki steps (#274)
* Fix lint and add new uki step

Make it simpler by dividing the actual base mounts and pivot into new
sysroot into two different steps

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

* Fix constant name and gosec issues

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

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2024-04-09 10:40:47 +02:00
Itxaka
ddfe8b7648
Recover the remouon / RO (#249) 2024-03-20 11:08:38 +01:00
Itxaka
25975a5594
Chroot into a new dir before starting the system (#234)
* Chroot into a new dir before starting the system

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

* Use ReadDir and copy files int eh rootdir to the enw rootdir

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

* logggg

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

* Several fixes

Mount /dev at start so we can log to kmesg/ttyS0
Log more
Store the mountpoints found in root to bind them later to the new
sysroot

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

* debvuy

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

* Fix

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

* more debufg

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

* fix

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

* sfder

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

* Fix symlinks

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

* final

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

* disable mobving the / root mountpoint

Im not sure this works on our side or how, I just get errors

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

* Debug

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

* Disable remounting / as RO and enable remounting the new sysroot as RO

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

* Dont drop to bash like that

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

* Move "sysroot" to a constant, dry code and handle errors

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Fix linting errors by removing superflows `else` statements

because the `if`s end with `continue`

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Apply suggestions from code review

* Remove loggers that don't work

because `/dev` is not there yet (?). In any case, we need to switch to
the new logger

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Co-authored-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-03-06 17:09:26 +02:00
Mauro Morales
0cfddd485d
extend kernel modules list (#228)
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2024-02-29 10:31:30 +01:00
Itxaka
4c2ba5883b
Be slower to find the install media (#227) 2024-02-28 12:28:50 +01:00
Itxaka
c9c9edb261
Mount cdrom efiboot contents under /run/rootfsbase (#224)
Signed-off-by: Itxaka <itxaka@kairos.io>
2024-02-11 18:37:24 +01:00
Itxaka
a2874ca3ee
Mount livecd in /run/initramfs/live under uki (#223) 2024-02-08 14:22:44 +01:00
Itxaka
c4ad991e0c
unlock partitions with UKI TPM values (#191) 2023-11-30 22:19:47 +01:00
Dimitris Karakasilis
6b07d39073
Add awk (#157)
* Add awk and gawk in the initrafms

to allow growpart to work. Also include libraries which dracut fails to
auto-detect

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Bump yip

to get this fix: https://github.com/mudler/yip/pull/110

as part of this: https://github.com/kairos-io/kairos/issues/1831

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

* Fix lint errors

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-25 10:32:45 +03:00
Itxaka
5412c76ebb
Uki changes for iso/install (#156) 2023-09-22 14:56:26 +02:00
Itxaka
14426d39b4
Upgrade kcrypt partitions on boot (#122)
Co-authored-by: Dimitris Karakasilis <jimmykarily@gmail.com>
2023-05-08 09:44:43 +02:00
Itxaka
d644fb0af9
Run kcrypt unlock via immucore (#118) 2023-05-04 18:58:26 +02:00
Itxaka
f1c3aad0ee
🌱 activate LVM volumes at the start (#113) 2023-04-19 16:23:51 +02:00
Itxaka
8f7d808dec
Bring UKI to a working state (#97)
- Mount the needed base mounts (/proc /dev /sys /tmp)
 - Use our own console for yip (required to add the PATH under uki)
 - Order the DAG in a proper way (was out of order and not working)

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-14 10:33:38 +01:00
Itxaka
b2f3615534
🐛 Add custom layout plugin (#87)
The default plugin does not support gpt

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-09 17:19:15 +01:00
Itxaka
8832ec6981
Run yip directly for stages (#82) 2023-03-09 08:58:07 +01:00
Itxaka
aa5939da89
Rework workflow (#77)
This makes immucore run more in parallel rather than block everything
else. We just tell sysroot.mount that eventually it will be mounted and
to wait for a bit.

This allows us to be more flexible where to run and run in parallel in
cases like cdrom in which we may do things but we need the sysroot to be
mounted already but not from us.

Also adds the initramfs stage directly in immucore and merges all the dracut config into one

    Dont create sysroot, just add a timeout override so it waits for us
    Dont block on the service, just make sure to finish before
    initrd.target
    Fix mounts from cmdline
    More proper log
    Store logs under the /run/immucore dir
    Store rootfs and initramfs logs separated
    Do not log the full stages in INFO level
    Run initramfs stage in immucore directly on boot and cd/netboot
    Drop systemd requirement from dracut module

Signed-off-by: Itxaka itxaka.garcia@spectrocloud.com
2023-03-08 11:45:11 +01:00
Itxaka
fecfbf8e92
Add tests and fix some issues that arised from testing (#74)
* Add tests and fix some issues that arised from testing

Mainly around the cmdargs and how many items it returns.
Also drop the iso target and jobs as its not necessary now

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Lint

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-02 16:46:25 +01:00
Itxaka
086227d672
Uki Support (#67)
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-01 11:42:46 +01:00
Itxaka
3a52112b91
Revert "Uki support" (#66
This reverts commit 985b8c9401.
2023-02-28 19:46:15 +01:00
Itxaka
985b8c9401
Uki support (#61) 2023-02-28 14:37:02 +01:00
Itxaka
9a480df901 Re-enable longer RW_PATHS
Looks like the problem comes from the custom mounts overriding this
values

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-22 12:21:02 +01:00
Itxaka
b338cbb250 Reduce list of default RW mounts
According to our config files only /var /etc and /srv are needed as
minimal to boot the system. Lets check if that is true

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-22 11:52:49 +01:00
Itxaka
ad014e9f22
Full rework (#41)
* Full rework

 - Extract steps to a different file
 - Simplify dag for easy understanding
 - Load dag based on our boot process
 - Simplify steps to not depend on useless stuff
 - Better logging

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Move sentinel file to the dag

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* Adapt tests

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-15 22:30:08 +01:00
Itxaka
aee2bbde84 Deal nicely with already mounted errors
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 12:35:45 +01:00
Itxaka
0807fe08f5 Refactor
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 10:12:11 +01:00