Re: how to determine when we'll enter the other deployment on reboot



On Mon, Feb 5, 2018 at 12:45 PM, Davis Roman <davis roman84 gmail com> wrote:
While attempting to find the answer to my first question, I have now
stumbled upon some new questions which I know have puzzled me in the past.

So here are my sequence of steps.

1. I take note of my current ostree status
2. I then take a look at the contents of my uEnv.txt file
3. In 'ostree admin status' the commit next to the star does not match the
commit that uEnv.txt claims i should be booting into.
4. I then perform a switch in order to boot into the alternative deployment
5. I later check the current ostree status and I notice that the star points
to the other deployment ( which make sense to me since I perform a switch)
6. I look at the contents of uEnv.txt and it's now pointing to an entirely
different commit and I'm not sure why.

I forget the exact naming that's used in ostree, but the checksum you
see in "ostree admin status" corresponds to the deployment checksum,
which is the commit checksum. However, the checksums used in /boot are
the checksum of the combined kernel and initrd files. This is known as
the boot checksum. The idea being that you could have 2 deployments
that have the same kernel/initrd and there would be no need to write
new ones to /boot. All you'd need to do is update the boot
configuration to add an entry pointing to the new deployment.

In uEnv.txt you'll see a bootargs line with ostree=. If you go look at
that (e.g., /ostree/boot.1/poky/dcae119e8f737fa666ec8db603897bf3cadd8a5db4f75124d809f540a0fd9258/0),
it's a symink to the deployment. That's how you get from the
bootloader configuration to the correct deployment you're supposed to
be running. The ostree mounting code in the initrd parses out the
ostree= kernel command line argument and mounts that at /.

--
Dan


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