I have a raspberry pi 3b that I use for a variety of purposes. It is connected through ethernet. Recently I noticed that it doesn't always come back onto my local network, i.e. it doesn't show up on my router's list of connected devices, nor does it accept ssh / vnc connections after a reboot. At first I thought that it was due to a failing microSD card, but I reimagined my recent backup on a brand new card and the problem persist. It takes anything between two and five reboots for it to come back.
Is there anything that I can do to ensure it reconnects after every reboot?
Re: Ethernet-connected 3b doesn't always come online
Is it configured via DHCP?
Do you use the file /etc/network/interfaces? (don't)
Do you use the file /etc/network/interfaces? (don't)
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel
Re: Ethernet-connected 3b doesn't always come online
If your OS is somewhat recent, then ifupdown is not to be used. When ifupdown is activated by editing the legacy interfaces file, the other means of configuring networking disengage or clash with it.
In the case of Raspbian, dhcpcd gives up configuring interfaces that are defined in that file. So this could explain that.
ifupdown was a cool Debian addition to linux over 15 years ago. It started struggling as soon as udev appeared (not yesterday...), and by now its design is completely at odds with the way linux, desktop environments and other modern daemons work.
It is still somewhat valid in embedded and server scenarios, but that's it.
In the official documentation and in /etc/dhcpcd.conf itself you will see examples of static IP config if you really need that. Since you have access to your router I would recommend using fixed IP DHCP reservation instead of configuring a static IP in the machine.
In the case of Raspbian, dhcpcd gives up configuring interfaces that are defined in that file. So this could explain that.
ifupdown was a cool Debian addition to linux over 15 years ago. It started struggling as soon as udev appeared (not yesterday...), and by now its design is completely at odds with the way linux, desktop environments and other modern daemons work.
It is still somewhat valid in embedded and server scenarios, but that's it.
In the official documentation and in /etc/dhcpcd.conf itself you will see examples of static IP config if you really need that. Since you have access to your router I would recommend using fixed IP DHCP reservation instead of configuring a static IP in the machine.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel
Re: Ethernet-connected 3b doesn't always come online
I already have the reservation.
Also, my Raspbian is Buster, but updated all the way from Jessie. Please explain how am I supposed to disable /etc/network/interfaces.
Also, my Raspbian is Buster, but updated all the way from Jessie. Please explain how am I supposed to disable /etc/network/interfaces.
Re: Ethernet-connected 3b doesn't always come online
Comment every single interface block defined in it (and in interfaces.d/* snippets)
Don't even keep lo in there.
Then edit dhcpcd.conf, near the bottom of the file you should see static config examples you can copy-paste, uncomment and adapt.
Don't even keep lo in there.
Then edit dhcpcd.conf, near the bottom of the file you should see static config examples you can copy-paste, uncomment and adapt.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel
Re: Ethernet-connected 3b doesn't always come online
The problem still persists. I commented every line in the interfaces file, the interfaces.d folder is empty and my dhcpcd was already configured for static config, as I use pihole
Re: Ethernet-connected 3b doesn't always come online
So have you upgraded each time by just changing the sources list and doing update/upgrade ?
if so this could well be the cause of your problems which is why its not recommended you do this.
It is recommended you start over with a fresh install of raspbian each time there is a new version .
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported