Closed BrainStone closed 5 years ago
From what I can tell so far it seems like the file /etc/resolv.conf
exists for some odd reason. I'm not sure when it gets added, but it's there, which means the check here https://github.com/drtyhlpr/rpi23-gen-image/blob/testing/files/firstboot/25-create-resolv-symlink.sh#L4 fails and doesn't restart the service.
Now I know the file should've been removed before the image is created and the log suggests it is. So I really don't know where this file is coming from.
I can't check if it's in my image or not, simply because I don't know how to list files in the image. If anyone knows how to do that, I can check.
Second update, the file is not in the image, which makes it even weirder. Something must create during the first boot before the /etc/rc.firstboot
script executes.
That means most likely something I'm doing must add it if none of you have the same issue.
Will keep you posted!
I'll watch for this error on my next install. I didn't notice smth. special as systemd-resolved
and /etc/resolv.conf
are in my image atm.
However i did experience this error once. It was a prepending error in rc.firstboot which caused it. Does the service gets enabled?
Btw: While looking at the referenced line - This looks wierd to me. Both -a
and -e
do check if file exists and one is negated. But script doesn't break so it seems atleast valid :D
The -a
is an AND
in that situation.
And no it doesn't. As I said, the first check fails. And the file should've been removed from the image: https://github.com/drtyhlpr/rpi23-gen-image/blob/testing/rpi23-gen-image.sh#L693
Also I just tested removing the file /etc/resolv.conf
, then rebooting. The script still failed at the same spot, so something is actively adding the file before rc.firstboot
is run.
I suggest either just removing the check for /etc/resolv.cong
or additionally also removing the file entirely, so it becomes that symlink in any case.
@burnbabyburn do you also happen to have dhcpcd
added to your image?
@burnbabyburn do you also happen to have
dhcpcd
added to your image?
i found dhcpcd. but i think it is from pihole not from the image. We'll see next cycle :) €dit: no it's not installed after imaging.
Maybe dhcpcd is related to sysv-init?
root@pihole:/etc/pihole# systemctl disable dhcpcd
dhcpcd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable dhcpcd
and i just did a new firstboot (but without dhcpcd watching yet)
rc.firstboot: Creating /etc/resolv.conf symlink
rc.firstboot: Reload systemd manager configuration
Ok. I disabled the service before first boot and the issue went away, so it's dhcpcd
for sure.
I'll soon create a PR that will improve the wireless stuff. That will also include the fix, as I only even have that service for WiFi.
The rc.firstboot script errors with the following issue:
I am using the testing branch.