diff --git a/tools/pyboard.py b/tools/pyboard.py
index 92c8d939a01af441883cb7de2e2dfa12603aecf6..510f61be698ea5f7bfb90f47d16f79df0219680c 100755
--- a/tools/pyboard.py
+++ b/tools/pyboard.py
@@ -165,8 +165,14 @@ class Pyboard:
             raise PyboardError('could not enter raw repl')
 
         self.serial.write(b'\x04') # ctrl-D: soft reset
-        data = self.read_until(1, b'soft reboot\r\nraw REPL; CTRL-B to exit\r\n')
-        if not data.endswith(b'soft reboot\r\nraw REPL; CTRL-B to exit\r\n'):
+        data = self.read_until(1, b'soft reboot\r\n')
+        if not data.endswith(b'soft reboot\r\n'):
+            print(data)
+            raise PyboardError('could not enter raw repl')
+        # By splitting this into 2 reads, it allows boot.py to print stuff,
+        # which will show up after the soft reboot and before the raw REPL.
+        data = self.read_until(1, b'raw REPL; CTRL-B to exit\r\n')
+        if not data.endswith(b'raw REPL; CTRL-B to exit\r\n'):
             print(data)
             raise PyboardError('could not enter raw repl')