When I built my own PC, Ubuntu was not recognizing the Realtek onboard wired LAN of Mazabo (ASUS). Therefore, leave the procedure until the wired LAN is opened. After installing Ubuntu, I think that it may not be possible to connect to the Internet by wire ...
--Implementation time: December 2020
The compile environment (build-essential) must be installed on the target PC to install the driver. Normally, "sudo apt install build-essential" will solve the problem, but this is not possible because the target PC does not connect to the Internet. So
If you type the following on the target PC, the URL of the deb file required for that package will be output as a list. (The following'build-essential'is the package name for apt install)
sudo apt-get --print-uris install build-essential | cut -d\' -f2 | grep http:// > urls.txt
If you get the error "no installation candidate", select'Main server'for Downloads from Software & Updates. By the way, the urls.txt output this time was as follows.
http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc-dev-bin_2.27-3ubuntu1.2_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.15.0-112.113_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-dev_2.27-3ubuntu1.2_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-8/libitm1_8.4.0-1ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-8/libatomic1_8.4.0-1ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/libasan4_7.5.0-3ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-8/liblsan0_8.4.0-1ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-8/libtsan0_8.4.0-1ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/libubsan0_7.5.0-3ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/libcilkrts5_7.5.0-3ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-8/libmpx2_8.4.0-1ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-8/libquadmath0_8.4.0-1ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/libgcc-7-dev_7.5.0-3ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/gcc-7_7.5.0-3ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/gcc_7.4.0-1ubuntu2.3_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/libstdc++-7-dev_7.5.0-3ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/g++-7_7.5.0-3ubuntu1~18.04_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/g++_7.4.0-1ubuntu2.3_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/m/make-dfsg/make_4.1-9.1ubuntu1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg-dev_1.19.0.5ubuntu2.3_all.deb http://archive.ubuntu.com/ubuntu/pool/main/b/build-essential/build-essential_12.4ubuntu1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/f/fakeroot/libfakeroot_1.22-2ubuntu1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/f/fakeroot/fakeroot_1.22-2ubuntu1_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/liba/libalgorithm-diff-perl/libalgorithm-diff-perl_1.19.03-1_all.deb http://archive.ubuntu.com/ubuntu/pool/main/liba/libalgorithm-diff-xs-perl/libalgorithm-diff-xs-perl_0.04-5_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/liba/libalgorithm-merge-perl/libalgorithm-merge-perl_0.08-3_all.deb http://archive.ubuntu.com/ubuntu/pool/main/m/manpages/manpages-dev_4.15-1_all.deb
Copy this urls.txt file to a USB memory, take it to a PC connected to the net, and download all deb files with wget. Put the downloaded deb file in one folder (for example, deb folder) and copy it to the target PC (for example, Downloads folder). Go to that folder and use dpkg to extract and install the deb file
cd Downloads/deb
sudo dpkg -i *.deb
The second linux-libc-dev_4.15.0-112.113_amd64.deb from the top was downloaded from here using a browser because the link was broken and wget could not be done.
Check and there seem to be several ways to install the package offline, but I think this is probably the easiest if you are going offline temporarily like this time.
There is a build-essential deb file in the live USB pool folder, but don't install it with dpkg! Since it depends on many other packages (above), there is no such thing. Without this, an error will occur, and as a result, apt itself will be broken (experience story).
Confirm that the onboard LAN is Realtek R8125 with the lspcl command
lspci | grep net
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 04)
On a PC connected to the Internet, download "2.5G Ethernet LINUX driver ..." at the top of the figure below from here, and copy it to any folder on Ubuntu using a USB memory etc. I went with a wireless LAN connected
In the terminal, go to that path and unzip it
tar -jxvf r8125-9.004.01.tar.bz2
There is a procedure in here, and it worked if I followed it. The procedure I took is as follows
Go to the path of the folder you unzipped above (such as Downloads/r8125-9.004.01) and create a new file with vim You can also use a text editor. Copy and paste the contents below However, PACKAGE_VERSION should be rewritten to that of the downloaded driver. It seems that this file does not require re-registration of the driver even if the kernel is updated in the future. To put it the other way around, if you don't have this file, you may not be able to use the onboard LAN before you know it.
PACKAGE_NAME="r8125"
PACKAGE_VERSION="9.004.01"
BUILT_MODULE_NAME[0]="$PACKAGE_NAME"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
REMAKE_INITRD="YES"
CLEAN="rm src/@[email protected] src/*.o || true"
Name the file dkms.conf and save it in the current path After saving, I changed the authority just in case
sudo chmod 777 dkms.conf
If you already have an older version of the driver installed, do the following Of course, change the version number to that older version
sudo dkms remove r8125/9.002.02 --all
sudo rm -rf /usr/src/r81259.002.02/
sudo dkms status
Move this folder to/usr/src and register the driver with autorun.sh in the same folder. Again, change the version in the same way as above
cd
sudo cp -R Downloads/r8125-9.004.01/ /usr/src/r8125-9.004.01
cd /usr/src/r8125-9.004.01
sudo bash autorun.sh
After rebooting, I couldn't connect to the network again Do the following here
cd /usr/src/r8125-9.004.01
sudo bash autorun.sh #This will connect you to the internet
sudo apt install dkms
sudo dkms add -m r8125 -v 9.004.01 #Register the driver with dkms
I thought that the last process was in autorun.sh, but it doesn't seem to be the case After the implementation, everything is going well
Immediately after installation, Ubuntu 16 and 18 and 20 will recognize your USB wifi adapter and connect to the net, so this is unrelated work for such people
that's all
Recommended Posts