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
* 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>
Introduce support for the same old cos stanzas but with immucore naming
so we can control them better in the future
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
Load the base overlay config from the cos-layout.env file. This means we
have to depend the base overlay mount to the load-config step, which
moves things a bit in the DAG.
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Be more careful with commandWithPaths PATHS
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Do not mount all the things :/
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Only mount /proc otherwise we break stuff
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
---------
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
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>
If immucore is run we should just execute our normal dag stuff directly
instead of having a subcommand.
Keep the version subcommand and dry-flag
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* 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>
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>
Original cos-immutable-rootfs sets the sentinel to livecd if it finds
the rd.cos.disable in the cmdline.
We should do the same. Unfortunately the state sdk doesnt support that
yet so we have to do it on our side until its supported
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
Make it explicit that we run before sysroot.mount, otherwise it may be
launched in parallel and fails as immucore hasnt mount the sysroot
already
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* 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>
Unfortunately ghw detects mountpoint only by device, thus kairos-agent
does the same.
If we expect to make this work we need to mount the devices by the dev
instead of label until ghw supports detecting the devices mountpoint
ALSO via label.
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>