[Solved] Change to ethernet with sd card edit

Hello. My wifi router broke so my rpi cannot connect any longer to the previous 5GHz signal. Apparently, I had HDMI disabled in the pi and ethernet also. So now I am stuck with no SSH capabilities and no way to acces the dietpi-config section. Which file do I need to modify in the SD card to (1) activate HDMI back and (2) activate ethernet. I googled a little bit and found two files with what it seems to be network configuration. I tried to change some of the files information to get ethernet enabled again, with no luck. This is the current state of those files. Any help is appreciated.




#Please use DietPi-Config to modify network settings.

# Local
auto lo
iface lo inet loopback

# Ethernet
allow-hotplug eth0
iface eth0 inet dhcp

# Wifi
#allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-power off
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

/dietpi/.network is just a file that contains the values estimated from the real network before, e.g. used by other DietPi scripts to show and deal with correct network info.
/dietpi/conf/network_interfaces is the default interfaces file that is used only on 1st run/preparation and copied to /etc/network/interfaces.

So the last is the one that you need to edit, as you did:

allow-hotplug eth0
iface eth0 inet dhcp

is the part that enables Ethernet.

Another possibility is to re-enable HDMI by doing the following:
In /dietpi.txt set: CONFIG_HDMI_OUTPUT=1 to re-enable HDMI.
If you set headless mode via dietpi-config, you also need to increase the framebuffer size, otherwise one letter would take the whole screen. For this open config.txt and adjust:


Or use any other resolution that is supported by your screen.

Ok, I still can’t get it to connect using ethernet after looking at the interface file…I noticed that a file called #/etc/network/interfaces is also in the same folder…shall I do anything with it? any other ideas?
I regain HDMI, but I had KODI as boot option. So I see the system booting in the screen, but after kodi starts, the screen goes black. How do I set console as the start option editing files in the SD card?

Thank you

Nevermind, figured it out and connectivity fixed. Thanxs.

Okay, great you figured it out. Just for reference:

  • It should be somehow possible to exit from Kodi back to console, but not 100% sure, since I don’t use it.
  • You can change the startup option via: dietpi/.dietpi-autostart_index
    Value “1” is Kodi, value “0” is default console login.