Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NO NET -- eth0 or enp4s0?
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
psycophobia
Guru
Guru


Joined: 08 May 2005
Posts: 510
Location: uk

PostPosted: Fri Oct 23, 2020 4:41 pm    Post subject: NO NET -- eth0 or enp4s0? Reply with quote

So i booted up and everything seems fine apart from

Code:
ERROR: interface eth0 does not exist
net.eth0 failed to start
ERROR: can not start netmount as net.etho failed


I did install dhcpcd and i did compile the kernel with the RTL8111/8168/8411 PCI Exspress Gigabit Ethernet controller as it reports using that.

Allso after looking at ifconfig again on the live cd it was using enp4s0 not eth0

Everything else seems fine i am hoping i just boot the system and solve this as root with no live cd.


Last edited by psycophobia on Fri Oct 23, 2020 5:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Fri Oct 23, 2020 5:07 pm    Post subject: Reply with quote

psycophobia,

Thats udevs 'persistent device naming' for you.

If you boot your gentoo and
Code:
ifconfig -a
shows your interface, change eth0 everywhere to whatever your interface in called and you are good.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
psycophobia
Guru
Guru


Joined: 08 May 2005
Posts: 510
Location: uk

PostPosted: Fri Oct 23, 2020 5:22 pm    Post subject: Reply with quote

NeddySeagoon wrote:
psycophobia,

Thats udevs 'persistent device naming' for you.

If you boot your gentoo and
Code:
ifconfig -a
shows your interface, change eth0 everywhere to whatever your interface in called and you are good.


Will give that a go thanks Neddy
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Oct 23, 2020 7:13 pm    Post subject: Reply with quote

... or boot the Linux kernel with 'net.ifnames=0' to get back the old naming scheme (eth0, eth1, ...)
Back to top
View user's profile Send private message
iandoug
l33t
l33t


Joined: 11 Feb 2005
Posts: 811
Location: Cape Town, South Africa

PostPosted: Thu Jul 29, 2021 5:52 pm    Post subject: Net connection alternates between net.enp4s0 and net.eth0 Reply with quote

I don't know if this is the same problem or not...

Setting up new box (still).

Network was set to work on net.enp4s0

However, on every second boot, it decides the net is actually on eth0.

So I either have to manually add a connection on eth0, or just reboot and then it's back on net.enp4s0 again.

Why is that?

The MoBo has Intel's new 2.5TB chip, if that makes a difference... only one LAN port.

Thanks, Ian
_________________
Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram
Back to top
View user's profile Send private message
iandoug
l33t
l33t


Joined: 11 Feb 2005
Posts: 811
Location: Cape Town, South Africa

PostPosted: Thu Jul 29, 2021 9:08 pm    Post subject: Reply with quote

Yuck. Now seems to want eth0 every time, But right after I changed it to eth0 last time, it wanted enp4s0 on the next boot ...

What causes this? Something in the BIOS?

Thanks, Ian
_________________
Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Jul 30, 2021 12:24 am    Post subject: Reply with quote

iandoug: I can't answer your question. But... if you want predictable interface names: just add 'net.ifnames=0' to your kernel command-line parameters. That will make sure that the interface name is always "eth0".
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2894
Location: Edge of marsh USA

PostPosted: Fri Jul 30, 2021 2:53 am    Post subject: Reply with quote

Or, set it permanently via udev:
Code:
cd /etc/udev/rules.d
ln -s /dev/null 80-net-name-slot.rules
ln -s /dev/null 80-net-setup-link.rules

If either or both files already exists, delete it/them first, or move them elsewhere for safe-keeping.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/17.1/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Fri Jul 30, 2021 7:20 am    Post subject: Reply with quote

iandoug,

If the names keep switching, it sounds like udev crashes around the time that it should be doing interface renaming.
When eth0 is created by the kernel, udev, if its working, renames it to enp4s0.

Using the old name will make networking reliable but udev still won't be running, if that's the problem.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
iandoug
l33t
l33t


Joined: 11 Feb 2005
Posts: 811
Location: Cape Town, South Africa

PostPosted: Fri Jul 30, 2021 9:28 am    Post subject: Reply with quote

Hi guys

Thanks for the inputs, it seems stable on eth0 for now. Did not add any new configs, but looks like it may have been confusion caused by having both net.* set in rc-update.
I thought I had deleted one of them.

Cheers, Ian
_________________
Asus X570-PRO, Ryzen 7 5800X, GeForce GTX 1650, 32 GB RAM | Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram
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