Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ethernet problem [solved]
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
Yvanoff
n00b
n00b


Joined: 11 Jan 2016
Posts: 4

PostPosted: Mon Jan 11, 2016 9:29 pm    Post subject: Ethernet problem [solved] Reply with quote

Hello guys,

I have been trying to get gentoo to work properly for a week now and I can't seem to get to it. Following the handbook's instruction, I have no troubles at all to get a bootable installation. Once the installation is finished, I can boot with gentoo (using grub) just fine.

What is annoying is that Ethernet doesn't work. I have used various linux distros (Ubuntu, Manjaro and ArchLinux) the past 3 years, and I never had any troubles with Ethernet. But, I have tried to compile the kernel countless times (at least 10 times), and it doesn't want to work. What's strange is that the live environment has no troubles at all with Ethernet.

So, I don't remember exactly the model of my Ethernet card (I'm on WIndows right now and it doesn't want to provide as much information as lspci does). I just now that it's a Realtek card, and that the Gentoo Live Environment (and Arch Linux when I had it installed) uses the r8169 driver to make it work. So I have enabled the r8169 driver in the kernel, as a module or directly inside the kernel, but it doesn't seem to work.
When I boot, ifconfig shows me no network interfaces other than lo. lsmod doesn't show any sign of r8169, neither does lspci -k (which does tell me I have an Ethernet card, but doesn't show anything about a kernel driver or a module being used). modprobe r8169 doesn't do anything, and dmesg didn't show me anything about r8169.
Something that frightens me, too, is that usb cards aren't detected by the system too, and that the system doesn't seem to be able to work with FAT32 (used for the /boot partition) or ext4 (used for a separate /home partition) either (though once again the Live Environment doesn't seem to have troubles with these, and though I should have compiled the kernel with support for these).
I have at first tried to compile the kernel manually, but since it shows no results, I have tried a few hours earlier to reinstall using Genkernl. But the system installed thanks to genkernel behaves exactly like the others.

I don't have any idea of what's going on here (you probably realised that by yourself). I followed the Handbook to the letter, the only point where I had trouble is here:
Code:
root #cp /boot/vmlinuz-* /boot/efi/boot/bootx64.efi

(I have an UEFI laptop)
because I have two vmlinuz-* items: a vmlinuz-linux and a vmlinuz-4.1.12-gentoo. I usually uses the one named with the name of the distro, I'm not sure it matters ?

So, can you help me ? I'm quite sorry because this post is totally awful, you'll probably need more informations and more clarity... I'm on my Windows system right now and I'm going to sleep so I can't post informations right now, I'll probably be able to post more tomorrow morning. I'm not quite used to Linux debug too (in 3 years of use, I rarely reported bugs and none as problematic as that), so if you need more infos (I'll post the output of lspci -k, dmesg and lsmod tomorrow), ask me about it and I'll post it tomorrow too


Last edited by Yvanoff on Thu Jan 14, 2016 10:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 813

PostPosted: Tue Jan 12, 2016 10:56 am    Post subject: Reply with quote

NIC/ethernet: make sure you find out the exact model/rev of your NIC when using a live-environment, check all loaded modules. find out if your specific model needs additional firmware. then enable the same in your own kernel and read the help regarding the models/revs inside the kernel-config (i remember some time ago some NIC-driver was called rtl8128 but it was needed for rtl8129 - which was described in that help.)
install the firmware or external module if neccessary.
when the system has booted try
Code:
ifconfig -a


all the other stuff taht does not work has (probably) to be explicitly activated in your kernel-config (no reason to be "frightened" :wink: ); if you enabled config.gz you can easily check for it; eg all usb-reklated stuff that is enabled:
Code:
zgrep USB /proc/config.gz | grep -v "#"


same thing with the filesystems you want your kernel to support. for fat32 yours should look similar to this:
Code:
t-46 ~ # zgrep -i fat /proc/config.gz
# DOS/FAT/NT Filesystems
CONFIG_FAT_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15"


as for your kernels, you can name them however you like, just make sure to configure grub with the one you want. if the filenames are confusing you can find out some info with the file-cmd. i name the files only with the version-number, eg
Code:
t-46 ~ # file /boot/4.3.3
/boot/4.3.3: Linux kernel x86 boot executable bzImage, version 4.3.3-gentoo (root@t-46) #1 SMP PREEMPT Sat Dec 19 09:44:42 201, RO-rootFS, swap_dev 0x3, Normal VGA


if you're not sure you can open grub's commandline before booting and select the file you want.
GOOD LUCK!
_________________
DUMM KLICKT GUT.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jan 12, 2016 8:57 pm    Post subject: Reply with quote

Yvanoff,

Welcome to Gentoo.

Ethernet modules are not always auto loaded. Try
Code:
modprobe r8169

Its also possible that all is well but the interface is not started.
Does it appear in
Code:
ifconfig -a


udev may have renamed it from eth0, so it might be listed ender its new name.
This will defeat the network startup scripts.
_________________
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
Yvanoff
n00b
n00b


Joined: 11 Jan 2016
Posts: 4

PostPosted: Thu Jan 14, 2016 7:46 pm    Post subject: Reply with quote

Ok,

I'm sorry I have been a bit delayed. I now have some interesting informations

Outputs of commands from the installed system:

uname -r:
Code:
4.3.3-2-ARCH


ifconfig -a:
Code:
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


lspci -k:
Code:
00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
   Subsystem: ASUSTeK Computer Inc. Haswell-ULT DRAM Controller
   Kernel driver in use: hsw_uncore
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
   Subsystem: ASUSTeK Computer Inc. Haswell-ULT Integrated Graphics Controller
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
   Subsystem: ASUSTeK Computer Inc. Haswell-ULT HD Audio Controller
00:04.0 Signal processing controller: Intel Corporation Device 0a03 (rev 0b)
   Subsystem: ASUSTeK Computer Inc. Device 16cd
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series USB xHCI HC
   Kernel driver in use: xhci_hcd
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series HECI
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4)
   Kernel driver in use: pcieport
00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
   Kernel driver in use: pcieport
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
   Kernel driver in use: pcieport
00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4)
   Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series USB EHCI
   Kernel driver in use: ehci-pci
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series LPC Controller
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series SATA Controller 1 [AHCI mode]
   Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series SMBus Controller
00:1f.6 Signal processing controller: Intel Corporation 8 Series Thermal (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series Thermal
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
   Subsystem: ASUSTeK Computer Inc. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
03:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)
   Subsystem: Lite-On Communications Inc BCM43142 802.11b/g/n
04:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
   Subsystem: ASUSTeK Computer Inc. GeForce 820M


and from the live environment:

uname -r:
Code:
4.1.12-gentoo


ifconfig -a:
Code:
enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 38:2c:4a:15:4e:6e  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


lspci -k:
Code:
00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
   Subsystem: ASUSTeK Computer Inc. Haswell-ULT DRAM Controller
   Kernel driver in use: hsw_uncore
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
   Subsystem: ASUSTeK Computer Inc. Haswell-ULT Integrated Graphics Controller
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
   Subsystem: ASUSTeK Computer Inc. Haswell-ULT HD Audio Controller
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
00:04.0 Signal processing controller: Intel Corporation Device 0a03 (rev 0b)
   Subsystem: ASUSTeK Computer Inc. Device 16cd
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series USB xHCI HC
   Kernel driver in use: xhci_hcd
   Kernel modules: xhci_pci
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series HECI
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series HD Audio Controller
   Kernel driver in use: snd_hda_intel
   Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4)
   Kernel driver in use: pcieport
00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
   Kernel driver in use: pcieport
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
   Kernel driver in use: pcieport
00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4)
   Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series USB EHCI
   Kernel driver in use: ehci-pci
   Kernel modules: ehci_pci
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series LPC Controller
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series SATA Controller 1 [AHCI mode]
   Kernel driver in use: ahci
   Kernel modules: ahci
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series SMBus Controller
00:1f.6 Signal processing controller: Intel Corporation 8 Series Thermal (rev 04)
   Subsystem: ASUSTeK Computer Inc. 8 Series Thermal
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
   Subsystem: ASUSTeK Computer Inc. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
   Kernel driver in use: r8169
   Kernel modules: r8169
03:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)
   Subsystem: Lite-On Communications Inc BCM43142 802.11b/g/n
   Kernel driver in use: bcma-pci-bridge
   Kernel modules: bcma
04:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
   Subsystem: ASUSTeK Computer Inc. GeForce 820M


the output of the uname command doesn't look very consistant to me.... but why ?
I haven't formatted the /boot partition because I fear I would lose the windows boot if I do so, but I have configured grub according to the handbook, shouldn't it be enough ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jan 14, 2016 8:48 pm    Post subject: Reply with quote

Yvanoff,

It looks like the r8169 module is not available in your install.
When its loaded, your interface will be called enp2s0.

What does
Code:
grep R8169 /usr/src/linux/.config
show when you boot into your system?
Code:
CONFIG_R8169=y
CONFIG_R8169=m
are both OK

Code:
#CONFIG_R8169 is not set
, or nothing means the driver is missing from your kernel.
_________________
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
Yvanoff
n00b
n00b


Joined: 11 Jan 2016
Posts: 4

PostPosted: Thu Jan 14, 2016 8:53 pm    Post subject: Reply with quote

I have
Code:
CONFIG_R8169=m


I also have the full .config file and the output of dmesg on both installed system and live system avalaible, but I don't know how to post them. These are quite long and [SPOILER][/SPOILER] doesn't seem to work on these forums

EDIT: but the output of uname -r is really bothering me. I mean, could it be that grub is loading the wrong kernel ? Before trying to install gentoo I had archlinux installed, and while I formatted most of the partitions I used, I didn't format /boot (because of Windows as I told you). Could it be that grub is loading leftovers of the ArchLinux install ? (that would explain this behaviour, although since I followed the handbook closely I'd expect such problems not to happen) Or is it absurd ?
Back to top
View user's profile Send private message
Yvanoff
n00b
n00b


Joined: 11 Jan 2016
Posts: 4

PostPosted: Thu Jan 14, 2016 10:21 pm    Post subject: Reply with quote

OK, so... that was it. I cleaned my /boot partition (removing all files used by linux to boot, while keeping Windows boot files), then recompiled the kernel and reinstalled grub, and it works like a charm. Even the wifi card interface is shown by the ifconfig -a command, something I didn't expect because it's usually a pain to install the wl driver that it uses :o
So I think grub was booting the old ArchLinux kernel, kernel which did not really liked being booted in a full gentoo environment.
I have learned a valuable lesson though, always clean up your /boot partition before switching distro

Thank you all for the help, though in the end I mostly waisted your time, and I apology for that
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jan 14, 2016 10:27 pm    Post subject: Reply with quote

Yvanoff,

There is a tool called wgetpaste that puts text on the web and returns a URL to the text.
Code:
$ wgetpaste /etc/portage/make.conf
Your paste can be seen here: https://bpaste.net/show/1eee126e8027

You tell us the URL.
_________________
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
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