factory_install: sync after installation is completed
The default action after factory installation is reboot.
However, there might be some buffered data needs to be synced
into disk at that time, ex: part of release image.
It has been observed in factory that the 'reboot' might be
related to the issue 'Chrome OS is missing or damaged' after
factory wipe. Add a sync/sleep to write any data buffered in
memory out to disk before reboot.
BUG=None
TEST=setup mini-omaha server and install a factory bundle on DUT
Change-Id: Id536da303b50b909ec76a5d223c93b33c451c979
Reviewed-on: https://chromium-review.googlesource.com/256272
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
diff --git a/factory_install.sh b/factory_install.sh
index 3fd3df9..ffb9313 100644
--- a/factory_install.sh
+++ b/factory_install.sh
@@ -1152,6 +1152,8 @@
fi
log "Factory Installer Complete."
+ sync
+ sleep 3
factory_on_complete
board_post_install
@@ -1162,6 +1164,7 @@
# Default action after installation: reboot.
trap - EXIT
+ sync
sleep 3
if [ -n "${NETBOOT_RAMFS}" ]; then
# There is no 'shutdown' and 'init' in initramfs.