Patch to handle /etc/resolv.conf is a symlink #334

Closed
opened 2022-01-18 13:45:36 +00:00 by Thenujan-0 · 1 comment
Thenujan-0 commented 2022-01-18 13:45:36 +00:00 (Migrated from gitlab2.manjaro.org)

In order to avoid the following error message i created a symlink of /run/NetworkManager/resolv.conf in /etc/resolv.conf

https://www.reddit.com/r/Windscribe/comments/cn2qfb/etcresolvconf_is_not_a_symlink_this_may_break_dns/

But when using the manjaro-chroot script it fails to get my internet connection to chroot and shows mount point is a symbolic link to nowhere so i modified the script to check if /etc/resolv.conf is a symbolic link and if it is a symbolic link then use /run/NetworkManager/resolv.conf instead .

And now the script also shows the internet is not connected so internet access will not be available in chroot .

sudo manjaro-chroot -a                                             ✔ 
[sudo] password for thenujan: 
==> Mounting (Ubuntu) [/dev/sda2]
 --> mount: [/mnt]
your /etc/resolv.conf is a symlink so using /run/NetworkManager/resolv.conf instead
root@manjaro-minion:/# 
sudo manjaro-chroot -a                                 127 ✘  51s  
==> Mounting (Ubuntu) [/dev/sda2]
 --> mount: [/mnt]
Internet is not connected you will not have internet connectivity inside chroot
root@manjaro-minion:/# 

code that i added to util-mount.sh checks if connected to the internet by pinging google and if the internet is not connected then it doesn't mount /etc/resolv.conf or the /run/NetworkManager/resolv.conf .

if it is connected then it checks if the /etc/resolv.conf is a symlink,if it isnt a symlink then it mounts that file if it is a symlink,it uses /run/NetworkManager/resolv.conf instead

code that I added to manjaro-chroot does the same described above but when using manjaro-chroot manually
da260aa088.patch

In order to avoid the following error message i created a symlink of /run/NetworkManager/resolv.conf in /etc/resolv.conf https://www.reddit.com/r/Windscribe/comments/cn2qfb/etcresolvconf_is_not_a_symlink_this_may_break_dns/ But when using the manjaro-chroot script it fails to get my internet connection to chroot and shows mount point is a symbolic link to nowhere so i modified the script to check if /etc/resolv.conf is a symbolic link and if it is a symbolic link then use /run/NetworkManager/resolv.conf instead . And now the script also shows the internet is not connected so internet access will not be available in chroot . ``` sudo manjaro-chroot -a  ✔ [sudo] password for thenujan: ==> Mounting (Ubuntu) [/dev/sda2] --> mount: [/mnt] your /etc/resolv.conf is a symlink so using /run/NetworkManager/resolv.conf instead root@manjaro-minion:/# ``` ``` sudo manjaro-chroot -a  127 ✘  51s  ==> Mounting (Ubuntu) [/dev/sda2] --> mount: [/mnt] Internet is not connected you will not have internet connectivity inside chroot root@manjaro-minion:/# ``` code that i added to util-mount.sh checks if connected to the internet by pinging google and if the internet is not connected then it doesn't mount /etc/resolv.conf or the /run/NetworkManager/resolv.conf . if it is connected then it checks if the /etc/resolv.conf is a symlink,if it isnt a symlink then it mounts that file if it is a symlink,it uses /run/NetworkManager/resolv.conf instead code that I added to manjaro-chroot does the same described above but when using manjaro-chroot manually [da260aa088.patch](/uploads/f66a5b6eb23da733e816b0abf4006baa/da260aa088.patch)
yochananmarqos1 commented 2025-10-05 22:45:22 +00:00 (Migrated from gitlab2.manjaro.org)

Closing stale issue

Closing stale issue
yochananmarqos1 (Migrated from gitlab2.manjaro.org) closed this issue 2025-10-05 22:45:23 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tools/manjaro-tools#334
No description provided.