Modprobe device command not permanent

Modprobe r8169 command works fine, but when I reboot, it loses the config.

How do I make it permanent?

Here you go…

man modules-load.d
man modprobe.d

Thanks so much for the quick response.
Tried what the man said, but it didn’t work.

vi /etc/udev/rules/70-persistent-net.rules

shows the ethenet installed from a manual config, so I deleted all network devices (Have a wifi card that I don’t use anymore) from the file , saved it, rebooted and now in that file is only the wifi, not the ethernet. Why doesn’t udev find my ethernet card like it used to?
Kernel Version: 5.5.11-lp151.28-13-default

??? Where did you read that? Add the module like this eg /etc/modules-load.d/20-custom.conf

# Load r8169.ko at boot
r8169

BTW, ordinarily I would expect this module to load automatically. You should show us what is reported by the following

/sbin/lspci -nnk | grep -iA3 net
02:00.0 **Net**work controller [0280]: Intel Corporation Wireless 8260 [8086:24f3] (rev 3a)
        Subsystem: Intel Corporation Dual Band Wireless-AC 8260 [8086:0010]
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi
--
05:00.0 Ether**net** controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ether**net** Controller [10ec:8168] (rev 15)
        Subsystem: ASUSTeK Computer Inc. Device [1043:8677]
        Kernel driver in use: r8169
        Kernel modules: r8169

The above was AFTER modprobe r8169

This below is BEFORE modprobe r8169 but AFTER reboot

02:00.0 **Net**work controller [0280]: Intel Corporation Wireless 8260 [8086:24f3] (rev 3a)
        Subsystem: Intel Corporation Dual Band Wireless-AC 8260 [8086:0010]
        Kernel driver in use: iwlwifi
        Kernel modules: iwlwifi
--
05:00.0 Ether**net** controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ether**net** Controller [10ec:8168] (rev 15)
        Subsystem: ASUSTeK Computer Inc. Device [1043:8677]
        Kernel modules: r8169

Also, 20-custom-config didn’t work, so I copied 20-custom-config to /usr/lib/modules-load.d/
Still have to reboot to see if it worked

I noticed that i named the file 20-custom-config instead of 20-custom.config. Fixed it and rebooting now.

The module is loading at boot as expected (based on the above). You don’t need to do anything explicitly.

The files need to have *.conf naming. However, you don’t need to do this explicitly.

Shoot, I made a third mistake. .config instead of .conf. fixing that now and rebooting. we’ll see!!!

the file 20-custom.conf was renamed to the correct name and in the directory /etc/modules-load.d/, but it didn’t work.
Now I am moving the file to the directory /usr/lib/modules-load.d/ and rebooting.

Well, doing explicitly doesn’t work. File 20-custom.conf in either directory /etc/modules-load.d/ or /usr/lib/modules-load.d/ didn’t work

I do this to check to see if it working right after a reboot:

Linux-box:/home/user # ifstatus eth0
eth0            no-device

How do I fix this as the interface will not work until I do a modprobe r8169?

You’re not reading the replies. You shouldn’t need to be doing this at all. Are you using wicked or NetworkManager? If using wicked there has been a recent regression that may well be impacting here

https://forums.opensuse.org/showthread.php/539594-Wifi-not-starting-on-boot?highlight=wicked
In particular, this bug report…
http://bugzilla.opensuse.org/show_bug.cgi?id=1166933

I am using wicked and I think I found the problem:

Linux-box:/etc/udev/rules.d # udevd update
Network interface NamePolicy= disabled by default.

Is this a clue to what could be wrong?
I read the replies and understand that I don’t need to do anything explicitly. I am sorry I wasn’t clear about that in my replies, but I think I have stumbled upon the culprit. Please help!!!

My wifi was working perfectly, but I removed the wlan0 card from the tower and now I only have the ethernet port on my motherboard.
I skimmed through the two links and didn’t see anything that pertained to my problem. Thanks anyways.
I guess you all went to bed as you’re not replying to the clue I found.

Linux-box:/etc/udev/rules.d # udevd update
Network interface NamePolicy= disabled by default.

I found my problem. There was an entry in /etc/modprobe.d/blacklist.conf for the r8169.
I deleted it and rebooted and it worked. Closing issue.

Yes, blacklisting would do it…although the output you shared earlier showed that it was loaded in any case. Not always easy to assist from a distance. :wink:

Well that probably means that you are using NetworkManager then. We can only speculate without the definitive info.

I guess you all went to bed as you’re not replying to the clue I found.

We’re all volunteers, with other priorities as well, and often in different time zones.