Leap 15.6 Realtek-8126

I have built a new computer, it is an MSI Pro Z890-P and has a LAN Realtek 8126 5G. My question is; does the latest version of Leap have the drivers for this board so it installs without having the problems of installing them later.
Thank you

Supported by the build in driver r8169.

1 Like

I have tried to install leap15.6 it did not find the network card drivers. So, I completed the installation. The computer rebooted and started the old installation, it did not write to the hdd. What has happened. Please disregard the email. Thank you

Post:

/sbin/lspci -nnk | grep -iA3 net

I can’t do that I have no operating system. It tries to boot the old OS but fails. What I don’t understand is why leap15.6 did not write to the hdd

Hello
I have managed to install leap15.6. Now I have to get the network running to that end, I have downloaded the drivers from Realtek’s web site. To install these drivers I need to run the autoinstall.sh script, but when I run the script I get this error

make[2]:***/lib/modules/6.4.0-150600.21-defaults/build No such file or directory

That’s is right there is no ‘build’ directory. What can I do?

Thank you, any help is appreciated

PS Here is a copy of the script
#!/bin/sh

invoke insmod with all arguments we got

and use a pathname, as insmod doesn’t look in . by default

TARGET_PATH=$(find /lib/modules/$(uname -r)/kernel/drivers/net/ethernet -name realtek -type d)
if [ “$TARGET_PATH” = “” ]; then
TARGET_PATH=$(find /lib/modules/$(uname -r)/kernel/drivers/net -name realtek -type d)
fi
if [ “$TARGET_PATH” = “” ]; then
TARGET_PATH=/lib/modules/$(uname -r)/kernel/drivers/net
fi
echo
echo “Check old driver and unload it.”
check=lsmod | grep r8169
if [ “$check” != “” ]; then
echo “rmmod r8169”
/sbin/rmmod r8169
fi

check=lsmod | grep r8126
if [ “$check” != “” ]; then
echo “rmmod r8126”
/sbin/rmmod r8126
fi

echo “Build the module and install”
echo “-------------------------------” >> log.txt
date 1>>log.txt
make $@ all 1>>log.txt || exit 1
module=ls src/*.ko
module=${module#src/}
module=${module%.ko}

if [ “$module” = “” ]; then
echo “No driver exists!!!”
exit 1
elif [ “$module” != “r8169” ]; then
if test -e $TARGET_PATH/r8169.ko ; then
echo “Backup r8169.ko”
if test -e $TARGET_PATH/r8169.bak ; then
i=0
while test -e $TARGET_PATH/r8169.bak$i
do
i=$(($i+1))
done
echo “rename r8169.ko to r8169.bak$i”
mv $TARGET_PATH/r8169.ko $TARGET_PATH/r8169.bak$i
else
echo “rename r8169.ko to r8169.bak”
mv $TARGET_PATH/r8169.ko $TARGET_PATH/r8169.bak
fi
fi
fi

echo “DEPMOD $(uname -r)”
depmod uname -r
echo “load module $module”
modprobe $module

is_update_initramfs=n
distrib_list=“ubuntu debian”

if [ -r /etc/debian_version ]; then
is_update_initramfs=y
elif [ -r /etc/lsb-release ]; then
for distrib in $distrib_list
do
/bin/grep -i “$distrib” /etc/lsb-release 2>&1 /dev/null &&
is_update_initramfs=y && break
done
fi

if [ “$is_update_initramfs” = “y” ]; then
if which update-initramfs >/dev/null ; then
echo “Updating initramfs. Please wait.”
update-initramfs -u -k $(uname -r)
else
echo “update-initramfs: command not found”
exit 1
fi
fi

echo “Completed.”
exit 0

You could use the driver from here:
https://download.opensuse.org/repositories/home:/Sauerland:/hardware/openSUSE_Leap_15.6/x86_64/r8126-ueficert-10.014.01-lp156.3.1.x86_64.rpm
https://download.opensuse.org/repositories/home:/Sauerland:/hardware/openSUSE_Leap_15.6/x86_64/r8126-blacklist-r8169-10.014.01-lp156.3.1.x86_64.rpm
https://download.opensuse.org/repositories/home:/Sauerland:/hardware/openSUSE_Leap_15.6/x86_64/r8126-kmp-default-10.014.01_k6.4.0_150600.21-lp156.3.1.x86_64.rpm

Download these 3 rpms and install them.

They are build from the Realtek sources.

PS:
Next time please use Code-Tags for posting something from Terminal:
Code-Tags