dpeach
Posts: 7
Joined: Sun Jan 04, 2015 8:55 pm

[Solved] Disable Boot to Desktop through editing file

Wed Mar 25, 2015 7:39 pm

[I was completely off in my assessment of what the problem was. See my reply to klricks.]

Somehow I have messed up something in the boot process on my Pi. I always boot to command line, but for this project I need it to boot right into the desktop. I set that up through raspi-config. Everything was working fine until I plugged in a USB hub. I am not sure the USB hub had anything to do with the problem, but now it won't boot and that was the last thing I did.

The Pi seems to boot fine up until it tries to start the Desktop. Then it actually acts like it shuts down. The screen goes black and the green activity light seems to be doing something. After a few seconds the HDMI connected monitor loses connection with the Pi. The monitor's connection LED indicator starts to blink like there is nothing connected.

At this point I can't get the Pi to respond to any keyboard input and the green light is completely dead. It is just like the Pi is halted.

What I would like to do is edit the right file on the SD card from another Linux machine that will force it to boot without starting the Desktop/lightdm. Because the Pi won't boot up completely I cant run raspi-config again to set it there. Does anyone know what file and what line I'm looking for?

This particular setting doesn't seem to be in the /boot/config.txt file.

I've also tried booting into runlevel 1 and running raspi-config from there. But it doesn't seem to save the configuration. Because it acts exactly the same after running raspi-config and setting it to boot to command line.

I appreciate any pointers. I don't want to have to rebuild this SD card if I can keep from doing so. But too many more hours on this project and I might need to. I have to actually get back to doing real work at some point instead of fighting with this.
Last edited by dpeach on Thu Mar 26, 2015 6:45 pm, edited 1 time in total.

klricks
Posts: 7032
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Disable Boot to Desktop through editing file

Thu Mar 26, 2015 1:51 am

Which RPi model? Does the power LED stay on steady? Do you have a volt meter to test voltage?
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

dpeach
Posts: 7
Joined: Sun Jan 04, 2015 8:55 pm

Re: Disable Boot to Desktop through editing file

Thu Mar 26, 2015 6:43 pm

klricks,
Thank you for your reply.

The TL;DR version:
I got it working and it had nothing to do with booting to the desktop.

Full version:
I videoed the output while it was booting and was able to see more what was happening. It indeed was shutting down immediately upon boot.

That made me think a couple steps back and realized that at the same time I was trying the new USB hub, I had used a Python script that halted the computer when a push button was activated connected to the GPIO. So, I mounted the SD card on another Linux box and commented out the line in my crontab that made the OS listen for that script. After that, the Pi booted fine.

So, I am at the point of not knowing why my script stopped working though it had worked previously. I suspect it has to do with the new push button that I tried.

Even though I have been on a quest to salvage this install, I just found out today that the new touchscreen LCD I ordered requires its own Raspbian .img. So, I will make an image of my SD card in case I want to go back to this one and start over with the LCD image later today.

Thanks again for replying.

klricks
Posts: 7032
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Disable Boot to Desktop through editing file

Fri Mar 27, 2015 12:02 am

dpeach wrote:...... I suspect it has to do with the new push button that I tried.....
One possibility:
Many switches have Normally Open and Normally Closed terminals plus a common terminal. You would use one or the other depending on how your switch is wired and controlled by the script program. If you are connected to the N.C. terminal when your circuit was designed for the N.O. terminal then the script will see the switch as always pressed.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Return to “Troubleshooting”