# Lost internet access after kernel update

## eklebanow

I have 2 laptops running gentoo that use openrc...they both boot to dwm

I just updated both from kernel 5.4.97 tio 5.10.49 which went fine without issues.  both laptops start fine

Now I only have internet access on one laptop.  If I ping google I get 

```
temporary failure in name resolution
```

On the laptop that is not working if I boot to kernel 5.4.97 I have internet access. 

I tried restarting NetworkManager with 

```
sudo /etc/init.d/NetworkManager restart 
```

 which gives me Warning that NetworkManager has started but is inactive

I searched the gentoo forumss and found https://forums.gentoo.org/viewtopic-t-912400-start-0.html

As per the forum I tried activating in /etc/rc.conf which did not work 

```
rc_hotplug="!inet.*'
```

Any help would be appreciated...

----------

## wwdev16

The link you referenced has !net.* not !inet.*.

----------

## eklebanow

Sorry....typo on my part when I drafted forum post

I changed /etc/rc.conf correctly to "!net.*" as per the forum post and it did not resolve my problem (i.e after a restart still no internet access)

----------

## Hu

temporary failure in name resolution can indicate that your DNS is not configured properly.  Please compare /etc/resolv.conf among: the always-working machine, the 5.4.97 kernel on the bad machine, and the 5.10.49 kernel on the bad machine.  Check file permissions, ownership, and content.  If you can confirm that the broken configuration is due to an incorrect /etc/resolv.conf, then we can move to trying to understand why it is only bad in one case.

----------

## eklebanow

OK....I compared /etc/resolv.conf and this is what I found

On the laptop that is working with the new kernel 5.10.49 two nameservers are listed.  The same exact nameservers are found on the laptop that is not working if I boot that laptop with 5.4.97.

When I boot the laptop not working with 5.10.49 /etc/resolv.conf file is empty

I tried copying and pasting the two nameservers into /etc/resolv.conf and rebooted with 5.10.49. There was no internet access, pinging google revealed DNS could not be resolved. Again I looked at /etc/resolv.conf and it was empty again......

What should I do next....???

----------

## Tony0945

 *eklebanow wrote:*   

> I tried copying and pasting the two nameservers into /etc/resolv.conf and rebooted with 5.10.49. There was no internet access, pinging google revealed DNS could not be resolved. Again I looked at /etc/resolv.conf and it was empty again......
> 
> What should I do next....???

 

```
 $ cat /etc/resolv.conf

# Generated by net-scripts for interface eth0

nameserver 192.168.0.102

nameserver 127.0.0.1

nameserver 198.192.0.1

```

 So don't edit the file by hand.  

I use OpenRC and netifrc. I get my nameservers from dnsmasq via dhcp.  

If your configuration is different, i.e. systemd or network-manager or some dhcp server other dnsmasq, then I can't help.

But i do know that you shouldn't edit /etc/resolv.conf with overwrite it. A quick google will tell you that ubuntu and redhat and debian advise you not to because it will be overwritten.

EDIT:

i see now that you are using network manager. try that configuration file. I don't know if the syntax is the same.

It's possible that your router is providing nameservers. Fire up it's web page and look around. look for a section that says DHCP or "network settings" or something similar.

If you are using netifrc a line like this in /etc/conf.d/net works also:

```
dns_servers="192.168.0.102 127.0.0.1 198.192.0.1"
```

----------

## eklebanow

I am real frustrated.....Am not getting anywhere

I have no internet access on the gentoo laptop.  Initially I could get access if I went back to an earlier kernel on startup.  Now I must have done something as no matter what kernel I have no internet access.  Ping google and I get temporary failure in name resolution.

I use my phone as hotspot for my laptops....phone only shows connection to one device

Whenm I boot I see errot that network manager has started but is inactive

/etc/resolv.conf is emptty

Please HELP!

----------

## pietinger

 *eklebanow wrote:*   

> Please HELP!

 

Ok, I will try.

 *eklebanow wrote:*   

> /etc/resolv.conf is emptty

 

This is a real problem and explains why your ping to google - via its name - doesnt work. For now we dont know what is the reason.

But first you should examine if your whole communication doesnt work, or "only" DNS. For this you should ping two addresses with their IP-addresses. I think 192.168.0.1 is your router. Ping it. If it works, ping google (8.8.8.8 ):

```
$ ping 192.168.0.1 -c 3

PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.

64 Bytes von 192.168.0.1: icmp_seq=1 ttl=64 Zeit=0.659 ms

64 Bytes von 192.168.0.1: icmp_seq=2 ttl=64 Zeit=0.690 ms

64 Bytes von 192.168.0.1: icmp_seq=3 ttl=64 Zeit=0.587 ms

--- 192.168.2.1 ping statistics ---

3 Pakete übertragen, 3 empfangen, 0% Paketverlust, Zeit 2025ms

rtt min/avg/max/mdev = 0.587/0.645/0.690/0.043 ms

 ~ $ 

 ~ $ ping 8.8.8.8 -c 3

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.

64 Bytes von 8.8.8.8: icmp_seq=1 ttl=119 Zeit=7.28 ms

64 Bytes von 8.8.8.8: icmp_seq=2 ttl=119 Zeit=6.93 ms

64 Bytes von 8.8.8.8: icmp_seq=3 ttl=119 Zeit=7.06 ms

--- 8.8.8.8 ping statistics ---

3 Pakete übertragen, 3 empfangen, 0% Paketverlust, Zeit 2003ms

rtt min/avg/max/mdev = 6.925/7.089/7.284/0.148 ms
```

1. If this works, you have "only" a problem with your DNS-resolver. We need to know which network-services / -manager you start. Give us for the beginning the output of "rc-update"

2. If it doesnt work you have a problem with your ethernet. This is a bigger problem. We need "lscpi -vn", "ip -d address", maybe "dmesg" (after a fresh boot) ...

... and in any case the output from "emerge --info" (plus explanation of your system: systemd or OpenRC, ...)

----------

