#3491 Issue closed
: /etc/resolv.conf is empty in the rescue system on Ubuntu 24.04¶
Labels: enhancement
, fixed / solved / done
svlv opened issue at 2025-07-08 09:22:¶
ReaR version¶
2.9
Describe the ReaR bug in detail¶
/etc/resolv.conf
is not populated by dhcpcd
on Ubuntu 24.04 because
/etc/dhcpcd.conf
is not present in the rescue system.
Logs during rescue system boot:
The most obvious fix is to copy /etc/dhcpcd.conf
(see
https://github.com/nable-backup/rear/pull/3/commits/fdf5e95879686c7bb4c7f1a40940585b19d2abbc),
but there is probably a better solution.
Platform¶
No response
OS version¶
Ubuntu 24.04
Backup¶
No response
Storage layout¶
No response
What steps will reproduce the bug?¶
No response
Workaround, if any¶
No response
Additional information¶
No response
jsmeix commented at 2025-07-08 10:56:¶
@svlv
did you notice USE_RESOLV_CONF in conf/default.conf
https://github.com/rear/rear/blob/rear-2.9/usr/share/rear/conf/default.conf#L3645
?
I am not (yet) a dhcpcd user so currently
I cannot understand from plain looking at
https://github.com/nable-backup/rear/commit/fdf5e95879686c7bb4c7f1a40940585b19d2abbc
how this fixes the issue, cf.
https://github.com/rear/rear/wiki/Coding-Style#code-must-be-easy-to-understand-answer-the-why
(excerpt)
Even if all is totally obvious for you,
others who do not know about your particular use case
or do not have your particular environment
may understand nothing at all about your code
I would much appreciate it if you could make a GitHub
pull request with your fix "copying /etc/dhcpcd.conf"
preferably with a comment in your code that tells how
copying /etc/dhcpcd.conf results a proper /etc/resolv.conf
in the recovery system, see USE_RESOLV_CONF in default.conf
what "a proper /etc/resolv.conf" usually means - perhaps
a proper /etc/resolv.conf might be different with dhcpcd.
FYI (1):
In theory I could familiarize myself with dhcpcd
but in practice I won't find time for that now
until I really must do it, cf.
https://github.com/rear/rear/issues/3295#issuecomment-2247746235
FYI (2):
My generic boilerplate regarding Ubuntu / Debian
and Linux distributions which are based on them:
I am neither a Ubuntu nor Debian nor Linux Mint user.
Currently we at ReaR upstream do not have an active
maintainer for Ubuntu / Debian / Linux Mint.
So ReaR support for Ubuntu / Debian / Linux Mint
can be only as good as voluntary contributors
who use those Linux distributions contribute
which is much appreciated!
In particular regarding Ubuntu:
It seems Canonical is not sufficiently interested in ReaR
in contrast to Red Hat and SUSE who pay developers
(like me from SUSE and e.g. @pcahyna and @lzaoral from Red Hat)
to contribute to upstream ReaR because Red Hat and SUSE
support ReaR in their enterprise Linux distributions.
jsmeix commented at 2025-07-08 10:59:¶
Because we at ReaR upstream do not have a maintainer for Ubuntu
this issue is no bug (because in practice Ubuntu is unmaintained
and a bug is when functionality which is meant to work doesn't)
so this issue is an enhancement to make it also work for Ubuntu
(where things are different than on the maintained distributions).
svlv commented at 2025-07-08 13:10:¶
Hello @jsmeix,
USE_RESOLV_CONF
can be definitely used as a workaround but it won't
fix the root cause. From my investigation, the root cause is
/etc/dhcpcd.conf
absence, which is why my first thought was to copy it
from the source system and see if that resolves the problem.
Regarding Ubuntu — it's just one of Linux distributions that use
dhcpcd
, it's possible the issue could appear on other systems too,
depending on how dhcpcd
is configured. I'm not a dhcpcd
expert, but
I suspect configurations can vary between systems.
If you think it's appropriate, I will create a PR to copy
/etc/dhcpcd.conf
.
jsmeix commented at 2025-07-09 07:38:¶
@svlv
yes, please make a PR!
gdha commented at 2025-07-15 13:06:¶
@svlv PR #3493 has been merged. Therefore, please check if all works fine.
jsmeix commented at 2025-07-15 13:27:¶
@svlv
only FYI:
You may have a look at
https://en.opensuse.org/SDB:Disaster_Recovery#Testing_current_ReaR_upstream_GitHub_master_code
how you could test our current ReaR upstream GitHub master code
without conflicts with a normally installed ReaR version.
svlv commented at 2025-07-16 09:37:¶
Thank you, @gdha and @jsmeix. Everything works well.
jsmeix commented at 2025-07-16 12:34:¶
@svlv
thank you for your contribution to ReaR!
[Export of Github issue for rear/rear.]