New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 709027 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

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.

 
Thanks for the clear report Joshua B. I'm taking a look
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
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)
Marking as fixed.
Thanks again for the good bug report Richard.

Comment 5 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 6 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 7 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment