Have problem flashing the moblab with self-built image |
|||
Issue description
1. Here is the debug logs from cros flash directly to moblab (this fails):
~/trunk/src/scripts $ cros flash moblab ../build/images/guado_moblab/R72-11268.0.2018_11_27_1825-a1/chromiumos_test_image.bin --debug
11:49:57: DEBUG: Cache dir lookup.
11:49:57: DEBUG: Configured cache_dir to '/mnt/host/source/.cache'
11:49:57: NOTICE: Preparing to update the remote device moblab
11:49:57: INFO: Hostname "moblab" not found, falling through to ssh
11:49:57: INFO: Using image ../build/images/guado_moblab/R72-11268.0.2018_11_27_1825-a1/chromiumos_test_image.bin
11:49:57: INFO: Copying image to temporary directory /tmp/dev_server_wrapper_local_imageIvWOAn
11:50:04: INFO: Creating a symlink /mnt/host/source/devserver/static/local_imageabxnbh/link -> /tmp/dev_server_wrapper_local_imageIvWOAn
11:50:04: DEBUG: Assuming local_imageabxnbh/link/test is an xbuddy path.
11:50:04: INFO: Starting local devserver to generate/serve payloads...
11:50:04: DEBUG: RunCommand: sudo 'PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/aarch64-cros-linux-gnu/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/arm-none-eabi/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/armv6j-cros-linux-gnueabi/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabihf/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/armv7m-cros-eabi/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/i686-pc-linux-gnu/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/gcc-bin/4.9.x:/mnt/host/source/chromite/bin:/mnt/host/depot_tools:/mnt/host/source/chromite/bin' 'CROS_CACHEDIR=/mnt/host/source/.cache' -- start_devserver --pidfile /tmp/devserver_wrappermv_aPm/devserver_wrapper2RvZ39 --logfile /tmp/devserver_wrappermv_aPm/dev_server.log '--port=0' --critical_update '--portfile=/tmp/devserver_wrappermv_aPm/dev_server.port' '--static_dir=/mnt/host/source/devserver/static' in /mnt/host/source
11:50:14: DEBUG: Retrieving http://127.0.0.1:43771/check_health
11:50:14: DEBUG: Retrieving http://100.99.132.91:43771/xbuddy/local_imageabxnbh/link/test?for_update=true&return_dir=true
11:50:32: INFO: Downloading http://100.99.132.91:43771/static/local_imageabxnbh/link/update.gz to /tmp/cros-flashp0SJDK/update.gz
11:50:32: DEBUG: Retrieving http://100.99.132.91:43771/static/local_imageabxnbh/link/update.gz
11:50:34: INFO: Downloading http://100.99.132.91:43771/static/local_imageabxnbh/link/stateful.tgz to /tmp/cros-flashp0SJDK/stateful.tgz
11:50:34: DEBUG: Retrieving http://100.99.132.91:43771/static/local_imageabxnbh/link/stateful.tgz
11:50:35: DEBUG: RunCommand: sudo 'CROS_CACHEDIR=/mnt/host/source/.cache' -- test -f /tmp/devserver_wrappermv_aPm/dev_server.log
11:50:36: DEBUG: RunCommand: sudo 'CROS_CACHEDIR=/mnt/host/source/.cache' -- tail -n 50 /tmp/devserver_wrappermv_aPm/dev_server.log
11:50:36: DEBUG: --- Start output from /tmp/devserver_wrappermv_aPm/dev_server.log ---[28/Nov/2018:11:50:10] DEVSERVER Using cache directory /mnt/host/source/devserver/static/cache
[28/Nov/2018:11:50:10] DEVSERVER Serving from /mnt/host/source/devserver/static
[28/Nov/2018:11:50:10] XBUDDY Using shadow config file stored at /mnt/host/source/src/platform/dev/shadow_xbuddy_config.ini
[28/Nov/2018:11:50:10] ENGINE Listening for SIGHUP.
[28/Nov/2018:11:50:10] ENGINE Listening for SIGTERM.
[28/Nov/2018:11:50:10] ENGINE Listening for SIGUSR1.
[28/Nov/2018:11:50:10] ENGINE Bus STARTING
[28/Nov/2018:11:50:10] ENGINE Started monitor thread '_TimeoutMonitor'.
[28/Nov/2018:11:50:10] ENGINE PID 192987 written to '/tmp/devserver_wrappermv_aPm/devserver_wrapper2RvZ39'.
[28/Nov/2018:11:50:10] ENGINE (wait_for_free_port) No cached port to wait for.
[28/Nov/2018:11:50:10] ENGINE Port 43771 written to '/tmp/devserver_wrappermv_aPm/dev_server.port'.
[28/Nov/2018:11:50:10] ENGINE (wait_for_occupied_port) Waiting for actual port 43771.
[28/Nov/2018:11:50:10] ENGINE Serving on :::0
[28/Nov/2018:11:50:10] ENGINE Bus STARTED
::ffff:127.0.0.1 - - [28/Nov/2018:11:50:14] "GET /check_health HTTP/1.1" 200 371 "" "Python-urllib/2.7"
[28/Nov/2018:11:50:15] XBUDDY Linking to /mnt/host/source/devserver/static/guado_moblab/R72-11268.0.2018_11_27_1825-a1 from /mnt/host/source/src/build/images/guado_moblab/R72-11268.0.2018_11_27_1825-a1
[28/Nov/2018:11:50:15] XBUDDY Linking to /mnt/host/source/devserver/static/nami/R72-11262.0.2018_11_14_1458-a1 from /mnt/host/source/src/build/images/nami/R72-11262.0.2018_11_14_1458-a1
[28/Nov/2018:11:50:15] XBUDDY Linking to /mnt/host/source/devserver/static/nami/R72-11262.0.2018_11_14_1601-a1 from /mnt/host/source/src/build/images/nami/R72-11262.0.2018_11_14_1601-a1
[28/Nov/2018:11:50:15] XBUDDY Path is local_imageabxnbh/link/test, location suffix is -release
[28/Nov/2018:11:50:15] XBUDDY Get artifact 'test' with board local_imageabxnbh and version link'. Locally? True
[28/Nov/2018:11:50:15] XBUDDY Returning path to payload: local_imageabxnbh/link/chromiumos_test_image.bin
[28/Nov/2018:11:50:15] XBUDDY Downloading ['full_payload', 'stateful'] from gs://chromeos-image-archive/local_imageabxnbh/link
[28/Nov/2018:11:50:15] GOOGLE_STORAGE_DOWNLOADER Downloading artifacts *_full_*->/mnt/host/source/devserver/static/local_imageabxnbh/link stateful.tgz->/mnt/host/source/devserver/static/local_imageabxnbh/link.
[28/Nov/2018:11:50:15] A_U_TEST_PAYLOAD No marker file, *_full_*->/mnt/host/source/devserver/static/local_imageabxnbh/link is not staged.
[28/Nov/2018:11:50:21] XBUDDY Linking to /mnt/host/source/devserver/static/guado_moblab/R72-11268.0.2018_11_27_1825-a1 from /mnt/host/source/src/build/images/guado_moblab/R72-11268.0.2018_11_27_1825-a1
[28/Nov/2018:11:50:21] XBUDDY Linking to /mnt/host/source/devserver/static/nami/R72-11262.0.2018_11_14_1458-a1 from /mnt/host/source/src/build/images/nami/R72-11262.0.2018_11_14_1458-a1
[28/Nov/2018:11:50:21] XBUDDY Linking to /mnt/host/source/devserver/static/nami/R72-11262.0.2018_11_14_1601-a1 from /mnt/host/source/src/build/images/nami/R72-11262.0.2018_11_14_1601-a1
[28/Nov/2018:11:50:21] XBUDDY Path is local_imageabxnbh/link/test, location suffix is -release
[28/Nov/2018:11:50:21] XBUDDY Get artifact 'test' with board local_imageabxnbh and version link'. Locally? True
[28/Nov/2018:11:50:21] XBUDDY Updating timestamp for local_imageabxnbh/link
[28/Nov/2018:11:50:21] XBUDDY Returning path to payload: local_imageabxnbh/link/chromiumos_test_image.bin
[28/Nov/2018:11:50:21] DEVSERVER Payload generation triggered by request
[28/Nov/2018:11:50:21] UPDATE Update label/file: local_imageabxnbh/link/chromiumos_test_image.bin
[28/Nov/2018:11:50:21] UPDATE Generating update for src image /mnt/host/source/devserver/static/local_imageabxnbh/link/chromiumos_test_image.bin
[28/Nov/2018:11:50:32] UPDATE Caching in sub_dir "cache/7265d8e63b89ffbab147b9c41a79a704"
[28/Nov/2018:11:50:32] UPDATE Linking /mnt/host/source/devserver/static/cache/7265d8e63b89ffbab147b9c41a79a704 to /mnt/host/source/devserver/static/local_imageabxnbh/link
[28/Nov/2018:11:50:32] UTIL Creating symlink: /mnt/host/source/devserver/static/local_imageabxnbh/link/update.gz --> /mnt/host/source/devserver/static/cache/7265d8e63b89ffbab147b9c41a79a704/update.gz
[28/Nov/2018:11:50:32] UTIL Creating symlink: /mnt/host/source/devserver/static/local_imageabxnbh/link/stateful.tgz --> /mnt/host/source/devserver/static/cache/7265d8e63b89ffbab147b9c41a79a704/stateful.tgz
[28/Nov/2018:11:50:32] UTIL Creating symlink: /mnt/host/source/devserver/static/local_imageabxnbh/link/update.meta --> /mnt/host/source/devserver/static/cache/7265d8e63b89ffbab147b9c41a79a704/update.meta
[28/Nov/2018:11:50:32] DEVSERVER Directory requested, returning: http://100.99.132.91:43771/static/local_imageabxnbh/link
::ffff:100.99.132.91 - - [28/Nov/2018:11:50:32] "GET /xbuddy/local_imageabxnbh/link/test?for_update=true&return_dir=true HTTP/1.1" 200 56 "" "Python-urllib/2.7"
::ffff:100.99.132.91 - - [28/Nov/2018:11:50:32] "GET /static/local_imageabxnbh/link/update.gz HTTP/1.1" 200 752964264 "" "Python-urllib/2.7"
::ffff:100.99.132.91 - - [28/Nov/2018:11:50:34] "GET /static/local_imageabxnbh/link/stateful.tgz HTTP/1.1" 200 501548268 "" "Python-urllib/2.7"
--- End output from /tmp/devserver_wrappermv_aPm/dev_server.log ---
11:50:36: DEBUG: Stopping devserver instance with pid 192987
11:50:36: DEBUG: RunCommand: sudo 'CROS_CACHEDIR=/mnt/host/source/.cache' -- kill 192987
11:50:36: DEBUG: RunCommand: sudo 'CROS_CACHEDIR=/mnt/host/source/.cache' -- rm -rf -- /tmp/devserver_wrappermv_aPm
11:50:36: DEBUG: RunCommand: sudo 'CROS_CACHEDIR=/mnt/host/source/.cache' -- rm -rf -- /mnt/host/source/devserver/static/local_imageabxnbh
11:50:36: DEBUG: RunCommand: sudo 'CROS_CACHEDIR=/mnt/host/source/.cache' -- rm -rf -- /tmp/dev_server_wrapper_local_imageIvWOAn
11:50:36: DEBUG: RunCommand: ssh -p 22 '-oConnectionAttempts=4' '-oUserKnownHostsFile=/dev/null' '-oProtocol=2' '-oConnectTimeout=30' '-oServerAliveCountMax=3' '-oStrictHostKeyChecking=no' '-oServerAliveInterval=10' '-oNumberOfPasswordPrompts=0' '-oIdentitiesOnly=yes' -i /tmp/ssh-tmpD5qaAj/testing_rsa root@moblab -- mkdir -p /mnt/stateful_partition/cros-flash '&&' mktemp -d '--tmpdir=/mnt/stateful_partition/cros-flash'
11:50:38: ERROR: Error connecting to device moblab
11:50:38: ERROR: Device update failed.
11:50:38: DEBUG: RunCommand: ssh -p 22 '-oConnectionAttempts=4' '-oUserKnownHostsFile=/dev/null' '-oProtocol=2' '-oConnectTimeout=30' '-oServerAliveCountMax=3' '-oStrictHostKeyChecking=no' '-oServerAliveInterval=10' '-oNumberOfPasswordPrompts=0' '-oIdentitiesOnly=yes' -i /tmp/ssh-tmpD5qaAj/testing_rsa root@moblab -- cat /etc/lsb-release
11:50:39: ERROR: Error connecting to device moblab
11:50:39: ERROR: Remote device failed to initialize.
11:50:39: INFO: You can find the log files and/or payloads in /tmp/cros-flashp0SJDK
11:50:39: ERROR: cros flash failed before completing.
cros: Unhandled exception:
Traceback (most recent call last):
File "/mnt/host/source/chromite/bin/cros", line 169, in <module>
DoMain()
File "/mnt/host/source/chromite/bin/cros", line 165, in DoMain
commandline.ScriptWrapperMain(FindTarget)
File "/mnt/host/source/chromite/lib/commandline.py", line 912, in ScriptWrapperMain
ret = target(argv[1:])
File "/mnt/host/source/chromite/scripts/cros.py", line 66, in main
code = _RunSubCommand(subcommand)
File "/mnt/host/source/chromite/scripts/cros.py", line 51, in _RunSubCommand
return subcommand.Run()
File "/mnt/host/source/chromite/cli/cros/cros_flash.py", line 161, in Run
send_payload_in_parallel=self.options.send_payload_in_parallel)
File "/mnt/host/source/chromite/cli/flash.py", line 577, in Flash
updater.Run()
File "/mnt/host/source/chromite/cli/flash.py", line 480, in Run
lsb_entries = sorted(device.lsb_release.items())
File "/mnt/host/source/chromite/lib/remote_access.py", line 1145, in lsb_release
content = self.CatFile(constants.LSB_RELEASE_PATH, max_size=None)
File "/mnt/host/source/chromite/lib/remote_access.py", line 956, in CatFile
error_code_ok=True, capture_output=True)
File "/mnt/host/source/chromite/lib/remote_access.py", line 1007, in BaseRunCommand
return self.GetAgent().RemoteSh(cmd, **kwargs)
File "/mnt/host/source/chromite/lib/remote_access.py", line 375, in RemoteSh
raise SSHConnectionError(e.result.error)
chromite.lib.remote_access.SSHConnectionError: Warning: Permanently added '100.90.30.221' (ED25519) to the list of known hosts.
no such identity: /home/mqg/.ssh/testing_rsa: No such file or directory
Permission denied (publickey,keyboard-interactive).
2. Here is the debug message for flashing USB stick (This works)
cros flash usb:// ../build/images/guado_moblab/R72-11268.0.2018_11_27_1825-a1/chromiumos_test_image.bin --debug
11:54:54: DEBUG: Cache dir lookup.
11:54:54: DEBUG: Configured cache_dir to '/mnt/host/source/.cache'
11:54:54: INFO: Preparing to image the removable device
11:54:54: DEBUG: RunCommand: lsblk --pairs --output NAME,RM,TYPE,SIZE
11:54:54: DEBUG: RunCommand: lsblk --pairs /dev/sdb --output NAME,RM,TYPE,SIZE
Removable device(s) found. Please select/confirm to continue:
[0]: Generic USB3.0 Card Reader 29.7G (/dev/sdb)
Please choose an option [0-0]: 0
11:54:57: INFO: Using image ../build/images/guado_moblab/R72-11268.0.2018_11_27_1825-a1/chromiumos_test_image.bin
[###############################################################################################################################################################] 100%
11:56:06: DEBUG: RunCommand: sudo 'CROS_CACHEDIR=/mnt/host/source/.cache' -- sfdisk /dev/sdb
GPT PMBR size mismatch (10805404 != 62333951) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Checking that no-one is using this disk right now ... FAILED
This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.
sfdisk: Use the --force flag to overrule all checks.
11:56:06: DEBUG: RunCommand: sudo 'CROS_CACHEDIR=/mnt/host/source/.cache' -- sync
11:56:06: NOTICE: cros flash completed successfully.
3. What happens at developer screen (ctrl+U) (This fails):
Upon pressing ctrl+U screen goes black, then goes back to developer screen. When I ctrl + U for a second time, same thing happens.
,
Nov 28
re: 1. Need to get to the bottom of identity file missing, no such identity: /home/mqg/.ssh/testing_rsa: No such file or directory From my chroot, it does look like there's some auto-mount magic for that path and file is available. re: 3. from in-person discussion it sounds like orig usb stick had a bad image as subsequent re-writing of USB stick booted.
,
Nov 28
,
Nov 28
As a reference, Here is when I cros flash my Nami from within the chroot, which succeeds in the end. So yes, I think there is some magic for copying the outside ssh settings into the chroot. https://paste.googleplex.com/5581477383241728 You can safely ignore some connection timeouts, I got them because nami was connected to other wifi network (not test network) upon reboot.
,
Nov 28
Eventually I rebuilt packages & image and was able to flash with USB stick. Could have been a bad image.
,
Dec 8
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mqg@chromium.org
, Nov 28