Hi folks,

I've got a problem with loadmodules on the initrd:

AFAICS mkinitrd searches /etc/fstab for the root and the
swap partition. Then it uses the /dev entry for swap (?) to
get a major device number. This number is then mapped to
hardware, i.e. "SCSI" for my SATA controller. Finally it
searches /proc/scsi to get the device name to add it to
loadmodules.

The problem is that sometimes /proc/scsi does not contain the
module name for my swap device. 'sata_sil' does not appear in
/proc/scsi. I don't know why its not there, but this is not
important. Without sata_sil in loadmodules my PC won't boot.


Wouldn't it be easier and more reliable for mkinitrd to use /proc/modules to get a list of modules to load, e.g. something like

for m in $(cat /proc/modules | cut -d\  -f1); do
        if test "$(find /lib/modules/$(uname -r)/kernel/drivers/scsi/$m.$o)"; 
then
                echo $m >>loadmodules
        fi
done

This is not verified to work, but I'm sure you get the
meaning.


Regards

Harri




Reply via email to