Commit Graph

15 Commits

Author SHA1 Message Date
Itxaka
985b8c9401
Uki support (#61) 2023-02-28 14:37:02 +01:00
Itxaka
c081f987f8
Fix recovery (#54)
* Fix recovery

 - change TargetLabel into TargetDevice to hav ethe full device instead
   of just the label
 - log error if we cant mount
 - Get state partition to mount depending on recovery or active/passive
 - Get state patition fs on the fly
 - Set proper label device to mount on sysroot based on our boot state

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

* Fix test

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

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-17 11:53:26 +01:00
Itxaka
88df028e6d
Allow setting root to RW (#53)
This patch allows setting the root mount as RW indicated by setting
rd.cos.debugrw in the cmdline

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-17 09:54:23 +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
28e6cfbff8 Do not do anything if rd.cos.disable its on the cmdline
That means we dont want to run any immutable stuff, for netboot and
cdrom

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-15 10:53:48 +01:00
Itxaka
076bba95dc Set the sentinel file from immucore directly
Also add a missing livecd sentinel file

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-13 21:42:45 +01:00
Itxaka
109c1c745f Several fixes
- Set global debug log
 - Set caller in the log if debug
 - Fatal if cannot get target image
 - clean up slices from cos-layoout.env
 - Add generic log with more context info
 - dump runtime to log on start
 - Set proper default paths if overlay is empty (fixes recovery)
 - Fix ErrAlreadyMounted to not trigger failures

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 15:16:53 +01:00
Itxaka
0807fe08f5 Refactor
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-09 10:12:11 +01:00
Itxaka
f490b08587 Several fixes
- set debug level via cmdline
 - set default RW paths needed ALWAYS to boot a working system, even
   with no config files(recovery)
 - Check for loop device before mounting it to avoid duplicated mounts
 - Force overlay and bind arrays to uniqueness
 - Rename OverlayDir to OverlayDirs to better represent the content

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 22:54:17 +01:00
Itxaka
0323c5ab5f Fix recovery label
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 19:11:00 +01:00
Itxaka
99cd455ce8 Fixes recovery
- Add isRecovery to state
 - Get the TargetImage from cmdline
 - Add isrecovery to conditions

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 18:51:53 +01:00
Itxaka
441c4d17a3 Fix wrong recovery-img
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-08 18:31:05 +01:00
Itxaka
f98954367f several improvements
- drop vfs
 - less hardcoded stuff, use the runtime status
 - Remove things that syscalls dont understand (defaults, auto)

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 16:20:18 +01:00
mudler
13e11fca24 Use SDK to get machine state 2023-02-06 14:49:35 +01:00
Itxaka
4ade174057 dont do anything if booting from CD
We leave dracut to do its own thing and mount the CD properly

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
2023-02-06 11:31:46 +01:00