020110348
Posts: 18
Joined: Thu Mar 21, 2013 12:07 pm

I messed up... rc.local freezes

Fri Mar 22, 2013 1:42 am

I put a scrip in the rc.local file, that calls a while loop... never ending. all that i found i can do is hit ctrl+alt+del and reboot, still errors out. i tried the jumper between 5+6 didnt help.

what can i DO????

User avatar
tonyhughes
Posts: 951
Joined: Wed Dec 26, 2012 3:46 am

Re: I messed up... rc.local freezes

Fri Mar 22, 2013 1:47 am

Mount the card on a linux machine and edit the file...

020110348
Posts: 18
Joined: Thu Mar 21, 2013 12:07 pm

Re: I messed up... rc.local freezes

Fri Mar 22, 2013 1:52 am

your going to make fun of me, but the raspberry pi is my only linux machine... need windows for work :(

User avatar
rpdom
Posts: 14483
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: I messed up... rc.local freezes

Fri Mar 22, 2013 6:16 am

If you have a Windows machine that you can edit cmdline.txt on, you could try something along the lines of the (fairly standard) recovery method detailed by Joe Schmoe here http://www.raspberrypi.org/phpBB3/viewt ... 26#p257892.

Don't do the bit about editing /etc/inittab (step 3 c), as that is not your problem. Instead, correct your /etc/rc.local at that point. Then continue as directed. That should fix you :-)

020110348
Posts: 18
Joined: Thu Mar 21, 2013 12:07 pm

Re: I messed up... rc.local freezes

Fri Mar 22, 2013 2:55 pm

what i did was use my RPi with a different SD card, than mounted and edited rc.local. as soon as i typed all i have is windows and hit submit, it hit me, use the RPI to fix Itself.

EDIT: SOLVED!!

now i found the probelm line "sudo python /home/pi/run.py" inside run.py it is waiting for every time a GPIO button is pressed press a virtual esc key. that code worked, but when i put it there i thought it would let boot continue. how can i run "run.py" that does nothing untill a gpio is pressed, and let boot contine. would backgrounding? "sudo python /home/pi/run.py &" it work?

foud in differnt thread thakn you

fishoasis
Posts: 3
Joined: Fri May 26, 2017 8:47 pm

Re: I messed up... rc.local freezes

Sun May 28, 2017 3:39 am

Hi,

Could you be more specific about how you mounted the card and found /etc/rc.local? I think I mounted the card but can't find /etc/rc.local

itimpi
Posts: 1083
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: I messed up... rc.local freezes

Sun May 28, 2017 12:49 pm

fishoasis wrote:Hi,

Could you be more specific about how you mounted the card and found /etc/rc.local? I think I mounted the card but can't find /etc/rc.local
If you have mounted the card, then the location will be of the form /<mountpoint>/etc/rc.local where <mountpoint> is where the card is mounted.

Return to “Troubleshooting”