Skip to contentSkip to conversation

dracut vs vanilla kernel: requires /lib/modules/$kernel/module.block

DISCUSSION Dan Williams 2 participants 2 messages Feb 3, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I am looking into adding boot from external metadata, mdraid, support to dracut. As I looked into how it specifies modules I realized that it needs a /lib/modules directory that has been processed by this snippet from the Fedora kernel.spec:

    find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames

    # mark modules executable so that strip-to-file can strip them
    xargs --no-run-if-empty chmod u+x < modnames

    # Generate a list of modules for block and networking.

    fgrep /drivers/ modnames | xargs --no-run-if-empty nm -upA |
    sed -n 's,^.*/\([^/]*\.ko\):  *U \(.*\)$,\1 \2,p' > drivers.undef

    collect_modules_list()
    {
      sed -r -n -e "s/^([^ ]+) \\.?($2)\$/\\1/p" drivers.undef |
      LC_ALL=C sort -u > $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$1
    }

    collect_modules_list networking \
                         'register_netdev|ieee80211_register_hw|usbnet_probe'
    collect_modules_list block \

'ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans|scsi_esp_register'

Is this something that should be added to dracut, or upstreamed into Kbuild?

Thanks,
Dan
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): e9c3a7c20902031048u4d41036cj6761baace60ed6e1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#2 lore raw
Quoted 1 line · Dan Williams

Is this something that should be added to dracut, or upstreamed into Kbuild?

The idea is that we don't want to include every single module, but we want to include every module that might define a block device to boot from, or a network device to network boot from. Having it in the upstream kernel would be helpful, although how it's generated now is obviously a hack.

Doing it at runtime in dracut would work, but would be obviously slow.

Bill
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html