My Qubes broke again. Can't see network

total 20
drwxr-xr-x 2 root root 4096 Apr 19 14:26 .
drwxr-xr-x 7 root root 4096 Apr 19 14:26 ..
-rwxr-xr-x 1 root root  485 Apr 19 14:26 qubes-firewall-user-script
-rwxr-xr-x 1 root root  336 Apr 19 14:26 rc.local
-rw-r--r-- 1 root root  200 Apr 19 14:26 suspend-module-blacklist

I don’t know why your sys-net is missing this directory. Did you remove/change anything in it?
Check the Network Manager log:
sudo journalctl -u NetworkManager
You should see this line:
NetworkManager[10563]: <info> [1652880172.7579] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 30-qubes.conf, 31-randomize-mac.conf, no-mac-addr-change.conf)
So network manager read 30-qubes.conf at start.
30-qubes.conf content is this:

# For /rw
# For /var/run/qubes-service
# For configuration of qubes-provided interfaces


So with this config Network Manager should run /usr/lib/qubes/network-manager-prepare-conf-dir script at start. Its content is:


# Source Qubes library.
# shellcheck source=init/functions
. /usr/lib/qubes/init/functions

if [ -d $NM_CONFIG_DIR ] && [ ! -h $NM_CONFIG_DIR ]; then
    mkdir -p /rw/config/NM-system-connections
    mv $NM_CONFIG_DIR/* /rw/config/NM-system-connections/ 2> /dev/null || true
    rmdir $NM_CONFIG_DIR
    ln -s /rw/config/NM-system-connections $NM_CONFIG_DIR

# Do not manage xen-provided network devices
#for mac in `xenstore-ls device/vif | grep mac | cut -d= -f2 | tr -d '" '`; do
#    unmanaged_devices="$unmanaged_devices;mac:$mac"
sed -r -i -e "s/^#?unmanaged-devices=.*/unmanaged-devices=$unmanaged_devices/" /etc/NetworkManager/NetworkManager.conf
sed -r -i -e "s/^#?plugins=.*/plugins=keyfile/" /etc/NetworkManager/NetworkManager.conf

exit 0

So at sys-net start you have /etc/NetworkManager/system-connections as directory but this script removes this directory and creates directory /rw/config/NM-system-connections and creates link to this directory /etc/NetworkManager/system-connections.
And in your sys-net somehow you have link /etc/NetworkManager/system-connections created but the /rw/config/NM-system-connections is not created or removed later.
I can only assume that you or some of your soft in sys-net removed this directory.
When you restart your sys-net the /rw/config/NM-system-connections/ directory is missing?

1 Like