You are not logged in.

#1 2015-11-01 18:53:57

Ian Kelling
Member
Registered: 2014-07-18
Posts: 17

How to predict network device name change after install?

In the installer, my network interface is called eth0, after install becomes something like enp6s0 or enp0s25. Install instructions have me enable the interface by name, but I don't know the name it's going to be, so I have to boot without networking, get the name, then enable it. Importantly, this makes me unable to install purely over ssh.

Background: This explains whats going on with the new names,
http://www.freedesktop.org/wiki/Softwar … faceNames/
and links to the C code used to implement it,
http://cgit.freedesktop.org/systemd/sys … t_id.c#n20

I'd like to actually run that code from the install shell and get the result. Any idea how?

Last edited by Ian Kelling (2015-11-01 19:22:52)

Offline

#2 2015-11-01 19:06:13

dockland
Member
From: Sweden
Registered: 2015-06-06
Posts: 861

Re: How to predict network device name change after install?

Ian Kelling wrote:

In the installer, eth0, after install becomes something like enp6s0 or enp0s25. Install instructions have me enable the interface by name on boot, but I don't know the name, so I have to boot without networking, get the name, then enable it. Importantly, this makes me unable to install purely over ssh.

Background: This explains whats going on with the new names,
http://www.freedesktop.org/wiki/Softwar … faceNames/
and links to the C code used to implement it,
http://cgit.freedesktop.org/systemd/sys … t_id.c#n20

I'd like to actually run that code from the install shell and get the result. Any idea how?

Can't you use systemctl enable dhcpcd@what_ever_interface_name_you_have.service?


I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.
I use it to look at funny pictures of cats and to argue with strangers.

Offline

#3 2015-11-01 19:14:17

frostschutz
Member
Registered: 2013-11-15
Posts: 1,499

Re: How to predict network device name change after install?

I predict it will be eth0 and I'm always right. I don't want the enp0s25 so I disable it.

Last edited by frostschutz (2015-11-01 19:14:39)

Offline

#4 2015-11-01 19:21:50

Ian Kelling
Member
Registered: 2014-07-18
Posts: 17

Re: How to predict network device name change after install?

dockland wrote:

Can't you use systemctl enable dhcpcd@what_ever_interface_name_you_have.service?

No, as the original post says. In the installer shell 'what_ever_interface_name_you_have' is eth0, after installing its something else, and I don't know what the something else is unless I boot with no networking, but I want to do this over the network.

Last edited by Ian Kelling (2015-11-01 19:25:25)

Offline

#5 2015-11-01 19:30:30

Ian Kelling
Member
Registered: 2014-07-18
Posts: 17

Re: How to predict network device name change after install?

Thinking about it a bit more, I could make a script to run on 1st boot which searches for the new interface name, and enables it, starts it, the deletes itself. It just seems like there is probably a more straight forward way.

Last edited by Ian Kelling (2015-11-01 19:33:22)

Offline

#6 2015-11-01 20:02:33

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: How to predict network device name change after install?

Which installation media are you using?  I think in the past it did not rename the interfaces, so whatever it was during the install was the same in the installed system.

Offline

#7 2015-11-01 20:09:32

Ian Kelling
Member
Registered: 2014-07-18
Posts: 17

Re: How to predict network device name change after install?

circleface wrote:

Which installation media are you using?  I think in the past it did not rename the interfaces, so whatever it was during the install was the same in the installed system.

archlinux-2015.10.01-dual.iso. Yes, It must have changed at some point in the past. A new iso got released today, I will verify it's still the case.

Last edited by Ian Kelling (2015-11-01 20:13:08)

Offline

#8 2015-11-01 22:20:59

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: How to predict network device name change after install?

Good to know.  I haven't done any installation in a while, so I'm sure things have changed a bit.

Offline

#9 2015-11-01 23:07:53

Ian Kelling
Member
Registered: 2014-07-18
Posts: 17

Re: How to predict network device name change after install?

I tested with the latest iso, and I've found the root issue. It is specific to pxe booting. Here is the relevant line in the syslog:

systemd-udevd[374]: Error changing net interface name 'eth0' to 'enp6s0' : Device or resource busy

I will file a bug.

Offline

#10 2015-11-01 23:15:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,333
Website

Re: How to predict network device name change after install?

You don't need an interface name:

systemctl enable dhcpcd

After the first reboot, if you want to disable that and enable for a specific interface you could.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2015-11-01 23:18:28

Ian Kelling
Member
Registered: 2014-07-18
Posts: 17

Re: How to predict network device name change after install?

Trilby wrote:

You don't need an interface name:

systemctl enable dhcpcd

After the first reboot, if you want to disable that and enable for a specific interface you could.

Ahh, good tip. Thanks.

Offline

#12 2015-11-07 21:50:11

kvonlinee
Member
Registered: 2015-02-04
Posts: 27

Re: How to predict network device name change after install?

Get the name by
Ip addr

Offline

#13 2015-11-08 00:22:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,333
Website

Re: How to predict network device name change after install?

kvonlinee, that would do no good with this problem.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#14 2015-11-08 06:07:26

kvonlinee
Member
Registered: 2015-02-04
Posts: 27

Re: How to predict network device name change after install?

when you boot to new Arch install, you run "ip addr" to get the name of network card, that is nothing you look for to enable it by name?

Offline

#15 2015-11-08 06:37:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,349

Re: How to predict network device name change after install?

kvonlinee,  As my colleague tried tactfully to point out -- yes, your bit of advice is obvious to everyone participating in this thread,  It may not be clear, but this thread is a couple notches above level of finding the names of the existing networks.
The kind of experience one gains by installing Arch Linux by hand a couple times.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#16 2015-11-08 10:22:16

Ian Kelling
Member
Registered: 2014-07-18
Posts: 17

Re: How to predict network device name change after install?

Trilby wrote:

kvonlinee, that would do no good with this problem.

Oh. I realized from his post that I didn't look close enough at the wiki and saw that I could do en*  in systemd's network thing, which is another decent workaround. I assumed his suggestion would do something similar. I also found an existing open bug for this and I documented it in the pxe wiki page.

Offline

Board footer

Powered by FluxBB