Re: Arrgh!! systemd strikes again!

Oct 18, 2023 Last reply: 2 years ago 20 Replies

In article (Dans l'article) <ugopuj$3mnhe$ snipped-for-privacy@dont-email.me, The Natural Philosopher snipped-for-privacy@invalid.invalid wrote (écrivait) :


No files exist to set up static IP!

Do you see /etc/dhcpcd.conf?


No. It no longer exists

In article (Dans l'article) <ugp7li$3pssb$ snipped-for-privacy@dont-email.me, The Natural Philosopher snipped-for-privacy@invalid.invalid wrote (écrivait) :

Hmm! it seems that the method varies depending on the Debian version on which the Pi OS version is based: 12 (bookworm), 11 (bullseye), etc.

I understand that. :-)

I don't understand that! That *file* already exists in bookworm and it's exactly the same as in bullseye ???

There must be more to it than that, there has to be. Where did your pi learn what static address you wanted to put in the that file???

I suspect I'm not understanding (in this context) words like 'populate' and 'create'. I cannot create something that already exists.

Sorry to be so thick.

Bob.

I've done some googling and been successful for once !!!

formatting link
It says create a file /etc/network/interfaces.d/eth0 put all the data above in there yourself. I did that and only that. It worked.

I don't know how yours created the file for you.

Bob.

Well the discussion was about the 'latest and greatest' - i.e. Bookworm. I am sorry if I didnt make that clear.

Its a pain in the rectum: at one fell swoop, new versions obsolete *all* the online documentation.

PS Bookworm is a lousy name for a version. Why couldn't they have called it 'Desdemona' .

It didn't exist in my installation.

Did you use a GUI tool - i.e. Network manager - to set up networking? It is possible that that would have created it. I am running with no monitor and keyboard at all.

No, but if it does not...

e.g, my current setup is this

/etc/network $ ls -la total 36 drwxr-xr-x 7 root root 4096 Oct 10 04:41 . drwxr-xr-x 92 root root 4096 Oct 18 22:17 .. drwxr-xr-x 2 root root 4096 Oct 10 04:41 if-down.d drwxr-xr-x 2 root root 4096 Oct 10 04:41 if-post-down.d drwxr-xr-x 2 root root 4096 Oct 10 04:41 if-pre-up.d drwxr-xr-x 2 root root 4096 Oct 10 04:41 if-up.d

-rw-r--r-- 1 root root 134 Oct 10 04:37 interfaces drwxr-xr-x 2 root root 4096 Oct 18 15:30 interfaces.d

-rw-r--r-- 1 root root 271 Oct 10 04:41 interfaces.new

So there is now an interfaces, but there *wasn't*. But what's inside it is...

/etc/network $ more interfaces

# interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source /etc/network/interfaces.d/*

So it actually just says 'look elsewhere'

and in ..interfaces.d there now exists a file called eth0 which I certainly never created

/etc/network $ ls -la interfaces.d total 12 drwxr-xr-x 2 root root 4096 Oct 18 15:30 . drwxr-xr-x 7 root root 4096 Oct 10 04:41 ..

-rw-r--r-- 1 root root 128 Oct 18 15:30 eth0

And in THAT file is what I had originally put in /etc/network/interfaces...i.e.

$ more interfaces.d/eth0

allow-hotplug eth0 iface eth0 inet static address 192.168.0.101 network 192.168.0.0 netmask 255.255.255.0 gateway 192.168.0.254

SO the 'bookworm way' seems to be that until and unless you fiddle with networks via network manager, and its GUI, there is no interfaces or eth0 file (or it's set up for DHCP) and if you edit it, at some point on boot, the OS reads that file, decides that its inappropriate for adults, pops it in interfaces.d/eth0 and then rewrites interfaces to point to it.

Not thick. Once again the Poetterings of this world have stuck their sticky fingers in 'how things work' to create more work for everybody

...'twas on a Monday morning that the Programmer came to call...

(For Left Pondians try this link:

formatting link
)

Nor the **** do i

I think something deleted your file.

I've just used a downloaded image of "lite" no gui at all. unpacked it and burnt it.

Then added SSH empty file and then added userconf.txt.

Transferred the sd card to the pi and booted.

SSH and logged in.

Then

pi@raspberrypi:~ $ cd /etc/network pi@raspberrypi:/etc/network $ ls -l total 28 drwxr-xr-x 2 root root 4096 Oct 10 01:10 if-down.d drwxr-xr-x 2 root root 4096 Oct 10 01:10 if-post-down.d drwxr-xr-x 2 root root 4096 Oct 10 01:10 if-pre-up.d drwxr-xr-x 2 root root 4096 Oct 10 01:10 if-up.d

-rw-r--r-- 1 root root 134 Oct 10 01:04 interfaces drwxr-xr-x 2 root root 4096 Jan 24 2023 interfaces.d

-rw-r--r-- 1 root root 271 Oct 10 01:10 interfaces.new pi@raspberrypi:/etc/network $

It existed for me from scratch.

I did not.

So am I.

Cheers,

Bob.

In article (Dans l'article) <ugqvkv$9h41$ snipped-for-privacy@dont-email.me, The Natural Philosopher snipped-for-privacy@invalid.invalid wrote (écrivait) :

No problem.

It's interesting to see the differences with Bullseye. This will definitely help me during my upgrade.

For my part I still use Bullseye:

$ cat /etc/debian_version 11.7

There is nothing in the "interfaces" file:

$ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source /etc/network/interfaces.d/*

But this directory is empty:

$ ls -al /etc/network/interfaces.d/ total 8 drwxr-xr-x 2 root root 4096 4 nov 2020 . drwxr-xr-x 7 root root 4096 3 mai 02:09 ..

Perhaps I misremembered and created *eth0* in *there* myself. .

I was busy trying to get it working and just plagiarised some online instructions, and it 'just worked'.

Linux to me is not an end in itself. Its a system building block, and I am not THAT interested in its internals. ;-)

I really ought not to have been playing with a Pi4 at all, as I have many other projects on the go, but a shiny new piece of hardware was somewhat irresistible...

The serial terminal is easily stuffed up in boot configuration, or by running code that uses the GPIO and doesn't account for serial when setting the peripheral configuration registers. There may also be different steps to enable it in other Linux distros (I still haven't figured out how to make it work in PiCore, but at least that distro doesn't insist on Network Manager, Systemd, or any of that similar junk).

My fall-back is always the HDMI/Composite desktop and a USB wireless keyboard/mouse. It seems to be really hard to break that accidentally, and any Linux distro should be set up to give you a terminal there by default.

Because Disney didn't exist in ℂ17 ?

Debian release names are characters from the Toy Story films, not from Shakespeare plays ...

One of the better reasons for avoiding Debian

"Desdemona, a feminine name of Greek origin that means "ill-fated" or "unlucky." "

Not necessarily to do with Shakespeare...

Reminds me of a PPOE (I wonder if anyone will recognise it) where the machine names were all gemstones. It must have been easy at first, diamond, ruby, emerald ... by the time I turned up for a contract they were down to Gabbro for my workstation and the network admin's bookshelf contained a thick reference book listing precious and semi-precious stones.

That place convinced me that themed naming schemes were a bad idea, functional and serial number based naming schemes may be boring but they don't run out of steam and they're never confusing.

That admin might have (originally) been me. I remember 'mud' being used.

A later department started an array of Sparcs with 'Ariel' being the first one...shakespeare themed

however that sysadmin went on holiday so when the next three workstations arrived they were promptly named 'Surf' 'Bold' and 'Tide' - these being, with Ariel, UK soap powders from the 1960s and 70s

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required