How do I load module on boot-up for device that is not detected?
I need to load pata_via for IDE controller that is not detected on bootup.
I tried to enter module manually via (KDE) Administrator Settings -> System -> Kernel Settings … here I add pata_via for VIA IDE controler at 0:0f.0tha
That creates configurarion file /etc/modprobe.d/50-newid.conf:
Note that after you have built your kernel modules you do should not need to remake your mkintrd or rebuild your modules, just load your modules as described, your mobules should then load not when GRUB loads but late in the system boot process and be available long before the time you login.
If the module already exists, then just load the module as described…
Requires testing but likely won’t require adding to the initrd.
Nowadays, kernel modules can be built into the base initrd, and generally those are determined by our openSUSE/SUSE maintainers.
But we Users can modify by dynamically loading additional modules as needed (BTW - I’d be very surprised if the module to support PATA is not already loaded but anything is possible and I haven’t checked) and would not be added to the initrd. Nowadays, I see us mostly running mkinitrd to modify configurations in the initrd, not adding modules. Also, disks can be mounted a few different ways which can afford flexibility if there is some kind of timing issue.
If I were troubleshooting this,
The following assumes the problem disk is a system disk and not a removable disk, which usually means the PATA controller is installed in something like a PCI (or ancient ISA) slot and bus. If the interface/card is installed in something like a USB, PCMCIA or Firewire slot there might be complications.
I’d probably start with a default openSUSE and simply attempt to mount the disk manually, if successful that would indicate that the necessary parts including any kernel module is fully loaded by the time the User logs in.
Assuming that the disk can be mounted by the User without any special system modification (like loading a kernel module), my next step might be try to determine why udev isn’t finding the disk and mounting in fstab during boot… For instance is there a problem with the device vendorid:deviceid?
But even before all of this, of course, you need to verify the BIOS/UEFI is able to find the disk.
To clear this case out…
Actually a problem is with stock kernel/initrd not loading proper module on boot-up.
Motherboard is Asus [LEFT]P5VD2-VM that has Via IDE controller and I have IDE HDD for installation.
I did workaround by attaching disk to SATA port via IDE-SATA adapter (taken from other PC) and then I looked for a way to load module during bootup and get rid of this adapter (that’s why my initial post came).
Module pata_via does the job for IDE controller (confirmed after bootup) but it’s somehow not loaded by default auto-magically.
I can post vendor and device strings once I’ll be back from vacation (that means after Jan 6th). Hope this helps to upstream changes to module/kernel.
Recommend insert your mount command exactly as you’d do it in a console manually into /etc/sysctl.conf this file is typically read during boot well after your system disks are loaded. In other words your SATA controller which likely is required should already be loaded so your IDE controller can also load. This location is supposedly being deprecated sometime, and your command may need to be inserted into any of the other listed sysctl files that will continue to be supported.
Would be interesting to know what driver is required and implemented by your system, if it’s actually the kernel module you’re trying to load… and yest, your sata to pci controller is likely the complication. I’d expect if you were able to use an IDE controller that connects directly to your PCI bus you probably wouldn’t have this issue, and I’d also guess that your disk isn’t identified by your BIOS.
In other words, I suspect that your IDE isn’t working during stage 1 boot because it likely requires the SATA controller to be working first.
i describe mounting your IDE disk well after your SATA controller loads first, after which your IDE controller should work just fine.
No need and IMO it’s even questionable whether making your IDE controller kernel module part of the initrd would make it work.
Yes, some speculating but based on what I think is happening…
Thus us a brief Wiki page I wrote several years ago introducing the idea of Loadable Kernel Modules. AFAIK all should still work in today’s openSUSE, only diff is that with all the device drivers that are being implemented as kernel modules people are describing the current Linux kernel as “monolithic” again, but the “loadable” has not changed recently.
Even further back,
I wrote an article about optimizing network connections, and it describes how to make changes to kernel default configuration settings as well as how to load a specific kernel module on boot. Although it’s possible to write specific commands that fit specific distros, I chose to recommend methods that should work across all distros.