0

Context: I have a freshly built Ubuntu 18 machine. From a separate Macbook Pro laptop, I created a bootable USB stick with Ubuntu 18.04.4 which I did by following the instructions here for Mac OS. The installation seems to have worked, but I have no Internet. I have an Ethernet cable that is plugged directly into the machine, and I have been using this same Ethernet cable for the last four months on a different machine, and the wired connection worked fine. The network I am using is also the same one I use on my Macbook Pro laptop (which I'm using to type this) so the Internet is working.

First, after the fresh Ubuntu 18 installation, I saw that my wired connection was not working. (And, neither can I connect using WiFi.) Here is what I see:

$ sudo lshw -C network
  *-network                 
       description: Wireless interface
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 14.3
       bus info: pci@0000:00:14.3
       logical name: wlo1
       version: 00
       serial: ac:67:5d:f6:f7:a7
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.3.0-28-generic firmware=48.13675109.0 latency=0 link=no multicast=yes wireless=IEEE 802.11
       resources: irq:16 memory:51214000-51217fff
  *-network UNCLAIMED
       description: Ethernet controller
       product: Realtek Semiconductor Co., Ltd.
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       version: 05
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list
       configuration: latency=0
       resources: ioport:3000(size=256) memory:51100000-5110ffff memory:51110000-51113fff

$ uname -r 5.3.0-28-generic

This seems to be an issue with drivers, judging from these questions:

  • Question. The top answer (with one vote) suggests "the adapter will be managed by the kernel in-tree module" but I don't know what this means, and I cannot uninstall r8168-dkms as it isn't on the machine.
  • Question. The top answer suggests to use something called dkms. I get a command not found when typing dkms.
  • Question. This seems related but is talking about WiFi. I am trying to get my wired connection to work, which I was hoping would be as simple as plugging my Ethernet cable in the machine.

I tried to follow the designated answer to the first question (this answer specifically). I downloaded the latest version of the driver here on my Macbook, put it on my USB stick, then transferred it to my Ubuntu machine. Then I ran it:

$ tar xfvz r8168-8.048.03.tar.gz 
r8168-8.048.03/
r8168-8.048.03/Makefile
r8168-8.048.03/README
r8168-8.048.03/autorun.sh
r8168-8.048.03/src/
r8168-8.048.03/src/Makefile
r8168-8.048.03/src/Makefile_linux24x
r8168-8.048.03/src/r8168.h
r8168-8.048.03/src/r8168_asf.c
r8168-8.048.03/src/r8168_asf.h
r8168-8.048.03/src/r8168_dash.h
r8168-8.048.03/src/r8168_fiber.h
r8168-8.048.03/src/r8168_n.c
r8168-8.048.03/src/r8168_realwow.h
r8168-8.048.03/src/rtl_eeprom.c
r8168-8.048.03/src/rtl_eeprom.h
r8168-8.048.03/src/rtltool.c
r8168-8.048.03/src/rtltool.h

$ cd r8168-8.048.03/

$ sudo ./autorun.sh Check old driver and unload it. Build the module and install ./autorun.sh: 30: ./autorun.sh: make: not found

Unfortunately this doesn't work because my machine doesn't have make or build-essentials.

$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package build-essential is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'build-essential' has no installation candidate

$ sudo apt-get update Err:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease Could not resolve 'us.archive.ubuntu.com' Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease Could not resolve 'security.ubuntu.com' Err:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease Could not resolve 'us.archive.ubuntu.com' Err:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease Could not resolve 'us.archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not resolve 'us.archive.ubuntu.com' W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Could not resolve 'us.archive.ubuntu.com' W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Could not resolve 'us.archive.ubuntu.com' W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Could not resolve 'security.ubuntu.com' W: Some index files failed to download. They have been ignored, or old ones used instead.

So then I am curious about how to get all of these installed (build-essential, make, and similar commands, perhaps dkms) on a machine that doesn't have Internet working? Searching results in these questions:

  • Question. This one says to do a sudo apt install command, but as shown above, that is not working.

  • Question. This one didn't get much attention and the answerer only has several imperfect solutions.

  • Question. The answerer suggests running another sudo apt command. Here it is:

    $ sudo apt-get -qq --print-uris install build-essential linux-headers-$(uname -r) | cut -d\' -f 2 > urls.txt
    E: Package 'build-essential' has no installation candidate
    

    As shown there, I am running into errors since it comes down to lacking build-essential.

  • Question. This old question and the discussion here seems to suggest using apt-offline. However, it requires a sudo apt install apt-offline to install in the first place. :)

Just to be clear, when people build new machines and then install Ubuntu 18 with a bootable USB, how exactly is Internet "enabled" on the machine? Is there a step I am missing in the process? I thought I just needed to plug in my Ethernet, so I must be misunderstanding something.

TL;DR: I am looking for the simplest way to get wired Internet connection (as well as build-essential, since that seems heavily related) on a freshly built Ubuntu 18.04 machine, perhaps by downloading something on a USB stick on my Macbook Pro, but I will take any solution that works. Thanks!


Update 1: to be specific, I downloaded the Desktop version onto my USB stick. I downloaded the .iso version highlighted here, the one that is 2.0G:

enter image description here

And you can find the list here.


Update 2: Here are some potentially relevant commands:

$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

$ cat /etc/netplan/*.yaml

Let NetworkManager manage all devices on this system

network: version: 2 renderer: NetworkManager


Update 3: here are some relevant machine specifications:

  • Intel i7-10700k CPU
  • Gigabyte Z490 Aorus Elite Motherboard (this is what I ordered)

Update 4: I ended up buying this cheap USB WiFi adapter, and all I had to do to get WiFi was to just plug it in my computer. No other things necessary. Whew ... now I just need to figure out how to get the Ethernet working ...


Update 5: I tried following these instructions to run sudo apt-get install r8168-dkms and rebooted, but the wired ethernet is still not working.


Update 6: resolved. :) I bought a USB to Gigabit Ethernet adapter, and this caused the wired connection to work right away. This is the one I got, since I saw that it was compatible with Linux. I did not upgrade the BIOS.

  • Did you install Ubuntu Desktop, or Ubuntu Server? Edit your question and show me cat /etc/network/interfaces and cat /etc/netplan/*.yaml. What make/model computer? Start comments to me with @heynnema or I'll miss them. – heynnema Sep 25 '20 at 14:41
  • @heynnema Thank you very much for your comments! I updated my question. I hope this clarifies things. – ComputerScientist Sep 25 '20 at 14:55
  • For what it's worth I just ordered a wireless WiFi USB adapter, and it should come tomorrow, in case that would be easier than this whole Ethernet cable connection, though I am still trying to get my Ethernet connection to work for the best long-term solution. – ComputerScientist Sep 25 '20 at 15:03
  • Show me sudo dmidecode -s bios-version. – heynnema Sep 25 '20 at 15:16
  • @heynnema It reports F2 – ComputerScientist Sep 25 '20 at 16:32

2 Answers2

1

What you need is not just downloading build-essential and make, these packages depend on many other packages and you need all of them.

Also in order to build the network cards driver for your machine, probably you need some other libraries.

If you have access to another Ubuntu machine (or VM), you can download any package in your working directory using this command:

apt-get download <packages name here>

like this:

apt-get download build-essential make libc6-dev g++ gcc dpkg-dev libc

then copy the packages using a USB disk and install them on the target machine using dpkg or apt.

sudo dpkg -i <path to .deb file here>

or

sudo apt-get install <path to .deb file here>

if you need to find the dependencies of a package you can search it in Ubuntu Packages

  • Thanks, I will try this. Just a minor comment, is the last libc redundant, as you are already downloading libc6-dev? – ComputerScientist Sep 25 '20 at 14:15
  • Hmm ... seems like when I run sudo dpkg -i commands, each debian file will complain that other packages are not installed. For example, the dpkg on the g++ file will complain that g++-7 is not installed, but that's a chicken-and-egg problem as I am trying to install a package, and Ubuntu is telling me I need that package there first? :) I wonder if the ordering of packages installed matters? – ComputerScientist Sep 25 '20 at 14:23
  • I think that you should download all the dependencies (find them from Ubuntu Packages) and install all of them in single dpkg/apt command like apt-get install ./*.deb – M.A. Heshmat Khah Sep 25 '20 at 16:23
  • the libc6-dev package contains the header files and codes that may be required for compiling other packages, the libc package contains the binary files. more information is available on Ubuntu Packages – M.A. Heshmat Khah Sep 25 '20 at 16:33
  • Your suggestion makes sense in general, though I did not need to do that for my particular solution. – ComputerScientist Oct 02 '20 at 14:28
  • I will accept this answer because it was useful for me to figure out how to get packages installed without internet access. – ComputerScientist Oct 14 '20 at 13:33
1

BIOS

Gigabyte Z490 Aorus Elite

You have BIOS version F2.

There's a newer BIOS available, version F5d, from 7/9/2020, and can be downloaded here.

Note: Confirm that I have the correct web page for your motherboard.

Note: Have good backups before updating the BIOS.

heynnema
  • 70,711
  • Thank you for the answer. I can confirm the link and webage is the correct one for my motherboard. Just to be clear: are you aware if there were issues with older BIOS versions and the network connection in particular? Also regarding backups, do you mean backups of the old BIOS version? I have no data on this new machine so it's fine if this BIOS update wipes out all data on the machine. Looks like I will follow this for updating: https://www.howtogeek.com/196916/how-to-check-your-bios-version-and-update-it/ – ComputerScientist Sep 25 '20 at 17:12
  • @ComputerScientist Your BIOS is so old, anything can be broken, and the web site doesn't articulate differences dating back to F2 era. Update the BIOS, recheck network, and report back. re: backups... I meant data backups. Good luck! – heynnema Sep 25 '20 at 17:28
  • @ComputerScientist Status please... – heynnema Sep 30 '20 at 15:16
  • @heynema, I ended up fixing the issue (just now) by buying a USB to ethernet adapter, and now the wired internet works. I will update the question. – ComputerScientist Sep 30 '20 at 15:17
  • @ComputerScientist Did you update the BIOS? – heynnema Sep 30 '20 at 15:24
  • @ComputerScientist Status please... – heynnema Oct 02 '20 at 02:41
  • Apologies! I did not upgrade the BIOS. It looked a bit complex to do so for this motherboard with Ubuntu. The USB adapter worked, so the wired connection is functional. However, your suggestion makes sense in general. – ComputerScientist Oct 02 '20 at 14:27