Loading a custom driver automatically at boot time
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Loading a custom driver automatically at boot time
I have a hardware driver which I must build by hand from the vendor's Git repository. That part works fine, though I would prefer an official, generic APT package. The module loads manually no problem, but what do I change and where in order to have the module loaded at boot time?
Because I find GRUB2 terribly confusing, difficult, risky, and overly complex. I can see the GRUB2 route working if I can figure it out after a lot of experimental reboots. But I'd like to postpone that approach if possible.
I was hoping that there would simply be a file somewhere in /etc/ where I could list the module, perhaps with full path if necessary, and it would be loaded upon boot.
Then the initrd is the way to go. Just rebuild the initrd, or add your module to /boot-initrd-tree and rebuild it without clearing the tree. Being honest, with uefi I use elilo.
What I found was that on the EFI partition, in the EFI directory, there's a directory for each boot option like this
Code:
tree /boot/efi
/boot/efi
└── EFI
├── Boot
│** └── bootx64.efi
├── Microsoft
[SNIP VAST REAMS OF PURE M$ WASTE OF SPACE]
└── Slackware
├── elilo.conf
├── elilo.efi
├── initrd-5.15.27.gz
└── vmlinuz-generic-5.15.27
The efi is the executable, the kernel & initrd are there, & elilo.conf. There'll be something similar for all the other boot options
EDIT: You don't appear to have boot options in elilo.
Last edited by business_kid; 08-30-2022 at 04:28 AM.
Thanks. I tried putting the name in a .conf file there, both just the module.ko and the full path. Neither caused the module to load on boot. So I am missing something in the process.
I'll look at GRUB2 next when I can plan some reboots.
There used to be a modprobe file or a modprobe.d directory to put that kind of thing in. But I'm pretty sure it didn't use the .ko suffix in module names.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.