Fix bug where we don't copy ROOT-B from ROOT-A during chromeos-install.

I introduced a bug 6 months ago where we don't correctly copy ROOT-B
over from ROOT-A when I refactored chromeos-install to copy more
partitions. The issue @ heart, is that the size of ROOT-B partition
is much smaller than ROOT-A. So when copying from ROOT-A we should
use it's size. Otherwise we only copy the first block.

BUG=chromium:370388
TEST=image_to_usb --install and did checksums of partitions:
sudo md5sum /dev/sdh4
7a53f78c63e335f301a46fd04996b180  /dev/sdh4
sudo md5sum /dev/sdh2
7a53f78c63e335f301a46fd04996b180  /dev/sdh2
sudo md5sum /dev/sdh3
52fc7acff28d5d9da0c92a931c5d5068  /dev/sdh3
sudo md5sum /dev/sdh5
52fc7acff28d5d9da0c92a931c5d5068  /dev/sdh5

Change-Id: I30bd9b6791a26b8a09c02e225e6d5dabfe8c894f
Reviewed-on: https://chromium-review.googlesource.com/198942
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
1 file changed