Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How can I keep eth0 without systemd?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Nreal
Apprentice
Apprentice


Joined: 06 Jan 2009
Posts: 268

PostPosted: Thu Dec 21, 2023 9:07 pm    Post subject: [Solved] How can I keep eth0 without systemd? Reply with quote

This doesn´t work without systemd I gues?

How should I rename my eno1 network card back to eth0 as it gives lots of trouble?

I dont even know how to restart my eno1 :)

Code:
Optional: Disable or override predictable network interface naming
Network device names such as eth0 or wlan0 as provided by the kernel are normally changed on system boot (see dmesg) by the /lib/udev/rules.d/80-net-setup-link.rules udev rule and the NamePolicy in /lib/systemd/network/99-default.link.

This behavior may be disabled in several ways:

Symlink /etc/systemd/network/99-default.link to /dev/null: ln -s /dev/null /etc/systemd/network/99-default.link.
Create a lower-numbered .link file in /etc/systemd/network which assigns a different name to the interface.
Pass net.ifnames=0 on the kernel command line.
Reference: https://systemd.io/PREDICTABLE_INTERFACE_NAMES/


# ifconfig
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.249 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fd85:3a99:5fac:0:48d8:83d:72b5:1629 prefixlen 64 scopeid 0x0..
Code:

* Stopping apache2 ...
AH00557: apache2: apr_sockaddr_info_get() failed for jimms
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message                                                                [ ok ]
 * Bringing up interface eth0
 *   ERROR: interface eth0 does not exist
 *   Ensure that you have loaded the correct kernel module for your hardware
 * ERROR: net.eth0 failed to start
 * Bringing up interface eth0
 *   ERROR: interface eth0 does not exist
 *   Ensure that you have loaded the correct kernel module for your hardware
 * ERROR: net.eth0 failed to start
 * ERROR: cannot start netmount as net.eth0 would not start



Last edited by Nreal on Sat Dec 23, 2023 1:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4314
Location: Bavaria

PostPosted: Thu Dec 21, 2023 9:13 pm    Post subject: Reply with quote

The easiest way is to give your kernel this command line parameter: net.ifnames=0
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Nreal
Apprentice
Apprentice


Joined: 06 Jan 2009
Posts: 268

PostPosted: Thu Dec 21, 2023 9:18 pm    Post subject: Reply with quote

How can I give kernel these parameters?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4314
Location: Bavaria

PostPosted: Thu Dec 21, 2023 9:43 pm    Post subject: Reply with quote

Nreal wrote:
How can I give kernel these parameters?

It depends how you boot your kernel. Please see:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Kernel_Commandline_Parameter
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3925
Location: Hamburg

PostPosted: Thu Dec 21, 2023 9:53 pm    Post subject: Reply with quote

With grub look into /etc/default/grub
Code:
#
# Examples:
#
# Boot with network interface renaming disabled
# GRUB_CMDLINE_LINUX="net.ifnames=0"
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 377

PostPosted: Fri Dec 22, 2023 5:30 pm    Post subject: Re: How can I keep eth0 without systemd? Reply with quote

Nreal wrote:
How should I rename my eno1 network card back to eth0 as it gives lots of trouble?


Hard to believe that the name "eth0" causes less trouble than "eno1". Instead of workarounding I would simply fix the underlying problem.
Back to top
View user's profile Send private message
Nreal
Apprentice
Apprentice


Joined: 06 Jan 2009
Posts: 268

PostPosted: Sat Dec 23, 2023 1:18 pm    Post subject: Reply with quote

Thank you very much, problem solved :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum