On 2/25/15 12:56 PM, Yey Yuan wrote:
> Hello,
>
> quote chrome OS doc <
>
http://www.chromium.org/chromium-os/chromiumos-design-docs/filesystem-autoupdate>.
>
>
> The update process relies partly on the concept of a "successful
> boot." At any given point, we will be able to say one of the
> following things:
>
> * This system booted up correctly.
> * This system booted up incorrectly.
> * The system is currently attempting to boot, so we don't know yet.
>
> We consider a boot successful if the updater process can
> successfully launch.
>
>
> * How can chrome tell a failed boot from "currently attempting boot
> but is taking forever"? is there a watch dog process examming
> coreboot, its payload, kernel, all the way to upstart?
Chrome doesn't do this. The decision to boot or roll back is
done by the firmware. There's no watchdog; if the software
doesn't fail by crashing and rebooting, the user has to trigger
the failure manually by forcibly rebooting.
> * Where does chrome keep track of the number boot attempt of rootA and
> rootB? partition table flags? What program or language can write to
> those?
There's a count a "successful" flag stored in the GPT for the
active kernel partition. At boot, the firmware checks this
information:
* If the kernel is marked "successful", the firmware boots
the kernel.
* Otherwise, if the count is 0, the firmware rolls back to the
other kernel,
* Otherwise, the firmware decrements the count, and boots the
active kernel.
> * Can chrome detect when booting rootA halted and automatically retry
> booting into rootB?
No, but see above about how the firmware does this.
> * Can chrome upload log to server to help diagnose boot issues before
> it reaches kernel or user space?
>
Chrome is a user land process. Generally, if Chrome starts
successfully, the boot is considered successful. So, Chrome
can't log boot failures more or less by definition: if
Chrome is working well enough to upload logs, then boot
didn't fail.
There's some documentation of the user-land portions of the
feature here:
http://www.chromium.org/chromium-os/chromiumos-design-docs/boot-design
Look for "Interactions with Install, Recovery, and Update"
> Thanks!
>
> --
> --
> Chromium OS Developers mailing list:
chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
>
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>
--
--jrb