The reason I am asking is because I have setup my Raspberry Pi 3 b+ to run a specific script on boot, the only issue is this is an infinite loop and prints every time - so I cannot enter any commands!

At the moment I can interrupt with alt+f4 which brings me to the login. If I log in as the default user it just runs the loop again. Are there anymore default logins I can use to bypass this issue?

I know a better solution would be to edit the files from another PC however my machine's SD card reader is broken so I'll need an adapter...which I would like to avoid for now.

  • 1
    Remove the SD card. Edit the cmdline.txt and add ` init=/bin/sh` at the end of the one and only line in that file ... insert back into pi ... boot ... fix the issue ... reverse the process above Commented Mar 28, 2019 at 9:28
  • Other solutions may be available depending on how exactly you start the script and how exactly you log in. Commented Mar 28, 2019 at 9:32
  • 2
    In addition to what @JaromandaX said, use the opportuinty to also create a new user so you can login the next time. Commented Mar 28, 2019 at 9:33
  • @JaromandaX thanks for the response, is this the only issue? My other machine is unable to read SD cards at the moment
    – EcSync
    Commented Mar 28, 2019 at 9:38
  • 3
    is this the only issue I don't have an issue ... if you mean only solution, have you tried holding doing ctrl-c? Commented Mar 28, 2019 at 9:43


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.