chromeos-install fails when run from chroot
Reported by
jrbarnette@chromium.org,
Apr 6 2017
|
|||||
Issue description
One of the available (if obscure) uses of chromeos-install
is to run the command from inside a chroot in order to put
an image on external media like a USB stick or SD card.
The typical path to this usage is through `cros flash --install`.
This CL broke that usage:
https://chromium-review.googlesource.com/#/c/444912/
The specific problem is that the script now depends on the
presence of "/usr/sbin/write_gpt.sh", but that file isn't
in the chroot.
This feature is used in the Autotest test lab to create
SD cards for beaglebone boards used as hosts for Servo V3.
It's the only reliable mechanism we have for creating working
SD cards for those hosts. For various reasons we're not currently
blocked on this bug, but at any moment, this problem could
become a small crisis. I'd like a fix before that moment.
,
Apr 6 2017
I think that the fix for this is to extend 'cgpt' utility to show partition numbers for a given label, and to optionally use that in chromeos-install when we are passed a --payload_image without a --gpt_layout
,
Apr 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/c6b3b1f3d8db21ec86a286e37c9389b64232f0bc commit c6b3b1f3d8db21ec86a286e37c9389b64232f0bc Author: Ian Coolidge <icoolidge@google.com> Date: Thu Apr 13 22:19:05 2017 installer: Use cgpt to bootstrap partition numbers When we are installing from a payload image, just use cgpt directly on it to learn what its partition numbers are. This fixes the case when chromeos-install is run from within the chroot, because /usr/sbin/write_gpt.sh is not available inside the chroot. BUG= chromium:709027 TEST=chromeos-install from chroot Change-Id: I3eeba7a86e85758259250f46b0d1c3601f0873c7 Reviewed-on: https://chromium-review.googlesource.com/470727 Commit-Ready: Ian Coolidge <icoolidge@google.com> Tested-by: Richard Barnette <jrbarnette@chromium.org> Reviewed-by: Richard Barnette <jrbarnette@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/c6b3b1f3d8db21ec86a286e37c9389b64232f0bc/installer/chromeos-install
,
Apr 13 2017
Marking as fixed. Thanks again for the good bug report Richard.
,
May 30 2017
,
Aug 1 2017
,
Jan 22 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by icoolidge@chromium.org
, Apr 6 2017