2

My goal is to boot the Raspberry Pi into the console and auto-run a script. I looked at this question for help.

The Raspberry Pi does boot into the console and runs the desired script, but sadly the script fails after the second command resulting in the console not doing anything anymore. (the script did work with the GUI).

I can still type but the console doesn't respond to any commands. Is there a way to force the Raspberry Pi to reboot into GUI? Can I somehow use "recovery mode" for this?

9
  • You should be able to mount the SD card in the recovery mode and change the boot up script to not execute that script. Then the Pi would boot normally. Would have to run sudo mount to do it. Have you tried that? Commented Jan 10, 2014 at 23:01
  • can't try it right now, but I think it won't work. The console won't respond to no commands after the custom startup script crashes. How can I make the console respond to my commands? Note: the script runs automatically on boot to console, can I abort the script it with ctrl + c or a other command? Commented Jan 11, 2014 at 0:37
  • I meant in recovery/emergency mode. You could also pop the SD card into your PC and then comment out the line in the bashrc file that starts the offending script. You can also pull some of the logs off the Pi and post them online so we can view them. Commented Jan 11, 2014 at 1:46
  • You can get to the recovery mode by holding shift during the boot. Should keep your script from executing, allowing you to boot and fix the issue to an extent. Read this question: raspberrypi.stackexchange.com/questions/1416/… that explains the difference between the kernels. You can boot the emergency kernel by renaming kernel.img to kernel.img and kernel_emergency.img to kernel.img. Should work the same as holding shift. Commented Jan 11, 2014 at 1:49
  • okay I got a bit further. I can now boot into emergency and I can edit the config.txt file. How can I use the config file to boot into the GUI? Or what command can I use to boot into the GUI from emergency mode? Sudo and nano for example are all unavailable. Commented Jan 11, 2014 at 20:41

1 Answer 1

3

OP decided in chat that it would be easier and take less time to simply re-flash and move files back on afterwards.

I'm just posting this until the OP creates a self-answer.

1
  • 1
    I'm back to where I was :) - I'll accept this answer until I, or someone else comes up with a fix. Commented Jan 14, 2014 at 22:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.