Stuck in terminal, GUI does not start

Hi everyone! I’ve been working on a Jetson Nano, and my GUI has stopped loading after a reboot and I’m not stuck on a terminal login. While I can of course flash a new image, I’m looking to understand what happened.

My dmesg:
boot.log (60.1 KB)

So the last things I was working on were gstreamer. I was running the compiled tutorial codes that had video/audio and I did an export DISPLAY=:0 to make some errors go away because I was working on the nano via remote SSH. I installed a bunch of gstreamer plugins as stated
here.

I was also writing a Makefile before then that would compile all .c files in the folder and cleaning them. I think I could have accidentally did a rm -rf /bin here while defining the phony targets but the stupidity was caught by the OS before any damage could be done and it was never in sudo. I checked my root files and they are there.

Lastly, a bluetooth keyboard for the nano was under a bunch of pillows on the sofa. I’m wondering if ctr + alt + fxx could persisted some virtual console changes? If so how do I get out of it? I read about the virtual console sessions here: tty - How do I get out of Ctrl + Alt + F3? - Ask Ubuntu

I’m running my display to a HDMI monitor. I’ve tried using startx to force the GUI but it just hangs on the nvidia logo.

Serial console would be the best way to see what is going on. This has the fewest dependencies and tends to survive a lot of failures. See:
https://www.jetsonhacks.com/2019/04/19/jetson-nano-serial-console/

If this is a Nano with SD card, then you can just look at the rootfs partition on your PC and see if “/bin” is missing. If this is the b01 revision using eMMC, then you could clone the image to see if “/bin” is missing. It is just a guess, but I think the logs got far enough along that probably “/bin” is not missing.

Virtual console would work if your boot got to console login stage (multi-user.target in systemd), but logs probably imply you never made it to that stage. Basically several text consoles are normally spawned which correspond to something like F1-F6 (or ALT-F1 through ALT-F6), and one of those is then replaced with the GUI (graphical.target in systemd on the default console). Logs of that default console would show reaching a login point and then being overwritten with a GUI, but I don’t see that.