FS#43540 - [arch-install-scripts] arch-chroot: mount error, no hostname resolution in chroot
Attached to Project:
Arch Linux
Opened by Alain Kalker (ackalker) - Thursday, 22 January 2015, 13:14 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 15 February 2015, 20:14 GMT
Opened by Alain Kalker (ackalker) - Thursday, 22 January 2015, 13:14 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 15 February 2015, 20:14 GMT
|
Details
Description:
Trying to chroot to an Arch Linux filesystem, I get the following error, and hostname resolution doesn't work: # arch-chroot mnt mount: mount point mnt/etc/resolv.conf is a symbolic link to nowhere # ls -l /etc/resolv.conf lrwxrwxrwx 1 root root 34 Jan 22 2015 /etc/resolv.conf -> ../run/systemd/resolve/resolv.conf # ping www.archlinux.org ping: unknown host www.archlinux.org The system I'm chrooting to has systemd-resolved.service enabled and working fine, hostname resolution works fine when I boot it. I think this case needs some special handling in arch-chroot: - if <chroot>/etc/resolv.conf is a symlink pointing at ../run/systemd/resolve/resolv.conf or /run/systemd/resolve/resolv.conf, create a dummy file at <chroot>/run/systemd/resolve/resolv.conf and bind-mount host /etc/resolv.conf onto that. - if <chroot>/etc/resolv.conf is a regular file, bind-mount host /etc/resolv.conf as usual. Additional info: * package version(s) arch-install-scripts 14-1 * config and/or log files etc. Steps to reproduce: |
This task depends upon
Closed by Dave Reisner (falconindy)
Sunday, 15 February 2015, 20:14 GMT
Reason for closing: Fixed
Additional comments about closing: arch-install-scripts v15
Sunday, 15 February 2015, 20:14 GMT
Reason for closing: Fixed
Additional comments about closing: arch-install-scripts v15
https://projects.archlinux.org/arch-install-scripts.git/commit/?id=c37db2362a722
Yes, this change makes it do what I want for the case where mnt/etc/resolv.conf is a symlink. It would be nice if it could also deal with the case where mnt/etc/resolv.conf doesn't exist at all, i.e. building an entirely "/etc'less" system with the help of systemd.
I know that that isn't the way in which Arch Linux currently works, but hey, why not look toward the future? :-)
Your solution is fine with me, congrats! :-)