Re: /run/ostree-booted missing after upgrade to 2018.03





On Thu, Mar 22, 2018, at 9:32 AM, Alex Kiernan wrote:
I've just flipped to 2018.03 (from .02) and I seem to have lost
/run/ostree-booted after that (so everything think's I'm not ostree
booted).

OK, this is almost certainly from
https://github.com/ostreedev/ostree/pull/1497 specifically:
https://github.com/ostreedev/ostree/pull/1497/commits/e8a7ef14fa386cc5e1affba1bb4ad2fa9e046c4a

I'm on an embedded board, init is ostree-prepare-root (with no
initramfs) and the main system is then running systemd.

Just staring at what I've got, I'm beginning to wonder if I ever had
/run mounted early enough, or if it just happened to work and I've
never actually had /run/ostree-booted.

I'd guess that's the case.  Hmm...yes, if ostree-prepare-root is init,
then indeed nothing is going to propagate /run.  Can you try this patch?

diff --git a/src/switchroot/ostree-prepare-root.c b/src/switchroot/ostree-prepare-root.c
index 0b04189e..b12d6a51 100644
--- a/src/switchroot/ostree-prepare-root.c
+++ b/src/switchroot/ostree-prepare-root.c
@@ -205,8 +205,6 @@ main(int argc, char *argv[])
         err (EXIT_FAILURE, "failed to bind mount (class:readonly) /usr");
     }
 
-  touch_run_ostree ();
-
   if (strcmp(root_mountpoint, "/") == 0)
     {
       /* pivot_root rotates two mount points around.  In this instance . (the
@@ -246,6 +244,8 @@ main(int argc, char *argv[])
         err (EXIT_FAILURE, "failed to MS_MOVE %s to %s", deploy_path, root_mountpoint);
     }
 
+  touch_run_ostree ();
+
   /* The /sysroot mount needs to be private to avoid having a mount for e.g. /var/cache
    * also propagate to /sysroot/ostree/deploy/$stateroot/var/cache
    *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]