autotest: Device booted from external driver when main not detected

If main device not detected but we detected booted device than we booted
from external.
If internal device detect but not match to booted one then we booted
from external.

BUG=None
TEST=run local repair on DUT with not detected internal storage

./server/autoserv -s --host-info-subdir host_info_store -m     	chromeos6-row4-rack11-host15 --lab True --local-only-host-info True -R -r /tr/

Change-Id: I37b3c395b5f60337883d8422335aff84e79e2203
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2580127
Commit-Queue: Otabek Kasimov <otabek@google.com>
Commit-Queue: Garry Wang <xianuowang@chromium.org>
Tested-by: Otabek Kasimov <otabek@google.com>
Auto-Submit: Otabek Kasimov <otabek@google.com>
Reviewed-by: Garry Wang <xianuowang@chromium.org>
diff --git a/server/hosts/cros_host.py b/server/hosts/cros_host.py
index cd2f2a5..eda8934 100644
--- a/server/hosts/cros_host.py
+++ b/server/hosts/cros_host.py
@@ -2687,14 +2687,11 @@
         main_storage = self.run(main_storage_cmd,
                                 ignore_status=True,
                                 timeout=60).stdout.strip()
-        if not main_storage:
-            logging.debug('Main storage not detected on the host.')
-            return False
-        if boot_device == main_storage:
-            logging.debug('Device booted from main storage.')
-            return False
-        logging.debug('Device booted from external storage storage.')
-        return True
+        if not main_storage or boot_device != main_storage:
+            logging.debug('Device booted from external storage storage.')
+            return True
+        logging.debug('Device booted from main storage.')
+        return False
 
     def read_from_meminfo(self, key):
         """Return the memory info from /proc/meminfo