Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#45553 - [arch-install-scripts] arch-chroot fails if the chroot does not contain file etc/resolv.conf
Attached to Project:
Arch Linux
Opened by Sebastian Pipping (sping) - Saturday, 04 July 2015, 19:42 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 04 July 2015, 21:17 GMT
Opened by Sebastian Pipping (sping) - Saturday, 04 July 2015, 19:42 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 04 July 2015, 21:17 GMT
|
DetailsHi!
arch-chroot seems to refuse entering chroots without etc/resolv.conf. Is that intended? Here is how to reproduce it on the shell: # ls root_amd64/etc/resolv.conf ls: cannot access root_amd64/etc/resolv.conf: No such file or directory # arch-chroot root_amd64/ /bin/echo foo mount: mount point root_amd64//etc/resolv.conf does not exist ==> ERROR: failed to setup resolv.conf # touch root_amd64/etc/resolv.conf # arch-chroot root_amd64/ /bin/echo foo foo I am happy to help with debugging if needed. Best, S |
This task depends upon
Closed by Dave Reisner (falconindy)
Saturday, 04 July 2015, 21:17 GMT
Reason for closing: Won't fix
Additional comments about closing: arch-chroot won't finish building your chroot for you. If you expect to have a functional resolver inside the chroot, you need a (even blank) /etc/resolv.conf.
Saturday, 04 July 2015, 21:17 GMT
Reason for closing: Won't fix
Additional comments about closing: arch-chroot won't finish building your chroot for you. If you expect to have a functional resolver inside the chroot, you need a (even blank) /etc/resolv.conf.
I noticed the
# ensure file exists to bind mount over
if [[ ! -f $resolv_conf ]]; then
install -Dm644 /dev/null "$resolv_conf" || return 1
fi
in the lines above. Could it be that it needs to be moved out of the if to work?
I really don't want to get into the business of writing to a chroot's /etc. I can get away with the logic you cite because it's highly likely that the symlink replacing /etc/resolv.conf points to /run (for systemd-networkd) -- this is tmpfs, not durable storage.