[SOLVED] Debian network cannot find eth after rebooting with new kernel
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Debian network cannot find eth after rebooting with new kernel
hi friends, I'm a newbee on kernel so I was trying to compile a new kernel.
I was doing that on a bandwagonhost vps and the compiling went well. then I just update-grub and the new kernel was shown on grub after rebooting. There was no panic and I accessed with the new kernel.
The tricky thing was that, after going into with the new kernel, I noticed the VM cannot be accessed via ssh. I checked the sshd service was good and the ssh port was open.
During that time, I checked ifconfig -a and found the eth. I thought it was the new kernel thing, so I switched back to the old kernel. Then everything went wrong... I cannot find eth via ifconfig -a and the network was not working......
I googled it, but still not working... So I'm here asking for advice&guidance, pls help.
Distribution: Ubuntu based stuff for the most part
Posts: 1,172
Rep:
Do you know what type of VM your host is using? That might narrow down the module it uses for the network so you could try manually loading it with the modprobe command.
Do you know what type of VM your host is using? That might narrow down the module it uses for the network so you could try manually loading it with the modprobe command.
hi uteck, thank you! I tried to manually modprobe the eth but with the following errs, does this mean I'm missing the eth config when compiling the kernel?
Code:
[root /]# dmesg | grep -I eth
[ 2.576285] virtio_net virtio5 ens18: renamed from eth0
[ 2.592784] virtio_net virtio6 ens19: renamed from eth1
[root /]# dmesg | grep -i eth
[ 2.576285] virtio_net virtio5 ens18: renamed from eth0
[ 2.592784] virtio_net virtio6 ens19: renamed from eth1
[root /]# lspci | grep -i net
00:12.0 Ethernet controller: Red Hat, Inc. Virtio network device
00:13.0 Ethernet controller: Red Hat, Inc. Virtio network device
[root /]# modprobe eth0
==========================[STDERR]==========================
modprobe: FATAL: Module eth0 not found in directory /lib/modules/5.10.0-8-amd64
===========================[END]============================
Exit code: 1
[root /]# modprobe eth1
==========================[STDERR]==========================
modprobe: FATAL: Module eth1 not found in directory /lib/modules/5.10.0-8-amd64
===========================[END]============================
actually 5.10.0-8-amd64 was my old kernel, I updated it to 6.1.0. but cannot modprobe eth0 on both of them, all with Module eth0 not found in /lib/modules
Code:
[root /]# modprobe eth0
==========================[STDERR]==========================
modprobe: FATAL: Module eth0 not found in directory /lib/modules/5.10.0-8-amd64
===========================[END]============================
Exit code: 1
[root /]# cd /lib/modules
[root /lib/modules]# ls
5.10.0-8-amd64
6.1.0-rc3+
[root /etc]# ifup eth0
==========================[STDERR]==========================
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Cannot find device "eth0"
Failed to get interface index: No such device
If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging.
exiting.
ifup: failed to bring up eth0
===========================[END]============================
Exit code: 1
Distribution: Ubuntu based stuff for the most part
Posts: 1,172
Rep:
From your dmesg output, your system renamed eth0 to ens18 and eth1 to ens19. So the system is loading the modules for networking.
If you boot into the old kernel does the eth interfaces get renamed? Or yo can check in the ssh config and see if it is looking for a differently named network interface.
From your dmesg output, your system renamed eth0 to ens18 and eth1 to ens19. So the system is loading the modules for networking.
If you boot into the old kernel does the eth interfaces get renamed? Or yo can check in the ssh config and see if it is looking for a differently named network interface.
thanks uteck!!! appreciate for your help. I misunderstood it, thought ens renamed to eth....
changed eth in /etc/network/interfaces to ens, then restarted the network.service and it's all good now. thanks again.
may I ask why it was renamed to ens? the old kernel also renames it, did I do anything wrong on grub config. should not relate to the kernel compiling config right?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.