LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   how do I determine the order modules get loaded? (http://www.linuxquestions.org/questions/linux-general-1/how-do-i-determine-the-order-modules-get-loaded-438507/)

Simon Bridge 04-24-2006 09:27 PM

how do I determine the order modules get loaded?
 
In relation to this thread. It looks very much like the sata drivers are claiming the ide controller (since sata and ide seem to live in the same place and root lives on the first sata hard-drive). This means the ide dvd drives do not show up at all.

I figure this will be resolved by either:
recompile the kernel so the ide driver is not a module (so it will take precedence); or -
make sure the ide module loads first.

But I don't know how to do the latter.

rhoekstra 04-25-2006 01:46 AM

The latter you can resolve editing your initrd, forcing an insmod before any other discoveries are done..

You also could try (I don't know the exact syntax, though) to add hdc=ide-scsi or something to the kernel parameters..

My two cents, you could also try to search for such strings..

Hope this helps in any way

Simon Bridge 04-25-2006 03:06 AM

initrd - boot loader initialized RAM disk
This what you mean? This is compressed and read-only and 2.6 kernels these days use initramfs.

The insmod ide-driver would have to come at the start of phase 2 of the boot process. But how would I get it in there... it's not like inserting a custom DSDT.

hdc=ide-scsi
this parameter hasn't been needed since atapi support entered the kernel.
It may be worth a try though - however I note that /dev/hdc dosn't exist at the mo. dmesg fails to report and device on hdc.

I've been looking through kernel parameters hoping there was one to force ide first. The closest I got was noapic.

It also occurred to me that the hardware could be rearrainged so that hda was a hard drive holding the root file system. The sata raid drives would hold the bulk of the file systems which we would like to protect (the only real reason for prefferring HDDs in HWRaid) and letting the dvd drives sit in the second ide controller ... so hda = small HDD, hdc = dvd, hdd = dvd, sda/sdb sata RAID.

This would also force the ide driver ahead of the sata one - but would require reinstalling the OS. I think it's a configuration I'll have to remember if I ever run into one of these boards again.

It is beginning to sound like compiling the kernel is the easy option...

rhoekstra 04-25-2006 03:43 AM

In my opinion initrd is still being used in most distros.. certainly in Redhat families..

They can be unpacked with cpio and recreated afterwards..

kevkim55 04-25-2006 04:00 AM

Use "pre-install" in modules.conf ? Something like ->
pre-install ide-driver /sbin/modprobe -k sata-driver

The above should load ide driver before sata driver. Ofcourse, ide-driver and sata-driver are placeholders for the sake of example.

Quote:

initrd - boot loader initialized RAM disk
This what you mean? This is compressed and read-only and 2.6 kernels these days use initramfs.
The initrd image is a gzipped archive (cpio) or a gzipped filesystem image (ext3, reiserfs etc). You can copy initrd to a work folder and gunzip it. file command on the resulting file would tell you what it is. You can either extract the contents to a directory if it is a cpio archive or mount it on a directory if it is a filesys image. Perform necessary changes to /etc/modules.conf or so if there is one, in the contents of, extracted/mounted initrd image. Or edit the init/linuxrc whichever is present. Either way, ensure ide is loaded before sata. Once done, either re-pack them into archive or simply unmount depending on what initrd was to begin with. Finally gzip it and you have your own initrd.

Simon Bridge 04-25-2006 09:32 AM

rhoekstra: In my opinion initrd is still being used in most distros.. certainly in Redhat families..

While fedora still uses initrd - in that it has the files - it makes quite a bit of use of initramfs feature of the 2.6 kernels. If you want a custom DSDT, or have a weird boot configuration... this is the thing to use.

http://www.linuxdevices.com/articles/AT4017834659.html

kevkim55:
Use "pre-install" in modules.conf ? Something like ->
pre-install ide-driver /sbin/modprobe -k sata-driver
... ahhh: that's the sort of thing. Thanks.

JZL240I-U 04-26-2006 09:15 AM

@Simon_Bridge Thank you for the link :).


All times are GMT -5. The time now is 01:32 PM.