Skip to content

Commit

Permalink
Set grub timeouts to 0 to workaround reboot getting stuck if spurious…
Browse files Browse the repository at this point in the history
… input is received on serial
  • Loading branch information
rmartin013 authored and nancyc12 committed Dec 29, 2023
1 parent 3b930ba commit 1f137e0
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,20 @@ def create_user(self, image_type):
)
cmd = f"sudo cp {remote_tmp}/user-data {ci_path}"
self._run_control(cmd)

# Set grub timeouts to 0 to workaround reboot getting stuck
# if spurious input is received on serial
cmd = (
"sudo sed -i 's/timeout=[0-9]*/timeout=0/g' "
f"{base}/boot/grub/grub.cfg"
)
self._run_control(cmd)
cmd = (
f"grep -rl 'GRUB_TIMEOUT=' {base}/etc/default/ | xargs "
"sudo sed -i 's/GRUB_TIMEOUT=[0-9]*/GRUB_TIMEOUT=0/g'"
)
self._run_control(cmd)

self._configure_sudo()
return
if image_type == "pi-desktop":
Expand Down

0 comments on commit 1f137e0

Please sign in to comment.