In this video, I'd like to explain how drivers are loaded in Linux.
When Linux is installed, an initial RAM drive or initrd or
an initial RAM file system which is init ramfs is generated.
This is an image that is loaded by the Linux kernel while it is booting. And it contains drivers
that were detected while installing. And that makes sure that you can work with all of your hardware.
This is for essential hardware only. There's also other hardware. This other hardware is taken care of by a
systemd process which is called SYSTEMD UDFD and that is happening while booting or when the hardware is connected.
Systemd UDFD is also a plug and play manager that allows you to load hardware on demand.
Occasionally you can use the modprobe command to load kernel modules manually.
And these kernel modules are drivers. So that is actually pretty important.
Let's talk about kernel modules a little bit more.
If you want to know which drivers are loaded, LSMOD is
a command to use and LSMOD shows currently loaded kernel modules.
LSPCI is also a useful command. It shows PCI devices in the minus
K will show you kernel modules that are loaded for these specific devices.
A little bit less important is LSUSB, which will show USB devices.
ModProbe is what you can use to load kernel modules manually. And modprobe
R is used to remove kernel modules from memory. Let me show you.
Okay, I'm using sudo lsmod and that is showing all the modules that are available.
Now that doesn't mean too much and that is why I rather use sudo lspci k which
is showing the PCI bus and and for every device on the PCI bus it also shows
the kernel module. So here we have the Ethernet controller for instance, with the kernel module E1000E.
Now kernel modules by itself are interesting.
The Linux kernel, the open source kernel, provides modules for most of the
devices. But for some devices you would rather have the proprietary kernel module.
Imagine for instance that you have installed an expensive Nvidia card in your system to perform AI calculations. You
really need the proprietary driver. That's a little bit beyond the scope of what we are doing here.
For here I would like you to be able to investigate what is going on.
So do we see anything for video grab video? Do we have anything?
Oh no, probably grabbing the wrong thing.
Well then we need to look here. Oh look there we have the
VGA compatible controller which is VMW GFX, the VMware graphics driver that's provided
by the virtualization tools and there's nothing you want to change that.
So ModProbe ModProbe R, that's a little bit less common because that is what you
would use to manually load modules, and that's something that you don't do too often.
LSUSB is interesting if you have connected USB devices. LSUSB is giving information
about the USB bus and all the devices that were found there.