#3095 Issue closed: Amazon Linux 2023 : DHCP is enabled but no DHCP client binary (dhcpcd dhclient dhcp6c dhclient6) was found - systemd-networkd - ReaR 2.7

Labels: support / question, no-issue-activity

ramzcode opened issue at 2023-11-29 07:46:

Using ReaR version 2.7 on Amazon Linux 2023.

systemd-networkd is responsible for DHCP and network setup.

ReaR throws error that no binary resalted to DHCP client is found and yes it is not needed on AL2023. The Array does not contain binary for AL2023 builds.

systemd-networkd.service and /usr/lib/systemd/systemd-networkd are core components responsible in this case it seems.

Please suggest if there is a fix or workaround to this.
Thanks in advance

ramzcode commented at 2023-11-30 13:49:

UPDATE: For AL2023, Using EPEL Repo RPM
https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/d/
install the DHCPCD agent on the source VM before building the rescue system and before running the ReaR backups. Once the First restore is done make sure we remove this RPM for sure.

It worked and i could access the Rescue instance via SSH with no problem. Yet to do the Full restore. Will update

jsmeix commented at 2023-11-30 14:11:

I think
usr/share/rear/prep/GNU/Linux/210_include_dhclient.sh
https://github.com/rear/rear/blob/rear-2.7/usr/share/rear/prep/GNU/Linux/210_include_dhclient.sh
could be improved to show better messages
(e.g. DebugPrint, LogPrintError, Error)
when USE_DHCLIENT is 'yes'
but none of the

dhcp_clients=(dhcpcd dhclient dhcp6c dhclient6)

can be found.

ramzcode commented at 2023-12-01 04:38:

@jsmeix It did have a clear error message but the distro won't have any of the listed dhcp clients by default cause it handles everything using the systems-networkd service and it's based components.

As a workaround and to make rear support DHCP on the rescue system I need to install an extra DHCPCD binary using EPEL repo based binary.

I think rear does its job correctly.

schlomo commented at 2024-01-13 18:52:

@ramzcode if you'd ask me I'd say that Amazon Linux 2 is probably not yet supported by ReaR, sorry. Maybe there isn't much needed for that - I simply don't know.

About DHCP indeed we don't support systemd-networkd properly, and we probably also don't really support all the other stuff that it does for networking.

Do you feel up for a contribution by submitting a PR with the missing Amazon Linux 2 support? Alternatively please consider our commercial support options

github-actions commented at 2024-03-14 02:01:

Stale issue message

ramzcode commented at 2024-04-19 07:02:

@schlomo @jsmeix Along with the systemd-network service, i did install installed the dhchcd client with caution and making sure it won't start on boot. Laster used ReaR and it easily handled the DHCP problem on the recovery image and we had no trouble moving forward.


[Export of Github issue for rear/rear.]