LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-14-2022, 11:07 PM   #1
tiashi
LQ Newbie
 
Registered: Nov 2022
Location: Moon
Posts: 25

Rep: Reputation: 0
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.
 
Old 11-24-2022, 12:32 PM   #2
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 561

Rep: Reputation: Disabled
Try to have a look at the messages logged when the new kernel was booting up.
as root run this command:
dmesg | more

Last edited by yvesjv; 11-24-2022 at 12:36 PM.
 
Old 11-24-2022, 05:41 PM   #3
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,172

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
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.
 
Old 12-07-2022, 07:50 AM   #4
tiashi
LQ Newbie
 
Registered: Nov 2022
Location: Moon
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yvesjv View Post
Try to have a look at the messages logged when the new kernel was booting up.
as root run this command:
dmesg | more
hi yvesjv sorry for the late reply&thanks for the help. just ran dmesg | more and the logs are as follows.

dmesg_log.log

Code:
[root /]# dmesg | grep eth
[    2.576285] virtio_net virtio5 ens18: renamed from eth0
[    2.592784] virtio_net virtio6 ens19: renamed from eth1
only saw the above log related to eth... don't know what else to do....
 
Old 12-07-2022, 07:54 AM   #5
tiashi
LQ Newbie
 
Registered: Nov 2022
Location: Moon
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by uteck View Post
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]============================
 
Old 12-07-2022, 08:10 AM   #6
tiashi
LQ Newbie
 
Registered: Nov 2022
Location: Moon
Posts: 25

Original Poster
Rep: Reputation: 0
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

Last edited by tiashi; 12-07-2022 at 08:19 AM.
 
Old 12-07-2022, 09:02 AM   #7
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,172

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
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.
 
1 members found this post helpful.
Old 12-07-2022, 10:25 PM   #8
tiashi
LQ Newbie
 
Registered: Nov 2022
Location: Moon
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by uteck View Post
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?

Last edited by tiashi; 12-08-2022 at 12:32 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cannot find eth after switching new compiled kernel tiashi Linux - Networking 2 12-07-2022 10:26 PM
Debian doesn't find wifi/eth drivers but Ubuntu 11.04/10 does? Jivan Naveen Linux - Newbie 6 01-19-2012 01:21 PM
Can Eth device names(or macs) be correlated to the physical eth port? VG1 Linux - Networking 1 12-01-2009 06:13 PM
Kernel Panic message after rebooting system three hours after updating Mepis 6.0. bliss4one MEPIS 13 11-11-2008 07:01 AM
kernel panic error after rebooting new kernel image fiero Linux - General 4 07-13-2005 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration