mirror of
https://github.com/kairos-io/immucore.git
synced 2025-09-25 06:19:02 +00:00
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
22 lines
885 B
Go
22 lines
885 B
Go
package mount
|
|
|
|
import (
|
|
cnst "github.com/kairos-io/immucore/internal/constants"
|
|
"github.com/spectrocloud-labs/herd"
|
|
)
|
|
|
|
// RegisterLiveMedia registers the dag for booting from live media/netboot
|
|
// This sets the sentinel.
|
|
func (s *State) RegisterLiveMedia(g *herd.Graph) error {
|
|
// Maybe LogIfErrorAndPanic ? If no sentinel, a lot of config files are not going to run
|
|
err := s.LogIfErrorAndReturn(s.WriteSentinelDagStep(g), "write sentinel")
|
|
|
|
// Waits for sysroot to be there, just in case
|
|
s.LogIfError(s.WaitForSysrootDagStep(g), "Waiting for sysroot")
|
|
// Run rootfs
|
|
s.LogIfError(s.RootfsStageDagStep(g, cnst.OpSentinel, cnst.OpWaitForSysroot), "rootfs stage")
|
|
// Run initramfs inside the /sysroot chroot!
|
|
s.LogIfError(s.InitramfsStageDagStep(g, herd.WithDeps(cnst.OpSentinel, cnst.OpWaitForSysroot, cnst.OpRootfsHook), herd.WithWeakDeps()), "initramfs stage")
|
|
return err
|
|
}
|