How does Linux add functionality on the fly?

Поділитися
Вставка
  • Опубліковано 22 сер 2024
  • Linux Modules is how we add new devices and new features to the Linux kernel when we only want to use them selectively. Maybe one server needs them and another server doesn't. Rather than compile them into the kernel we can simply load them real time, when we need them. Today I am going to look at Loadable Modules in Linux, what came before, why we need them and how do they work. I also describe three commands for inspecting and managing modules on your system.
    Cover Photo: By Maxi Gagliano - Pexels
    Support me on Patreon: / djware
    Follow me:
    Twitter @djware55
    Facebook: / don.ware.7758
    Discord: / discord
    Gitlab: gitlab.com/djw...
    "Brightly Fancy" Kevin MacLeod (incompetech.com)
    Licensed under Creative Commons: By Attribution 4.0 License
    creativecommons...
    "Militaire Electronic" Kevin MacLeod (incompetech.com)
    Licensed under Creative Commons: By Attribution 4.0 License
    creativecommons...
    Werq by Kevin MacLeod
    Link: incompetech.fi...
    License: filmmusic.io/s...
    Industrial Cinematic by Kevin MacLeod
    Link: incompetech.fi...
    License: filmmusic.io/s...
    Music Used in this video
    "NonStop" Kevin MacLeod (incompetech.com)
    Licensed under Creative Commons: By Attribution 3.0 License
    #Linux #LinuxSkills #LinuxCertification

КОМЕНТАРІ • 44

  • @act.13.41
    @act.13.41 Рік тому +22

    I would never want to go back to those days where we had to keep track of interrupts and IOs and set them via jumpers on each card.

    • @CyberGizmo
      @CyberGizmo  Рік тому +7

      Me either or communicating with RS-232. Another place to waste tons of time.

    • @wilfredv1930
      @wilfredv1930 Рік тому +2

      Yes but I bet it was happy time in that moment.

    • @andrewreed1329
      @andrewreed1329 Рік тому +2

      yeah i remember having two sounds card (roland and a soundblaster) and setting them differently, irq 5 and 336 for the roland, didn’t need the printer

    • @grnbrg
      @grnbrg Рік тому +2

      @@CyberGizmo - "... or communicating with RS-232."
      * cries in Arduino.... :...-(
      :D

  • @dezmondwhitney1208
    @dezmondwhitney1208 Рік тому +6

    I can still remember the days of Interrupts etc and the likelihood of problems occurring. Thanks for this.

  • @theplaymakerno1
    @theplaymakerno1 Рік тому +2

    Such an underrated channel :(

  • @andrewpalm2103
    @andrewpalm2103 Рік тому +10

    Thanks, DJ, this was very informative!

    • @CyberGizmo
      @CyberGizmo  Рік тому +3

      Hi Andrew glad you found the video of use :)

  • @alx8439
    @alx8439 Рік тому +2

    Just lovely. Thanks for this introduction. It's way more informative, compared to what other youtubers do, while just doing distrohopoing on camera :) we need more coverage of the linux kernel magic.
    It migh help a bit, if a person is bit in the arduino topic, where you have to do things like I2C or SPI in order to communicate with various devices

  • @albertogonzalez5114
    @albertogonzalez5114 Рік тому +3

    Awesome episode, really useful troubleshooting guidelines. Thanks so much!

  • @guilherme5094
    @guilherme5094 Рік тому +2

    Thanks DJ, great video👍!

  • @emvdl
    @emvdl Рік тому

    Great to watch @DJ

  • @olaeriksson9714
    @olaeriksson9714 Рік тому

    That was one of the "What is really in this Linux system?" questions, I wish I knew 10 years ago...
    Thanks you and the google logarithms for that one.

  • @grnbrg
    @grnbrg Рік тому +1

    Two other answers to "What problems were there that kernel modules were developed and designed to solve?"...
    Firstly, even in the early days, Linux supported a vast number of devices. If they all had to be compiled into the kernel, the result would be huge, bloated with vast amounts of code that the average system would never use. On the other hand, thousands of modules that are only loaded (or even built) when required results in a much more reasonably sized main kernel.
    The second problem is tied to the fact that the Linux kernel is distributed under the GPL. There have always been (and still are) vendors who were unable or unwilling to release the source code for the driver for their device, or or other functionality. (ie: ZFS) The GPL is clear - if GPL code is included in a binary, then the source for *everything* in the binary must be made available. A vendor could certainly create a modified version of a monolithic Linux kernel that supported their device, or implemented their special functionality, but they would be unable distribute it without violating the GPL. Kernel modules solve this, as modules are distinct entities, and and as such can be distributed under any license preferred by the vendor, and still be legally loaded into the GPL'd kernel.

  • @cyclonus01
    @cyclonus01 Рік тому +3

    This is a great series. Thanks for putting these videos together.

  • @themistoclesnelson2163
    @themistoclesnelson2163 Рік тому

    Great video! Very easy to understand.

  • @adjusted-bunny
    @adjusted-bunny Рік тому +1

    Thanks for this very informative and concise video.

  • @strayling1
    @strayling1 Рік тому

    Cool use of the $(cmd) syntax. I've always used backtick: `cmd` to do more or less the same thing.

  • @YehiaElHady
    @YehiaElHady Рік тому

    Thanks!

  • @subee128
    @subee128 6 місяців тому

    Thanks

  • @rashie
    @rashie Рік тому

    👍👍- Thanks !

  • @billfarley9015
    @billfarley9015 Рік тому +1

    I found a long command for listing aliases then I discovered 'alias -p' which does the same thing. Making lsmod an alias for 'lsmod | sort | more' seems useful.

  • @JanBruunAndersen
    @JanBruunAndersen Рік тому

    Ahh yes. The good, old days of Plug & Pray hardware which was supposed to resolve conflicts automatically.

  • @adokapo
    @adokapo Рік тому +1

    Amazing content but please put some lighting in.

    • @CyberGizmo
      @CyberGizmo  Рік тому

      Actually wrong setting on the camera, was fixed in the next video

  • @barkataligulzari5209
    @barkataligulzari5209 Рік тому

    When doing modinfo for built-in module in kernel (module compiled in kernel)
    #modinfo hci_pci
    filename (built-in)
    And for other module (not compiled in the kernel) you would not see this "filename (built-in)".
    Rather the absolut path of the module.

  • @AlexanderDemin
    @AlexanderDemin Рік тому +2

    Great content. Though would it be possible to use the whole screen when you are showing the console? I'm sure your desktop looks awesome, but it is 100% irrelevant to the watcher. Watching your videos on a small screen like iPhone is a real pain. Most of the watchable area of the screen is wasted.

  • @nigeltrigger4499
    @nigeltrigger4499 Рік тому +1

    The Home key is easier/faster than left arrow key, to get to the beginning of a line - different key strokes for different folks? :)

    • @abstractapproach634
      @abstractapproach634 Рік тому

      Thank you, I finally know I pressed something and you reminded me, also doesn't page down go to the end?

    • @strayling1
      @strayling1 Рік тому

      I use ctrl-A. All the EMACS line maneuvering shortcuts work, and my muscle memory thanks the devs for it.

  • @jimmyrichards5595
    @jimmyrichards5595 Рік тому

    Hi. I'm running Garuda Linux, an Arch based distro. I get output from lsmod and modinfo. But I do not have a /proc/modules
    Have anything to do with the fact that I'm using DKMS?

  • @cantdance3077
    @cantdance3077 Рік тому

    I know this is off topic, but are initial resource management numbers for Linux DE's indicative of how well resources are managed after apps and programs are added.

  • @user-mr3mf8lo7y
    @user-mr3mf8lo7y Рік тому

    I wonder if you interested in making a video about Linux vs FreeBSD. Cheers,.

  • @cjveeneman
    @cjveeneman Рік тому

    the dry run for remove is somewhat pointless and perhaps why it lied. The 'used by' count must be 0 and for all.

  • @jort93z
    @jort93z Рік тому +1

    whats the point of dry run if it does something else after the dry run? lmao.

  • @BennyPowers
    @BennyPowers Рік тому

    wonder how hard it would be to derive your root password from the sound of you typing it out?

    • @CyberGizmo
      @CyberGizmo  Рік тому

      Assuming I am using my root password, and assuming I dont just throw away these virtual machines when done and assuming I dont generate random keyboard noises for the video....:)

  • @midnightwatchman1
    @midnightwatchman1 Рік тому

    Please glaze me over. we come here for the real stuff

  • @sotecluxan4221
    @sotecluxan4221 Рік тому

    I see, how little I know.

  • @kreuner11
    @kreuner11 Рік тому

    This says nearly nothing about *how* Linux loads and runs these modules, like the title says

  • @ColouristRHS
    @ColouristRHS Рік тому

    man I missed this kind of tutorials lol. Great work here, thanks!!!