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?

  • 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? – RPiAwesomeness Jan 10 '14 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? – Maarten Hartman Jan 11 '14 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. – RPiAwesomeness Jan 11 '14 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. – RPiAwesomeness Jan 11 '14 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. – Maarten Hartman Jan 11 '14 at 20:41
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
    I'm back to where I was :) - I'll accept this answer until I, or someone else comes up with a fix. – Maarten Hartman Jan 14 '14 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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