Hi Jens,
Jens Schmalzing wrote:
Hi,
Harald Dunkel writes:
the patch [...] looks into /proc/modules (the user space interface for module management) to get a list of loaded modules.
This only works if you are building an initrd for a kernel with the exact same module configuration.
The module configuration doesn't have to be exactly the same. Please note that we are talking just about the SCSI drivers.
mkinitrd always used the currently running kernel to guess the settings for the kernel to install. My patch doesn't change this. You have to rerun mkinitrd if you replace the SCSI controller, for example.
Maybe it would help if mkinitrd uses discover to get a list of modules. But discover lists "sata_sil" as an IDE module. There might be new problems.
On the other side, the current mkinitrd searches for entries in /proc/scsi and uses 45 lines sed (hardwired into mkinitrd!) to do a mapping to module names.
mkinitrd is far from perfect. Nevertheless, it works nicely on a great many systems.
No question about that. It contains a lot of know-how.
I doubt that /proc/scsi is the right way to guess which modules are loaded.
It is, since it contains information about the installed SCSI hardware, not about the loaded drivers.
At least for sata_sil and sata_sis it doesn't work, as it seems.
Patch the sed script, then.
"find /proc/scsi" returns for my PC
/proc/scsi /proc/scsi/usb-storage /proc/scsi/usb-storage/2 /proc/scsi/device_info /proc/scsi/scsi
even though module sata_sil has been used to mount the root disk. As you see, there is _nothing_ in /proc/scsi indicating that module sata_sil should be loaded. The sed script in mkinitrd cannot do anything about that.
Regards
Harri