[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hostname is being reset, killing net on reboot



On Saturday, January 22, 2022 12:14:20 PM EST David Wright wrote:
> On Sat 22 Jan 2022 at 11:13:59 (+0100), tomas@tuxteam.de wrote:
> > On Sat, Jan 22, 2022 at 04:38:04AM -0500, gene heskett wrote:
> > > On Saturday, January 22, 2022 2:04:32 AM EST tomas@tuxteam.de 
wrote:
> > [...]
> > 
> > > > Once that part is flying, tackle names :)
> > 
> > I stay still by this :)
> > 
> > > But, I found, quite by serendipity, in the raspios version of
> > > bullseye, a fix. Look at the bottom of /etc/dhcpdcp.conf,
> > > 
> >                                   ^^^^^^^
> > 
> > ...that one looks like a typo to me. On my (not quite standard,
> > because I avoid systemd) Debian buster, there is a /etc/dhcp
> > hierarchy, with a dhclient.conf, which gets into action whenever my
> > machine requests an IP address (typically when I do "ifup foo", for
> > foo in eth0 or wlan0.
> > 
> > The host name does figure there: it goes out with the request, in
> > case
> > the DHCP server wants to take decisions based on that. No DHCP server
> > I interact with takes notice, but they might.
> > 
> > This is the only connection I see.
> > 
> > That filename directly at top-level looks to me pretty
> > raspi-specific.
> > Is it configuring some DHCP server, or your client?
> 
> It looks like Gene might be talking about /etc/dhcpcd.conf from
> dhcpcd5_7.1.0-2+b1_amd64.deb (or the appropriate hardware).
> In any case, it looks like an instance of "make some change in
> some file until it works", which is fine until any of a reboot,
> an upgrade, a change somewhere else in the system, etc which
> causes it to stop working.
> 
> And when posts starts appearing here again, Gene's system is
> even more unlike anybody else's than it is today.
> 
> Cheers,
> David.

Ok David, perhaps you can explain to me why my use of an identical hosts 
file on every machine in my tiny home network to describe my local 
network is bad, to be denigrated at every turn of the screw you can 
manage.

So my resolv.conf says to search coyote.den, and failing that, use my 
isp's nameserver by relaying the request for lookup to my router, which 
in turn querys my isp after NATing the request, to look up the name.

That way the only 2 limitations on local host and domain names is that 
they cannot start with a number, but must be alpha. And they must NOT be 
volatile. Which explains why one of my machines, a 6040 4 axis milliing 
machine, is called sixty40.coyote.den.

Linux goes out of its way to kill networking by ignoring what I put in a 
file in /etc/network/interfaces.d/anyoldname. And when some coder dinking 
around in dhcp code thinks the whole world is volatile, and changes a 
hostname just because they can boggles my mind. But its the only way to 
have a sane local network with STABLE names and addresses.

So convince me how I can build a stable local network using dhcp that 
still allows me to "ssh -Y rpi4" and know for 100% certainty that dhcp 
hasn't rerouted my ssh session to tlm.coyote.den.

To me its unnecessary complexity to even run a nameserver of any kind on 
my local network.  Makes zero sense to me, I've been doing it this for 25 
years now, how long have you?

Unless you can tell me how to get a STABLE, Just Works local network 
using dhcpd, I'll keep on doing it my way. That is a question I've asked 
one way or another on various lists, without ever getting a step by step 
instruction on how to make a far more complex method Just Work. To me 
there has to be a STABLE place to start, and that hostname files contents 
is it IMNSHO.

Can you understand my anger when I edit /etc/hostname to call a machine 
an "rpi4", reboot it, no network, something has taken upon itself the 
authority to make a cat /etc/hostname return "raspberry" after a reboot.

That is bs, usually found on the ground, warm and smelly, behind the male 
of the bovine specie. Its gotten a bit less smelly in recent years, but I 
used to have to chattr +i both the /etc/hostname and /etc/resolv.conf 
files to make it work reliably at every reboot. I think jessie was the 
last time I had to do that.

I was about to revert to doing it again when I found the last 2 
paragraphs in the bottom of the /etc/dhcpdcp.conf file on the rpi4, which 
has the effect of the last word if a dhcpd server can't be found.

Since the list seems determined to keep this thread alive, I'll wait for 
an explanation I can print, take around to all my machines and follow to 
implement it YOUR way. But I'm not going on a hunger strike until that 
happens.

Take care, and stay well, ALL of you.

Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>




Reply to: