# Network Interface eth0 does not exist after install

## PeggySue

I'm new to Gentoo so not too familiar with kernel builds.

I have been through the installation process twice but I still get the message "Network Interface eth0 does not exist"  I assume that I failed to enable the correct kernel module.  I ran lspci (outside gentoo) to find  my ethernet card is Broadcom BCM4401 so in the kernel menuconfig I selected BCM44xx driver.

ifconfig shows the loopback but no ethernet or wireless (also broadcom, BMW4311; also selected in menuconfig). 

Can anyone give me some guidance of the areas I should be looking at.  I am happy to do the research but need to have some idea of the buzz words to google.

Can I fix this by loading modules rather than having to do yet another full build?

----------

## Sade

mayb you forgot to initialize the card, try

```
# cd /etc/init.d

# ln -s net.lo net.eth0

# /etc/init.d/net.eth0 start
```

mayb this part of the handbook can be of help

----------

## causality

Just to verify:  in the kernel menuconfig, it's listed under Device Drivers->Network Device Support->Ethernet (10 or 100Mbit)->Broadcom 440x/47xx ethernet support.

The menuconfig help option says that the module is called "b44".  If you built it as a module, then running "lsmod" as root should show that the "b44" module is loaded.

If that is loaded, please advise whether the file /etc/init.d/net.eth0 exists (it'll be a symlink).  If not, please refer to the Gentoo Handbook for how to set that up.

You can verify whether /etc/init.d/net.eth0 has been started up like so:

```
localhost ~ # /etc/init.d/net.eth0 status

 * status:  started

localhost ~ #

```

If it says "stopped" then try running it manually:

```
localhost ~ # /etc/init.d/net.eth0 start
```

You should also have "net.eth0" configured to run when your machine boots.  You can verify that by using "rc-update show" (as root).  Here's mine for comparison:

```
localhost ~ # rc-update show

               acpid | boot

           alsasound | boot

            bootmisc | boot

             cbqinit |      default

             checkfs | boot

           checkroot | boot

               clock | boot

         consolefont | boot

          consolekit |      default

               cupsd |      default

                dbus |      default

             dovecot |      default

           fetchmail |      default

                 gpm |      default

                hald |      default

            hostname | boot

            iptables |      default

             keymaps | boot

               local |      default nonetwork

          localmount | boot

             maradns |      default

             modules | boot

            net.eth0 |      default

              net.lo | boot

            netmount |      default

                ntpd |      default

             postfix |      default

           rmnologin | boot

               samba |      default

               spamd |      default

                sshd |      default

           syslog-ng |      default

             urandom | boot

          vixie-cron |      default

localhost ~ #

```

If "net.eth0" is not listed there, you can correct that by running this as root:

```
localhost ~ # rc-update add net.eth0 default
```

If all of that looks good, then you may need to configure either DHCP or static addresses.  If you are not sure which one you're using, it's probably DHCP.  For that, have a look at the /etc/conf.d/net text file.  The link to the Gentoo Handbook above will take you to that section.

For DHCP, you also need to have some kind of dhcp client installed.  Examples include net-misc/dhcp and net-misc/dhcpcd.

-----------------------------------------

What follows is intended for the event that you don't have the driver loaded at all.  It shouldn't be necessary if the driver is loading successfully.

Right after you reboot that machine, can you save the contents of the "dmesg" command to a file and post them here?

```
localhost ~ # dmesg > dmesg_output
```

I know that might not be straightforward when that machine has no network, but maybe you can use the old fashioned sneakernet (removable media) to get that file to a computer that does have network access.   :Smile: 

Assuming that your system at least tried to load up the driver, dmesg will show you what happened.  There's going to be a lot of output there, but one of the lines should mention Broadcom and will tell you whether it failed for any reason.  This will work the same whether it's a loadable module or built into your kernel.

----------

## tkhemili78

It may even be simpler than that. Maybe try modprobing for the driver. If you know what card you do have, try double checking your kernel and set the driver as a module. i.e.

lsmod

or if you are not sure of which driver you need. pop the install disk in and:

lsmod

ethtool -i eth0

----------

## PeggySue

Many thanks for the responses.

From the suggestions it appears that net.eth0 is stopped because it can't see the hardware.

The BCM44xx was from memory, but I certainly chose x44xx.  I built it into the kernel rather than having it as a module.  At the time I was sure that was the correct driver and wasn't anticipating having to remove it.

To be sure I have gone back to /usr/src/linux make menuconfig.  The Device drivers | Network Device support | Ethernet (10 or 1000 Mbit) has "Broadcom 440x/47xx ethernet support" stared "*".  According to the PCI bus scan I have a 4401 100 Base Tx.

The file /etc/init.d/net.eth0 does exist.  It appears to point to net.lo.

net.eth0 is stopped.  Issuing the start command gives the familiar message "network interface eth0 does not exist".

rc-update show includes:

net.eth0 |     default

In conf.d/net I have set config_eth0=( "eth0" ); but I don't think it is getting that far.

I would need to figure out how to mount a usb stick from the command line to post dmesg and I could do that tomorrow.  I did try "grep Broad dmesg_output" and got three lines which included Broadcom.  They were for the wireless drivers I selected at the same time as the ethernet driver:

[0.291951] b43-phy0: Broadcom 4311 WLAN found (core revision 10)

[0.314544] Broadcom 43xx driver loaded [Features: PML, Firmware-ID: FW13]

[0.314719] Broadcom 43xx-legacy driver loaded [Features: PLID, Firmware-ID: FW10]

I haven't tried using the wireless interface yet but ifconfig only shows the loopback; no wireless.

Just to verify the ethernet worked out of the box with the minimal-install cd.

With the install disk in place ethtool was "command not found".

Hmmm!

----------

## cach0rr0

hiya

A few things I'd like to have a look at

```

cat /proc/net/dev

cat /proc/net/wireless

```

and

```

lspci -n

```

As well, could you hit pastebin.com and upload your kernel .config to share with us? (saves space over including the whole thing in a forum post)

----------

## d2_racing

Hi, from your dmesg, we see only your broadcom wireless card.

----------

## PeggySue

Well this is embarrassing!

/proc/net/dev and /proc/net/wireless are both full of zeros.  Worse still lspci is command not found.

I have noticed that the boot messages, as they flash by, report bad entries for my fstab.  This looked OK to me but it reports "[mntent] line xx in /etc/fstab is bad" for the first, third and fourth line (also cdrom not shown); it is happy with the /boot partition:

/dev/sda5  /  ext3 defaults   0,1

/dev/sda1  /boot ext2 defaults,noatime  1,2

/dev/sda2  swap   swap  sw  0,0

/dev/sda3  /home ext3 defaults  0,1

I have played with the options, the dump parameters and sda vs hda to no avail.  I used a live distro to check that the partitions are correct and have ext2 and ext3 file systems as shown in fstab.

mtab doesn't show any mounted partitions but I think these entries come from fstab.

I'm off to read about fstab and mounting devices.  At least I'll figure out how to mount a memory stick to transfer data.

Anyone know where the boot messages are logged?  I can't read that fast!

----------

## NeddySeagoon

PeggySue,

The boot messages to the screen are not logged but dmesg shows similar data.

You will want 

```
dmesg | less
```

Your eth0 is not present because the kernel module is not loaded. It may not even be made.

Boot the liveCD, do lspci and post your Ethernet and/or Wireless lines here.

You will need extra code to make wireless work so its good to start with wired.

To mount USB, borrow the /mnt/cdrom mount point. Plug in your device, do dmesg to see what its called (it will be at the end), then 

```
mount -t vfat /dev/... /mnt/cdrom
```

Flash sticks may or may not be partitioned. If it has a partition, mount the partition, if not mount the whole device.

----------

## PeggySue

Hi Neddy,

This is my lspci output with processor and usb removed. I built the drivers into the kernel rather than having them as modules.  Should I try to build and load the driver as a module?  

Are the fstab error messages a red herring?  Dmesg makes no reference to fstab.  It does log the b43 wireless driver but makes no mention of 'b44' or 'eth' (except in the word method).

I will try to use paste bin to upload my kernel .config file but I've not done this before so may take a while.

Thanks for telling me how to figure out the flash drive's name.  Saved me some time!

```
00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 10)

00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge

00:05.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge

00:06.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge

00:12.0 SATA controller: ATI Technologies Inc SB600 Non-Raid-5 SATA

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 13)

00:14.1 IDE interface: ATI Technologies Inc SB600 IDE

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

00:14.3 ISA bridge: ATI Technologies Inc SB600 PCI to LPC Bridge

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge

01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 200M]

05:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)

08:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)

08:01.0 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)

08:01.1 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 01)
```

----------

## cwr

Well, I'd definitely sort out the fstab messages first if I were you, even if they

turn out to have nothing to do with networking.  In fact I'm suprised that the

system will even boot if fstab doesn't like the / filesystem line.

Will

----------

## PeggySue

Well that was easy... I think.

I have pasted my kernel config file to pastebin.com using my nickname PeggySue. (sometimes it is useful to have friends cruel enough to give you a nickname nobody else will use!)  I was expecting a reference that I could post to make it easy to find but it is there on the list of posts.

----------

## roltel

Because Broadcom 440x/47xx depends on Sonics Silicone Backplane, make sure to enable to following kernel parameters too:

Device Drivers -> Sonics Silicon Backplane -> Sonics Silicon Backplane support

Device Drivers -> Network Device Support -> Ethernet (10 or 100 Mbit) -> Generic Media Independent Interface Device Support

The card should work now ...

----------

## PeggySue

Thanks Roltel but Sonics is selected and Generic Media Independent Interface Device Support is marked -*- in menuconfig so it appears to be in by default.

```

From Kernel config file:

#

# Sonics Silicon Backplane

#

CONFIG_SSB=y

CONFIG_SSB_SPROM=y

CONFIG_SSB_BLOCKIO=y

CONFIG_SSB_PCIHOST_POSSIBLE=y

CONFIG_SSB_PCIHOST=y

CONFIG_SSB_B43_PCI_BRIDGE=y

CONFIG_SSB_PCMCIAHOST_POSSIBLE=y

CONFIG_SSB_PCMCIAHOST=y

# CONFIG_SSB_DEBUG is not set

CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y

CONFIG_SSB_DRIVER_PCICORE=y
```

----------

## roltel

Because you mentioned you are not too familiar with kernel builds:

Did you check that you really compiled the kernel the right way?

```
make clean && make && make modules_install && make install
```

Perhaps it is also a good idea to check that your new kernel in /boot really gets selected by /boot/grub/grub.conf.

Other than that you might want to ensure that the following kernel parameters are set:

Device Drivers -> Network Device Support -> PHY Device support and infrastructure -> Drivers for Broadcom PHYs

Bus Options -> PCI Debugging (for more kernel messages)

----------

## PeggySue

Hi Roltel,

I followed the instructions in the install manual 3.7 http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=7 which says:

"# make && make modules_install"

There is no 'make clean' and this was second pass at the gentoo installation since I formatted the partitions.

Also no 'make install' but the manual tells you to move the kernel to /boot

I feel another clean install coming on.  This time I will make the network drivers as modules.  I will wait until tomorrow in case anybody else has a point to make.

As an aside I managed to get the live cd to boot but only with 'gentoo-nofb nox' so it looks as if I will have problems with X11 as well.  The rescue X session vaguely works but random lines appear across the screen.

----------

## roltel

 *Quote:*   

> "# make && make modules_install"

 

That's ok. You may switch the order of those two commands.

 *Quote:*   

> There is no 'make clean' and this was second pass at the gentoo installation since I formatted the partitions.

 

You should do a 'make clean' every time you recompile your kernel after the very first compile. This turned out to help in some rare cases. You never know ...

 *Quote:*   

> Also no 'make install' but the manual tells you to move the kernel to /boot

 

 After you copy the kernel to /boot just make sure that its name and path really matches your entry in /boot/grub/grub.conf. If you copy the kernel manually, there is no need to do a 'make install'.

----------

## d2_racing

Hi, after copying your new kernel image inside /boot, did you reboot your box ?

----------

## PeggySue

Thank you all for your support.

Yes I did reboot after copying the kernel.  

There is only one kernel.  It is in the boot directory of my boot partition and it has the correct time stamp.

Grub.conf does point to the kernel.  The only oddity to me is that my boot partition on sda1 was not mounted after boot up.  There is a second boot directory in my root directory on my root partition (sda5).  This directory is empty.  It must be OK because the machine runs!

I am going to reformat all my partitions and try again.  I am more confident with the install process as I now have a better understanding.

Thanks again.  I will let you know how I get on after the holidays.

----------

## NeddySeagoon

PeggySue,

Fix it - wiping and reinstalling is a bad habit learned from another OS.

Gentoo does not mount /boot on startup, so your empty /boot on sda5 is the place where your real boot partition is attached in the filesystem tree. Thats all quite normal.

Grub runs before the kernel is started - before its decompressed even, so grub cannot use the kernel.

It makes its own arrangements for reading things.

It looks like you have a sound install and a good basis for moving forward.

----------

## PeggySue

Season's greetings!

Sorry Neddy; too late; I had already repartitioned my drive.  Sorry.

I know that "closing all the windows, switching off the engine and getting out the car" is a Micro$oft process but I was out of my depth.

I have done a rebuild from scratch following the instructions with default settings, minimal changes, everything in sequence and after some fiddling I have a very basic Gentoo system running.  There is one major difference that might indicate what went wrong.

The new install gave an error message on boot up saying:

fschk.ext3 No such file or directory while trying to open /dev/ROOT.

I recognised this as being a prototype in fstab.  It was originally commented out but in the final version the comment # marks were removed!!  (Not by me).  The point is that the failed install didn't do this.  Also on the failed install my mtab file didn't have any /dev lines; the working install does.

Fixing fstab was a pain.  The install CD didn't give me access to write to the files.  In the end I used a System Rescue CD so that is now fixed.

Eth0 now works but the wireless doesn't, even though the driver module loaded OK.  I will have to address this later as iwconfig is "file not found" as is lspci and lots of other tools.  This will be a good exercise; I expect to learn a lot.

I still have a boot message that says "unknown file system type 'ext2' " and sda1 (my ext2 /boot partition) is not mounted.  Root and /home partitions are mounted so I will look at this later.

In the mean time I will "emerge links" to get the laptop on the net and then try "emerge gnome" to give me a desktop that I can start loading applications on to.  I trust it will look after the large number of dependencies.

My solution to the original question posted was to do a rebuild so I guess that closes the thread and I will have to search other threads to find out what a typical looks like. I assume Gentoo isn't meant for command line only so is it X11, X86, Gnome or KDE next?

----------

## NeddySeagoon

PeggySue,

My Gentoos - all them work fine from the command line.  They are mostly headless servers of one sort or another I access using ssh.

All that your reinstall did was to offer you another opportunity to not make the same mistake again. It looks like you managed that.

You did not need any CD to fix your /etc/fstab.

At the message where it says "Give the root password for maintainance or press Ctrl-D to reboot", you give the root password.

You are now in your system with root mounted read only, so a

```
mount -o remount,rw /
```

makes root rw, so you can edit /etc/fstab.

You don't have any environment but 

```
/bin/nano /etc/fstab
```

(full path names) allows you to fix fstab.

Lastly 

```
/sbin/shutdown -r now
```

tests.

/etc/mtab is dynamically populated by mount, as you mount and umount filesystems. In your chroot its always empty. The top level system owns it and its no longer available when you chroot.

You can emerge the desktop of your choice now - see these documents

----------

## cwr

It's probably worth emerging xorg-x11 first, and then eg: Gnome.  Gives

you a chance to tackle one problem at a time ...

Good luck - Will

----------

## d2_racing

In fact, installing a Gentoo is not a race  :Razz: 

After your first emerge, you should post your emerge --info, because you will need to use the desktop profile for sure if you want to use Kde,Gnome,Xfce, Lxde or something else.

----------

## dtjohnst

Hi PeggySue,

Sounds like things are coming along for you! Reminds me of my first Gentoo install many years ago. Reference your boot issue: 

 *PeggySue wrote:*   

> I still have a boot message that says "unknown file system type 'ext2' " and sda1 (my ext2 /boot partition) is not mounted. Root and /home partitions are mounted so I will look at this later. 

 

EXT2 support is NOT enabled by default in the kernel setup, but it is recognized natively by grub. If you didn't use a kernel seed and didn't specifically enable it, that would explain your filesystem error (and of course, as you likely understood, if Gentoo doesn't recognize the filesystem it can't mount the drive). EXT2 is the first entry in the Filesystems section of menuconfig. It might be called Second Extended Filesystem or something like that (I'm at work right now so I can't confirm the exact wording). Once you enable that, rebuild your kernel and you should be fine. Since everything else is working, you shouldn't have to worry about make clean in this case, in fact doing so would only prolong your compile time. You can use the handbook method of make && make modules_install then copy over your kernel or make && make install && make modules_install to have the kernel copied over automatically. Personally, I don't use make install because I use specific names for my kernel's so I can keep track of them, but the beauty of linux is the flexibility it gives us to do things the way we want, so if you want to save that copy, that's great!

Now, you'll need to boot off the livecd, mount your drives as per the handbook, and chroot as per the handbook in order to be able to compile the kernel and copy it to your /boot drive, but I've installed gentoo several dozen times and I often end up having to do that because I forget some simple step if I'm doing it from memory so it's not a bad experience to get used to.

I don't know if you wanted us to spoil your fun figuring out why iwconfig and lspci don't work, but I'll hint that you need to emerge a few packages to get them. If you don't mind the spoiler, just say so and we'll tell you which ones exactly you need to do those.

----------

## NeddySeagoon

dtjohnst,

Its a two stage approach.  First, make ext2 as a module, since you need it to install your new kernel to /boot.

You only need do 

```
make modules && make modules_install
```

Now you can modprobe ext2 so you can mount /boot

As yet, the file that goes in /boot is not changed, so no need to copy of the bzImage.

At your next kernel update, make ext2 <*> and use the old kernel (with the modular ext2) to copy it to /boot

----------

## PeggySue

Hi dtjohnst and Neddy

Thanks for the detailed explanation about ext2.  I understand what you are saying and will fix it with a kernel rebuild later but I will also do a module install for the practice.  I can get to the files in my Ext2 /boot partition from a live CD but have no reason to change anything yet, I have bigger problems to solve first.  I made the /boot partition ext2 because I had read somewhere that some systems required it.  I am beginning to think this is very old information and a bad idea.

Also thanks for the tip about iwconfig and lspci.  You understand were I am coming from!  I know I have some amusingly large gaps in my knowledge but trying to track down iwconfig will help.

----------

## cach0rr0

 *PeggySue wrote:*   

> I made the /boot partition ext2 because I had read somewhere that some systems required it.  I am beginning to think this is very old information and a bad idea.

 

nah, the information is still sound. /boot is so very, very rarely mounted, grub doesn't do anything with a journal, so there's no real point in making it anything but ext2

the annoying things, as I see 'em:

-ext2 not being selected by default

-the ext2 prompt being named "second extended fs" instead of simply 'ext2' means it's easy for the eyes to just brush over it without noticing it. And since ext3 is named ext3 in the prompt, there's no real uniformity (if ext3 were labeled 'third extended fs' or what have you, it would click in people's minds)

at any rate, despite this hiccup ext2 was the right choice for boot. Just that annoyance with the config defaults having it turned off

----------

## dtjohnst

 *NeddySeagoon wrote:*   

> dtjohnst,
> 
> Its a two stage approach.  First, make ext2 as a module, since you need it to install your new kernel to /boot.
> 
> You only need do 
> ...

 

Ooooooooh. I never would've thought of doing it that way! Outstanding tip!

----------

## d2_racing

In fact, it's an easy way to get out of the mess  :Razz: 

----------

