No ethernet/wireless connection after dist upgrade - "network UNCLAIMED"

20,098

This question turned out to have two answers, both suggested by @JosephR in the comments.

1) Fixing the /lib/modules/3.5.0-030500-generic/build: No such file or directory error while trying to install the ethernet driver just needed a sudo ln -sv /usr/src/linux-headers-$(uname -r) /lib/modules/$(uname -r)/build - after I did that, the driver install from source worked fine, and I got an ethernet connection.

(Presumably repeating the process with the driver for the wireless controller would have made that work too, but I didn't actually try, due to solution #2.)

2) It turned out that if I just booted with the other kernel that was already installed (3.5.0-41-generic instead of 3.5.0-030500-generic - I don't actually know what the difference is), both the ethernet and the wireless worked fine!

It also solved some other problems I was having after the upgrade. So I changed the default boot kernel to that, and will probably stick with that unless I run into other issues.

Share:
20,098

Related videos on Youtube

morrows_end
Author by

morrows_end

Bioinformatics programmer/analyst in an academic lab

Updated on September 18, 2022

Comments

  • morrows_end
    morrows_end over 1 year

    I did an upgrade from Xubuntu 12.04 to 12.10, and I can't connect to the internet now.

    When I press the network button on the panel, I see "No network devices available" on top (greyed out), then "VPN Connections", "Enable Networking" with a checkmark next to it, "Information" (greyed out) and "Edit".

    Here's the output from some commands that seem relevant:

     ~ % lspci | grep -i ethernet
    03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 07)
    ~ % lspci | grep -i network
    02:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 (rev 34)
    ~ % sudo lshw -C network
    PCI (sysfs)
      *-network UNCLAIMED
           description: Network controller
           product: Centrino Wireless-N 1030
           vendor: Intel Corporation
           physical id: 0
           bus info: pci@0000:02:00.0
           version: 34
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress bus_master cap_list
           configuration: latency=0
           resources: memory:f7c00000-f7c01fff
      *-network UNCLAIMED
           description: Ethernet controller
           product: RTL8111/8168B PCI Express Gigabit Ethernet controller
           vendor: Realtek Semiconductor Co., Ltd.
           physical id: 0
           bus info: pci@0000:03:00.0
           version: 07
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress msix vpd bus_master cap_list
           configuration: latency=0
           resources: ioport:e000(size=256) memory:f0004000-f0004fff memory:f0000000-f0003fff
    ~ % uname -a
    Linux bleen 3.5.0-030500-generic #201207211835 SMP Sat Jul 21 22:35:55 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
    ~ % ifconfig 
    lo        Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:472 errors:0 dropped:0 overruns:0 frame:0 TX packets:472 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:35080 (35.0 KB) TX bytes:35080 (35.0 KB) ~ % ifconfig eth0 up eth0: ERROR while getting interface flags: No such device

    I think that UNCLAIMED means I don't have a driver for the Ethernet controller. It seems that the driver should be called something including 816 (I don't remember where I found that), and it does seem to be missing:

    ~ % lsmod | grep 816
    ~ % 
    

    I tried downloading and installing the driver (after moving on a USB stick from a computer with a connection), but I get this issue:

    ~/r8168-8.037.00 % sudo ./autorun.sh 
    Check old driver and unload it.
    Build the module and install
    make: * /lib/modules/3.5.0-030500-generic/build: No such file or directory.  Stop.
    make1:  [clean] Error 2
    make: ** [clean] Error 2
    

    Not sure what to do next.

    • Jeff Hewitt
      Jeff Hewitt over 10 years
      For your last issue (when compiling the module from source), you probably need to install the kernel headers: sudo apt-get install linux-headers-$(uname -r) and try again.
    • morrows_end
      morrows_end over 10 years
      @JosephR. That tells me linux-headers-3.5.0-030500-generic is already the newest version. and doesn't do anything.
    • Jeff Hewitt
      Jeff Hewitt over 10 years
      Please check that both these directories are available on your system: /lib/modules/3.5.0-030500-generic and /usr/src/linux-headers-3.5.0-030500-generic.
    • morrows_end
      morrows_end over 10 years
      @JosephR. They are. The first one just doesn't have a build subdirectory in it.
    • Jeff Hewitt
      Jeff Hewitt over 10 years
      On my system (Debian Wheezy), build is actually a symlink to /usr/src/linux-headers-$(uname -r). So simply add the symlink: sudo ln -sv /usr/src/linux-headers-$(uname -r) /lib/modules/$(uname -r)/build
    • terdon
      terdon over 10 years
      Which driver did you download? Where from? Is this the official realtek one?
    • morrows_end
      morrows_end over 10 years
      @JosephR. That made the driver install go through! Now to figure out what to do next...
    • morrows_end
      morrows_end over 10 years
      @terdon Yes, that one, "LINUX driver for kernel 3.x and 2.6.x and 2.4.x" specifically.
    • Jeff Hewitt
      Jeff Hewitt over 10 years
      @weronika If the install went through correctly, usually a reboot is all that's required.
    • morrows_end
      morrows_end over 10 years
      @JosephR. Yep, I have an ethernet connection now, thanks! Still no wireless - I guess I just need to repeat the process for the Centrino Wireless-N 1030 (still showing up as UNCLAIMED in lshw).
    • Jeff Hewitt
      Jeff Hewitt over 10 years
      @weronika Glad to see things starting to work out. Two more points: 1- Was/were the NIC(s) working out of the box before the upgrade? 2- If you're able to get the wireless working in a similar way, please answer your own question summarizing the steps you've taken.
    • morrows_end
      morrows_end over 10 years
      @JosephR. I got the laptop with Xubuntu pre-installed on it - things were working out of the box as far as I could tell, but I don't know if the vendor needed to do any tweaking before I got it. I'll add the answer when I have the rest working. Thanks again!
    • Jeff Hewitt
      Jeff Hewitt over 10 years
      @weronika You're most welcome :). From what you say, it seems that a kernel upgrade is what caused the breakage. If the upgrade upgraded your kernel, your bootloader (GRUB/Lilo?) will probably provide alternative entries for booting with the older kernel. If that's the case, can you try booting into one of these and seeing if things work?
    • morrows_end
      morrows_end over 10 years
      @JosephR. You're right, if I boot with 3.5.0-41-generic, everything works! (The default is 3.5.0-030500-generic - I don't actually know which one is newer or what the difference is, hmm.)
    • Jeff Hewitt
      Jeff Hewitt over 10 years
      @weronika I don't know either. The moral of the story: keep the driver source(s) and compilation instructions (e.g. symlink /lib/modules/$(uname -r)/build before compiling) somewhere you can easily return to for future upgrades.
    • morrows_end
      morrows_end over 10 years
      @JosephR. Yup! I posted an answer here, and saved the info for myself so I can refer to it next time. I'm so glad you thought of the kernel thing! I wouldn't have, and it fixed all the various problems I was having.
    • BurninLeo
      BurninLeo over 6 years
      I had this issue after updating the kernel within Ubuntu 16.04. Unbelievable: The sudo apt-get install linux-headers-$(uname -r) plus a reboot was all it needed to get the network back. Wonderful!
  • Tim
    Tim over 9 years
    I think I might have a similar problem. unix.stackexchange.com/questions/163276/… and unix.stackexchange.com/questions/163028/…. I need to figure out which linux-headers will work.
  • Admin
    Admin almost 2 years
    Do you have any suggestion if my min, max and nothing in between supported versions are not found in git repo?