site  contact  subhomenews

Active ethernet at first boot

December 16, 2016 — BarryK
In the last post, I mentioned running my Pi3 "headless". I will write more about that, but right now, a little precursor fix.

Quirky, and Puppy, detects if an active ethernet cable is plugged in at the very first bootup. The idea being that you will then have network access automatically, without having to setup anything.

/etc/rc.d/rc.sysinit calls /etc/rc.network on the first bootup, which probes for an active ethernet connection.
This is very old code. Puppy forum member 'shinobar' wrote that piece of code in rc.sysinit, and 'Dougal' is responsible for most of the code in rc.network.

For my headless setup, I have a wireless router connected to the Pi3 by ethernet cable. However, at bootup the active ethernet connection was not automatically detected.

I found problems in rc.network, so I have written a small replacement, /etc/rc.d/rc.network_eth, which only does one thing, detect an active ethernet connection and run 'dhcpcd'.

Now it works. This automatic setup is important, as I can control the Pi remotely without having to setup anything on the Pi.

Even X does not have to be running. MobaXterm on my laptop has its own X server. I have actually used this situation -- X is broken on the latest experimental build of Quirky. No problem, I was able to run any GUI applications on the Pi from my laptop. Which is a bit weird.

Tags: linux