-1

I ruined my RPi, by using Python script in rc.local which shutdowns RPi as soon as it starts. Thus I cannot even login or ssh. How could I edit SD card from windows to change that rc.local file?

Milliways
  • 59,890
  • 31
  • 101
  • 209
Ri Di
  • 107

1 Answers1

1

This can not be done on Windows, but it can be fixed on any Linux system (which can be a Pi).

You can repair most such problems on the Pi itself by rebooting to a root shell.

  1. Append init=/bin/sh at the end of cmdline.txt and reboot.
  2. After booting you will be at the prompt in a root shell.
  3. Your root file system is mounted as readonly now, so remount it as read/write mount -n -o remount,rw /

You can then edit files to fix the problem.

  1. Remove init=/bin/sh from cmdline.txt and reboot.
Milliways
  • 59,890
  • 31
  • 101
  • 209