View previous topic :: View next topic |
Author |
Message |
ARC Curunir n00b
Joined: 02 Jun 2013 Posts: 5
|
Posted: Sun Jun 02, 2013 9:55 pm Post subject: [SOLVED]: Can't get eth0 to work on r8169 |
|
|
Hello everybody!
I am not entirely new to Gentoo, but my last installation was around 2007, I think. I am only an infrequent Linux user and tend to forget basic things, so please point out if I overlooked something obvious.
My problem is about eth0 not working on a new install. The hardware is this:
- Intel Pentium Dualcore E5700 (a renamed Core 2 Duo)
- Gigabyte GA-G41MT-D3 board
- on that board, a Realtek RTL8111/8169 ethernet chip (as covered by the r8169 driver/module)
I have been using a recent minimal CD and followed the (online) handbook. Everything works, except for the network interface. It shows up fine as eth0 in the live environment, but stubbornly refuses to work in the installed system. When I type "ifconfig", only the loopback device shows up. I had a look around the forum, but all solutions in related threads that worked for other people didn't work for me. Here is what I checked:
- r8169 driver included in kernel - it was
- driver converted into a kernel module - same problem
- network added to default runlevel - I did
- tried to run with a different network adapter, an Intel Pro 100 PCI card - same problem
- ran "genkernel all" to compile a kernel similar to the live environment - same problem
It seems that the interface won't come up on boot and neither when I try to start it manually. I think I overlooked some small detail in the installation process, but can't find it. I am positive that I got the chip identified correctly and also that r8169 is the correct module. The adapter works flawlessly in the live environment, so the hardware should be fine.
Any ideas what else I should check?
Last edited by ARC Curunir on Thu Jun 06, 2013 3:14 pm; edited 1 time in total |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Sun Jun 02, 2013 10:05 pm Post subject: |
|
|
Does your kernel detect the NIC? Since you used ifconfig, which does not show down interfaces, your statement about ifconfig is not definitive. If you use ip instead, it will show both up and down interfaces. |
|
Back to top |
|
|
ARC Curunir n00b
Joined: 02 Jun 2013 Posts: 5
|
Posted: Sun Jun 02, 2013 10:27 pm Post subject: |
|
|
I don't know that "ip" command, and neither does my shell. What do I need to emerge to get it?
P.S.: Here is what I get when I try to start the module with modprobe:
Code: | modprobe r8169
modprobe: ERROR: could not insert 'r8169': Exec format error |
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Mon Jun 03, 2013 4:29 am Post subject: |
|
|
ip is part of sys-apps/iproute2. That module error looks very strange. Are you sure the module and kernel were built using the same configuration? |
|
Back to top |
|
|
ARC Curunir n00b
Joined: 02 Jun 2013 Posts: 5
|
Posted: Mon Jun 03, 2013 2:10 pm Post subject: |
|
|
I installed iproute2, but have no idea how to use the ip command. The output of "ip --help" doesn't really help me understand what it does. I should mention that I am using a chroot environment to emerge things, as I have no network inside the real installation.
I am not sure if the module and kernel were built using the same configuration. I rebuilt the kernel several times, trying things out, always repeating the relevant steps from the handbook (or what I thought were the relevant steps). When creating modules, I also followed the steps for modules from the handbook.
The strange thing is that it also fails when using a kernel built by genkernel. So I guess the mistake is somewhere outside the kernel, in my configuration. I am quite sure this is not a bug, but my mistake. The tricky thing is finding the place where I made it. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Mon Jun 03, 2013 6:45 pm Post subject: |
|
|
enter chroot per handbook using: Code: | mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) $PS1" | then Code: | emerge wgetpaste pciutils
wgetpaste /usr/src/linux/.config
lspci -k | wgetpaste
wgetpaste /proc/cpuinfo | post the urls here
I use to see if the kernel can find my nics
to see which nics are up _________________ Defund the FCC. |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Mon Jun 03, 2013 7:35 pm Post subject: |
|
|
Your problem might be caused by udev.
It'll rename your card to something else than eth0.
I've got a board with the same card.
What I did was delete the /lib/udev/rules.d/80-net-name-slot.rules.
The system then goes back to the kernel naming which is eth0.
Don't do this if you also want to use a wifi adapter on this box.
In that case you'll have to find the posts about udev and ethernet in the Gentoo Forums.
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Mon Jun 03, 2013 9:18 pm Post subject: |
|
|
rather than delete lib....
as root
touch /etc/udev/rules.d/80-net-name-slot.rules
then you can delete the file you touched to go back to crazy naming |
|
Back to top |
|
|
ARC Curunir n00b
Joined: 02 Jun 2013 Posts: 5
|
Posted: Tue Jun 04, 2013 6:18 am Post subject: |
|
|
Thanks for the suggestions.
I decided to start over the whole installation process. It is finished now, and guess what... eth0 still won't come up.
But when booting up into the chroot environment again to set a parameter I had forgotten, I noticed something: The live CD boot process comes across an error message about a broken archive file. I had overlooked that earlier, because it rolled past very quickly. Is it possible that there is simply a broken element in my installation? If so, what kind of integrity check could I perform inside my installation? Or do I need to re-fetch the install medium and repeat all over again?
I had a look at /etc/udev/rules.d/ and found it empty, nothing to delete here. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Tue Jun 04, 2013 6:40 am Post subject: |
|
|
enter chroot per handbook using: Code: | mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) $PS1" | then Code: | emerge wgetpaste pciutils
wgetpaste /usr/src/linux/.config
lspci -k | wgetpaste
wgetpaste /proc/cpuinfo | post the urls here
I use to see if the kernel can find my nics
to see which nics are up _________________ Defund the FCC. |
|
Back to top |
|
|
ARC Curunir n00b
Joined: 02 Jun 2013 Posts: 5
|
Posted: Tue Jun 04, 2013 7:27 am Post subject: |
|
|
Output of wgetpaste /usr/src/linux/.config:
http://bpaste.net/show/104213
Output of lspci -k | wgetpaste:
http://bpaste.net/show/104214/
I just booted the installation again and well... eth0 came up. I didn't change anything between the last boot and this one, just looked into /etc/udev/rules.d/, which was already empty. Very strange, that.
Problem solved, I guess. Although I would prefer if I had any idea what went wrong, and why it works now.
P.S.: I strongly suspect that the tip about udev renaming eth0 was the right one, but I cannot say it with certainty. The bzip error I noticed when booting the live CD pointed to a firmware that could not be unpacked (unexpected end of archive). That might have been the r8169 firmware, as I read elsewhere that this gets updated in some configurations. However, it seems that this bit was not essential after all.
Still, thanks for everybody's help. |
|
Back to top |
|
|
|