0

I am very new to Linux. I just followed this YouTube video to create my personal nextcloud server.

I am stuck very early because the motherboard I am using is Asus B560m (with i5 11500) and Ubuntu does not recognize my Ethernet adapter.

I installed Ubuntu Server without access to the internet, however I now need to find a way to install the driver manually using terminal commands(new to Linux so please explain exactly how do I do it).

I suppose I have to download Realtek drivers and save them to USB (through another computer, of course). Then I have no idea how to install them, because I don't have a GUI on Linux Server and have no idea what commands to use. Found something on forum but didn't work for me.

Can you please explain to me exactly what steps do I have to follow?

many thanks

I have attached also commands results image 1 you asked me about.

image 2

sudo dmesg, uname -r and ip a results

Network config 1

Network config 2 After update and making usb ethernet worksscreen

LinuxBaby
  • 3
  • 1
  • 1
  • 4
  • Your kernel might be too old, since it should support your hardware. Have you seen [this](https://askubuntu.com/q/1259947/906933)? Or copy the output of lspci -vv (cut out the network part only) and paste it into your question – kanehekili Apr 15 '22 at 20:23
  • 1
    More precisely, may we see, in an edit to your question, the result of the terminal command: `lspci -nnk | grep 0200 -A3` and also: `cat /etc/netplan/*.yaml` Welcome to Ask Ubuntu. – chili555 Apr 15 '22 at 21:00
  • possibly silly question, but without internet and GUI how can I copy you the output? Only taking picture came to my mind.. – LinuxBaby Apr 15 '22 at 22:21
  • Copy it to a text document and transfer it on a USB key to another connected computer. We will look at a picture if that is the last resort. – chili555 Apr 15 '22 at 23:19
  • A very quick and fairly cheap workaround is to plug in a USB ethernet adapter that should work immediately. Once you have net on your box you can sort out the correct driver for your ASUS motherboard. – gris Apr 15 '22 at 20:54
  • When you installed Ubuntu, did the installer have network connectivity? – user535733 Apr 16 '22 at 02:25
  • guys, I don't have GUI and I have no idea how to copy files to USB using commands. I am new to Linux and I just want to follow youtube tutorial for creating server. – LinuxBaby Apr 16 '22 at 09:09
  • By the way, I put USB stick with ethernet port but it does not work either. And no, I didnt have internet connection during installation. I uploaded lspci -vv and lspci -nnk | grep 0200 -A3 and also: cat /etc/netplan/*.yaml To first post. Can you please advise what should I do now to make internet working? Many thanks I appreciate your help, I have looked at post kanehekili linked but it is too advanced for me to follow up – LinuxBaby Apr 16 '22 at 09:10
  • Even more if someone will tell me what to do step by step(rookie level) I will even more appreciate it because I honestly don' have time to study linux basics now.. Or youtube video might help if necessary to install driver for example, might be even better... Tried to find but all I found have GUI installed :/ – LinuxBaby Apr 16 '22 at 09:15
  • May we also see: `sudo dmesg | grep r816` and: `uname -r` Also, please insert the USB ethernet with a cable attached and show us: `ip a` Thanks. – chili555 Apr 16 '22 at 13:54
  • @chili555 I have edited post, third picture shows also dmesg, uname and ip command. – LinuxBaby Apr 17 '22 at 16:22
  • Do you have another Ethernet device? It might work better. – Thorbjørn Ravn Andersen Apr 18 '22 at 11:58

1 Answers1

1

In your log postings, we see that insertion of the USB ethernet device successfully created an interface; in this case enx503eaa220624.

In order to install the correct driver for the internal ethernet, internet connectivity is a practical requirement. Let's configure it in netplan:

sudo nano /etc/netplan/*.yaml

Edit the file to read:

network:
  version: 2
  renderer: networkd
  ethernets:
    enx503eaa220624:
      dhcp4: true
  

Netplan is very specific about spacing, identation, etc., so proofread carefully twice. Save (Ctrl+o followed by Enter) and exit nano (Ctrl+x followed by Enter).

Follow with:

sudo netplan generate
sudo netplan apply

The configuration should be effective immediately. Check:

ip a

If you got a valid IP address, then proceed. First, the kernel version you are running, 5.4.0-xx will not support the relatively new ethernet device R8125, so upgrade:

sudo apt update && sudo apt upgrade

After it completes, reboot. Follow with:

sudo apt update && sudo apt install r8168-dkms

Reboot. Your ethernet should now be working. Check:

ip a

Is there an interface, enp-something, for the internal ethernet? If so, please amend the netplan file as above but substitute the new interface, enp3s0, as an example, and follow with:

sudo netplan generate
sudo netplan apply 

Check to see if the new interface got an IP address:

ip a

If so, you're all set. If not, please post any errors or warnings.

EDIT: The required r8125 ethernet driver can be installed with:

sudo apt update
sudo apt-get install --install-recommends linux-generic-hwe-20.04

Reference: Can't get RTL8125B working on 20.04

Reboot.

chili555
  • 58,968
  • 8
  • 93
  • 129
  • unfortunatelly no luck :( I have added results to first post.. Can you look at it where might me a problem? Many thanks ! – LinuxBaby Apr 18 '22 at 09:11
  • In my answer, I said, "Netplan is very specific about spacing, identation, etc., so proofread carefully twice." All of your additions are flush left, not indented. Please correct and try again. Please see: https://pastebin.ubuntu.com/p/T4hmDttb4p/ – chili555 Apr 18 '22 at 13:19
  • I apologise for this. I tried it correctly this time and it worked, I followed your instructions, all went okay, but it still seems that internal ethernet is not working.. I have added screenshot to first post, seems the same even after all. What do you think? Any other options how to make it work? – LinuxBaby Apr 18 '22 at 20:45
  • Please see my edit above in a few moments. – chili555 Apr 18 '22 at 21:14
  • seems that internet is now working, many thanks! In topic you referred to they mentioned that "re-install the driver at some point in the future (e.g. after a kernal upgrade)." It might be possible I will again lose connectitivy through my ethernet. Is it still possible or it has been resolved in some update meanwhile? Is there easy way I can avoid loosing driver in future ? – LinuxBaby Apr 20 '22 at 10:44
  • I believe that linux-generic-hwe will update automatically and that you will not lose the driver. If you do, which I find very unlikely, please ask a new question and I'll be happy to help. If my answer has been helpful, please accept it: https://askubuntu.com/tour – chili555 Apr 20 '22 at 12:15