How can I undo the sudo code that was run with the wrong type of LCD “…-show” The system boots to a certain point and then just does not continue. Ive tried mounting the micro sd and see if I can change to the designated screen, but can’t find where or how without formatting the drive and reinstalling the system The code that was used was:
sudo rm -rf LCD-show git clone https://github.com/goodtft/LCD-show.git chmod -R 755 LCD-show cd LCD-show/ sudo ./LCD35-show
but should have been:
git clone https://github.com/goodtft/LCD-show.git chmod -R 755 LCD-show cd LCD-show/ sudo ./MPI3508-show
Rpi can no longer boot after installing wrong LCD driver. How to fix?
A quick and dirty fix is:
- Use a new SD card with a freshly downloaded Raspbian image, without any new LCD driver installed.
- Then install your correct LCD driver.
You can fiddle with the Raspbian config files to remove wrongly installed the LCD driver, but that is very messy. You might might to read the references below to see how tricky it is.
/ to continue, …
I assume you are running Raspbian Stretch. If so you can use systemd to try to boot into rescue or emergency mode. In systemd.special — Special systemd units you will find for
A special target unit that pulls in the base system (including system mounts) and spawns a rescue shell. Isolate to this target in order to administer the system in single-user mode with all file systems mounted but with no services running, except for the most basic. Compare with emergency.target, which is much more reduced and does not provide the file systems or most basic services.
Use the “systemd.unit=rescue.target” kernel command line option to boot into this mode.
So pull out the SD Card of the RasPi, make a backup image from it on another computer and then edit
cmdline.txt on the boot partition. Just append
systemd.unit=rescue.target at the end of the line and boot it in your RasPi.
You can also try to boot with
cmdline.txt but as explained in systemd.special that’s much more limited in execution of programs.
With some luck you may be able to fix your problem.