mirror of
https://github.com/kairos-io/immucore.git
synced 2025-10-21 11:08:56 +00:00
fix deps of rootfs stage, not working modules, symlink
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
This commit is contained in:
@@ -28,7 +28,8 @@ install() {
|
||||
# Add missing elemental binary, drop once we get yip lib inside immucore as its only needed to run the stages
|
||||
inst_multiple immucore elemental
|
||||
# add utils used by elemental or stages
|
||||
inst_multiple partprobe sync udevadm parted mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.vfat mkfs.fat mkfs.xfs blkid e2fsck resize2fs mount xfs_growfs umount sgdisk
|
||||
inst_multiple partprobe sync udevadm parted mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.vfat mkfs.fat blkid e2fsck resize2fs mount umount sgdisk
|
||||
# missing mkfs.xfs xfs_growfs in image?
|
||||
inst_script "${moddir}/generator.sh" "${systemdutildir}/system-generators/immucore-generator"
|
||||
inst_simple "${moddir}/immucore.service" "${systemdsystemunitdir}/immucore.service"
|
||||
mkdir -p "${initdir}/${systemdsystemunitdir}/initrd-fs.target.requires"
|
||||
|
@@ -1,5 +1,6 @@
|
||||
# This services should be run from immucore directly, rootfs at start of immucore and initramfs once we mount everything,
|
||||
# so at the end, just before we let init do the switch_root
|
||||
# This services should be run from immucore directly, rootfs once we mount /sysroot and initramfs once we mount everything,
|
||||
# so at the end, just before we let init do the switch_root. Notice that we run really early in the boot with immucore so
|
||||
# maybe by this time some things are not ready...
|
||||
# Note that initramfs run with RootDirectory=/sysroot
|
||||
install_items+=" /etc/systemd/system/cos-setup-initramfs.service /etc/systemd/system/initrd.target.requires/cos-setup-initramfs.service "
|
||||
# RUN BY IMMUCORE BUT FAILING
|
||||
|
@@ -88,7 +88,7 @@ func (s *State) RunStageOp(stage string) func(context.Context) error {
|
||||
return func(ctx context.Context) error {
|
||||
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}).With().Caller().Logger()
|
||||
if stage == "rootfs" {
|
||||
err := os.Symlink("/sysroot/system/", "/system/")
|
||||
err := os.Symlink("/sysroot/system", "/system")
|
||||
if err != nil {
|
||||
s.Logger.Err(err).Msg("creating symlink")
|
||||
return err
|
||||
@@ -278,7 +278,7 @@ func (s *State) Register(g *herd.Graph) error {
|
||||
// TODO: add symlink if Rootdir != ""
|
||||
// TODO: chroot?
|
||||
s.Logger.Debug().Str("what", opRootfsHook).Msg("Add operation")
|
||||
err = g.Add(opRootfsHook, mountRootCondition, herd.WithDeps(opMountOEM), herd.WithCallback(s.RunStageOp("rootfs")))
|
||||
err = g.Add(opRootfsHook, mountRootCondition, herd.WithDeps(opMountRoot), herd.WithCallback(s.RunStageOp("rootfs")))
|
||||
if err != nil {
|
||||
s.Logger.Err(err).Msg("")
|
||||
}
|
||||
|
Reference in New Issue
Block a user