Gentoo Linux: eth0 Stops Working During Install Using Minimal Install CD
I started an install of Gentoo Linux this morning on a desktop at my house so I could test some browser stuff that purehate was seeing via his Gentoo laptop. I don’t think I have ever installed Gentoo but its possible a couple years back I installed it in the same scenario. Anyway I decided to download the x86 minimal install CD for the installation. After it was burned to CD I booted my desktop up and started the install. Once it was booted I configured the network interface, which in this case was eth0, and was able to test without issue to the Internet using ping. I proceeded with the installation including writing the partition table, creating the file system, and mounting my drives. The next step involved using links to open a gentoo.org URL to select a mirror and to my surprise it failed. Below I go into detail about the problem I ran into and the steps I took to resolve the issue.
The eth0 Network Interface Randomly Stops Working During Gentoo Install:
So after failing to be able to open the URL using links I attempted to ping to my router and I was unable to do so. I was thinking OK I must have accidentally mistyped one of the configuration options for eth0 so I opened up /etc/conf.d/net and verified everything was set correctly. A view of my net file is below.
Gentoo /etc/conf.d/net File:
config_eth0=( "192.168.1.251/24" ) routes_eth0=( "default via 192.168.1.1" )
I tried all sorts of different combinations of the settings such as changing “192.168.1.251/24” to “192.168.1.251 netmask 255.255.255.0”. I exhausted all possibilities that I could think of with the network interface settings so I moved on to investigating the driver. First I looked at the boot log using dmesg as displayed below.
Verify eth0 Ethernet Card In Boot Log Using dmesg:
Atheros(R) L2 Ethernet Driver - version 2.2.3 jme: JMicron JMC2XX ethernet driver version 1.0.4 eth0: Davicom DM9102/DM9102A rev 49 at MMIO 0xfeaefc00, 00:08:a1:1c:52:c2, IRQ 23. eth0: Setting full-duplex based on MII#1 link partner capability of c1e1. eth0: Davicom DM9102 at pci0000:02:0b.0, 00:08:a1:1c:52:c2, irq 23. eth0: no IPv6 routers present eth0: no IPv6 routers present
It appeared that the NIC was getting an IRQ and loading correctly from the output above. There were no obvious errors stating an issue that I could see. I used lspci to obtain more specific information relating to the PCI Ethernet card which provided the output shown below.
Ethernet Card Details Via lspci:
livecd ~ # lspci | grep Ethernet 02:0b.0 Ethernet controller: Davicom Semiconductor, Inc. 21x4x DEC-Tulip compatible 10/100 Ethernet (rev 31)
As you can see the NIC is a Davicom Semiconductor that says it should be compatible with the “tulip” Ethernet driver. Now I needed to verify the tulip driver was installed using lsmod as shown below.
Verify tulip Installed On Gentoo:
livecd ~ # lsmod | grep tulip tulip 4596 0
If the tulip driver is installed you should see an output similar to the below. I decided to make sure that the tulip driver is what should be installed for this Ethernet card so taking information from the lspci command used earlier and using a switch on the end of the lspci command we are going to gain more info related to the Ethernet card. The information we need from the output of the first lspci output is the “(rev 31)” which will be located at the very end of the output for the Ethernet card. Now taking that information issue the below command to identify the manufacturer and product PCI ID’s.
Use lspci To Identify Manufacturer & Product PCI ID:
livecd ~ # lspci -n | grep "rev 31" 02:0b.0 0200: 1282:9102 (rev 31)
In the above command you would obviously replace “rev 31” with whatever the output from the lspci command you entered the first time was. So the Manufacturer PCI ID is 1282 and the Product PCI ID is 9102. Notice how the 9102 matches the output from dmesg. In my case I searched on Google for “gentoo ethernet drivers 1282:9102” which provided some results. I still had to do quite a bit of digging to see that the tulip driver was not the recommended driver for this NIC but instead the dmfe Ethernet driver was recommended instead. Use the commands below to shut down eth0, uninstall tulip, install dmfe, and then bring up eth0.
Remove tulip Ethernet Driver, Install dmfe Ethernet Driver:
livecd ~ # /etc/init.d/net.eth0 stop livecd ~ # rmmod tulip livecd ~ # modprobe dmfe livecd ~ # /etc/init.d/net.eth0 start
If needed go ahead and configure eth0 again and then test. You should no longer see intermittent issues with this Ethernet interface. In my scenario with the tulip driver installed it would randomly work for a minute or so every 15 minutes. Now with the dmfe driver installed I haven’t noticed anymore issues.