Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1
    Manually    loading or  unloading   the new device’s    kernel  module  with    the
modprobe command

The following sections explain these methods in greater detail.


Editing the /etc/modprobe.conf File

The /etc/modprobe.conf file might not be present when you first look
for it, so you might need to create a blank file in a text editor. You can
manually edit the /etc/modprobe.conf file to add a module dependency
entry (also known as a directive) to support a new NIC or another network
device. This entry includes the device’s name and its corresponding kernel
module. After you add this entry and reboot, the Linux kernel recognizes your
new networking hardware. Ubuntu runs a module dependency check upon
booting.


For example, if your system uses a RealTek NIC, you could use an entry like
this:


Click here to view code image
alias eth0 8139too


This entry tells the Linux kernel to load the 8139too.o kernel module to
support the eth0 network device.


On the other hand, if you have an Intel Ethernet Pro NIC installed, you use an
entry like this:


Click here to view code image
alias eth0 eepro100


You can pass other parameters to a kernel module using one or more optional
entries, if needed, to properly configure your NIC. See the
modprobe.conf man page for more information about using entries. For
more specifics regarding NIC kernel modules, examine the module’s source
code. (No man pages are yet available—which presents a good opportunity
for anyone willing to write the documentation.)


Using modprobe to Manually Load Kernel Modules

You do not have to use an /etc/modprobe.conf entry to initialize kernel
support for your new network device. As root (using sudo), you can
manually load or unload the device’s kernel module using the modprobe
command along with the module’s name. For example, use the following

Free download pdf