Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Help: Determine Network Interface Name
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Sat Apr 25, 2015 3:01 pm    Post subject: [SOLVED] Help: Determine Network Interface Name Reply with quote

I am installing a new AMD 64 build using the amd64 handbook. The manual states that it is assumed the user knows the network identification of the interface. The old name of eth0 does not work on my build.

How do I determine the network interface name assigned to my network card?


Last edited by jlpoole on Sun May 03, 2015 8:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Apr 25, 2015 3:29 pm    Post subject: Reply with quote

jlpoole,

You can ask the system.
Code:
ifconfig -a
will tell about all interfaces that exist. This should work in your install or in the liveCD as names are PCI bus/slot dependent.
You can look through dmesg for udev renaming your interface.
You can even tell udev to keep its hands off your network interfaces, so eth0 will work.

This new naming convention is a PITA with USB/Ethernet devices as the names depend on where the device is plugged in.
_________________
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
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sun Apr 26, 2015 12:30 pm    Post subject: Reply with quote

Run "touch /etc/udev/rules.d/80-net-name-slot.rules" and reboot and you'll get eth0
back. That will give you breathing space to download stuff and build the system before
you have to sort out the new naming rules.

Will
Back to top
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2805
Location: Oceanside, Ca

PostPosted: Mon Apr 27, 2015 4:43 pm    Post subject: Reply with quote

thanks cwr .
_________________
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Thu Apr 30, 2015 3:56 am    Post subject: Reply with quote

The problem I was faced with was that I did not have lspci installed in the "built" system. What I ended up doing was using the install CD and noting the name of the interface given during the startup.

I think the install manual ought to have the reader capture what the install disk has so that later on during the session, e.g. reboot into the installed system, the reader is not left to wondering what the name assigned is. OR, the install manual ought to have at the outset the installation of the toolkit that contains lspci so lspci may be used to learn of the assigned name.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Fri May 01, 2015 1:53 pm    Post subject: Reply with quote

ifconfig is part of the current Stage 3, at least, and "ifconfig -a" should give you a full list of
possible interfaces, assuming that you've got the the appropriate driver.

But lspci isn't part of the Stage 3; I suppose the thinking is that you build using SystemRescue CD
or an equivalent, such as Ubuntu, that already has the drivers installed.

Will
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Fri May 01, 2015 1:55 pm    Post subject: Reply with quote

cwr wrote:
ifconfig is part of the current Stage 3, at least, and "ifconfig -a" should give you a full list of
possible interfaces, assuming that you've got the the appropriate driver.

But lspci isn't part of the Stage 3; I suppose the thinking is that you build using SystemRescue CD
or an equivalent, such as Ubuntu, that already has the drivers installed.

Will


I had tried "ifconfig -a" and only "lo" showed up.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Fri May 01, 2015 2:17 pm    Post subject: Re: Help: Determine Network Interface Name Reply with quote

You can also look in /sys/class/net
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Fri May 01, 2015 2:54 pm    Post subject: Re: Help: Determine Network Interface Name Reply with quote

krinn wrote:
You can also look in /sys/class/net


That's the $64k answer. I had looked around in /dev and could not find anything; I didn't think to look under /sys -- which still remains a mystery tree to me. Thank you. Looking under /sys/class/net would be an excellent addition to the network documentation in the handbook.
Back to top
View user's profile Send private message
shazeal
Apprentice
Apprentice


Joined: 03 May 2006
Posts: 197
Location: New Zealand

PostPosted: Fri May 01, 2015 5:59 pm    Post subject: Reply with quote

Just for reference you can also use the command
Code:

ip addr


And it will list all interfaces, initialized or not.
_________________
CFLAGS="-OmgWTFR1CE --fun-lol-loops --march=asmx86go"
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Fri May 01, 2015 9:22 pm    Post subject: Reply with quote

jlpoole wrote:
cwr wrote:
ifconfig is part of the current Stage 3, at least, and "ifconfig -a" should give you a full list of
possible interfaces, assuming that you've got the the appropriate driver.

But lspci isn't part of the Stage 3; I suppose the thinking is that you build using SystemRescue CD
or an equivalent, such as Ubuntu, that already has the drivers installed.

Will


I had tried "ifconfig -a" and only "lo" showed up.

so maybe you miss some modules?
lspci -knn should give some answers to "what devices you have there" and "what driver is in use". I guess no driver will be listed at all.
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Fri May 01, 2015 9:47 pm    Post subject: Reply with quote

szatox wrote:
jlpoole wrote:
cwr wrote:
ifconfig is part of the current Stage 3, at least, and "ifconfig -a" should give you a full list of
possible interfaces, assuming that you've got the the appropriate driver.

But lspci isn't part of the Stage 3; I suppose the thinking is that you build using SystemRescue CD
or an equivalent, such as Ubuntu, that already has the drivers installed.

Will


I had tried "ifconfig -a" and only "lo" showed up.

so maybe you miss some modules?
lspci -knn should give some answers to "what devices you have there" and "what driver is in use". I guess no driver will be listed at all.


Unfortrunately, I'm no longer in that stage of a build that I can recreate as I have determined what the name assigned to the interface was and have added tools.

What did happen was that I was going through a standard build and found myself in a temporary environment without the ability to identify the name assigned my interface. It's one of those things that unless you're in the exact same stage, e.g. an almost completed environment, a person documenting what to do may not know what toolw are missing or not working to provide a method to secure a critical answer. I may end up rebuilding this, again, given that my hard drive is older than 3 years and I'd rather be proactive and build on a new disk at my convenience rather than waiting for the disk to fail. (I may also skip building , and simple "dd" if I can easily do that with a laptop disk.)
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Sat May 02, 2015 6:16 pm    Post subject: Reply with quote

You're making excuses now.Kernel modules are missing -> build another kernel. Doesn't matter at what stage you are, as long as you started with stage3 it should ALWAYS be usable unless you have done something bad enough to completly brick it. Installing wrong kernel is not fatal, you can still recover installing better one.

If you don't have lspci, it's in package sys-apps/pciutils
Busybox also provides a minimal version:
busybox lspci -k
and finaly, those tools won't build you missing modules, they are just to confirm that this is what causes the problem. You can carry on without that test. Oh, and remember you can always boot from liveCD and chroot into your current install to pick up from where you left.
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Sat May 02, 2015 6:53 pm    Post subject: Reply with quote

szatox wrote:
You're making excuses...


No, I'm trying to point out that the Handbook for installatin does not account for someone being in an environment and unable to discern the renaming of the traditional eth0 device. Documentation is often dismissed or given cursory consideration. Good documentation will anticipate the position the writer is in and try to cover all contingencies. Having built many Gentoo installations on a variety of platforms for about ten years gives me a familiarity with the Handbook and its ability to allow a reader to achieve the goal. I found what I was referencing for the X64 coupled with the new renaming paradigm a point where someone tryiing to rely completely on the Handbook to get started would be stuck. There have been a variety of good answers, and if you read my previous postings in this thread you will see what I did to achieve what I needed to know: the name assigned to my ethernet device.

I've been an advocate of Gentoo because its strength has been in the Handbook and introducing someone unfamiliar with LInux how to build their own system. My goal is to help assure the excellence the Handbook has provided, and since it is not readily available for group editing, I post in the forum so that those who do have authorship control will be aware of a point they may not have considered.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2613

PostPosted: Sun May 03, 2015 4:32 am    Post subject: Reply with quote

jlpoole wrote:
My goal is to help assure the excellence the Handbook has provided, and since it is not readily available for group editing, I post in the forum so that those who do have authorship control will be aware of a point they may not have considered.
Why don't you file a bug for product "Documentation" component "Installation Handbook"?
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 344
Location: Salem, OR

PostPosted: Sun May 03, 2015 1:38 pm    Post subject: Reply with quote

charles17 wrote:
Why don't you file a bug for product "Documentation" component "Installation Handbook"?


done. https://bugs.gentoo.org/show_bug.cgi?id=548490

Thank you for the suggestion.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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