You are not logged in.

#1 2010-10-13 22:15:38

robertP78
Member
Registered: 2010-10-13
Posts: 3

mkinitcpio cannot find modules

My problem is that I need mmc_core and mmc_block loaded as "early modules" so I try to create a initrd image so that they can be loaded during the boot process.
But when I try to create the image with mkinitcpio, I get

ERROR: module 'mmc_block' not found
ERROR: module 'mmc_core' not found

And I have not idea why mkinitcpio cannot find these modules. Help would be very much appreciated. Thanks





I am in a chroot environment, proc, sys and dev seem to be mounted correctly.
I am logged in as root
kernel package kernel26 is installed which is kernel version: 2.6.35.7-1
Modules are present in /lib/modules/2.6.35-ARCH
The version of mkinitcpio is 0.6.7-1
I am using a Linpus kernel (2.6.23.9lw)

I have created several links in the /lib/modules/ directory in order to get mkinitcpio to look into it, but no success.

ls -l /lib/modules/
total 4
total 4
lrwxrwxrwx 1 root root   12 Oct 13 18:16 2.6 -> 2.6.35-ARCH/
lrwxrwxrwx 1 root root   12 Oct 12 21:24 2.6.23.9lw -> 2.6.35-ARCH/
lrwxrwxrwx 1 root root   12 Oct 13 21:30 2.6.35 -> 2.6.35-ARCH/
drwxr-xr-x 3 root root 4096 Oct 13 18:16 2.6.35-ARCH
lrwxrwxrwx 1 root root   12 Oct 13 22:11 2.6.35.7 -> 2.6.35-ARCH/
lrwxrwxrwx 1 root root   12 Oct 13 22:11 2.6.35.7-1 -> 2.6.35-ARCH/
lrwxrwxrwx 1 root root   12 Oct 13 22:11 2.6.35.7-1-ARCH -> 2.6.35-ARCH/
lrwxrwxrwx 1 root root   12 Oct 13 22:11 2.6.35.7-ARCH -> 2.6.35-ARCH/
lrwxrwxrwx 1 root root   12 Oct 13 18:17 kernel26 -> 2.6.35-ARCH/

Here is some more info on what I get

# cat /etc/mkinitcpio.conf
MODULES="mmc_block mmc_core"
BINARIES=""
FILES=""
HOOKS="base udev autodetect filesystems"
COMPRESSION="gzip"

# /sbin/mkinitcpio -k 2.6.35-ARCH -c /etc/mkinitcpio.conf
:: Begin dry run
ERROR: module 'mmc_block' not found
ERROR: module 'mmc_core' not found
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
:: Parsing hook [filesystems]
ERROR: module 'ext2' not found
:: Dry run complete, use -g IMAGE to generate a real image

# mkinitcpio -p kernel26
==> Building image "default"
==> Running command: /sbin/mkinitcpio -k 2.6.35-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
:: Begin build
ERROR: module 'mmc_block' not found
ERROR: module 'mmc_core' not found
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
:: Parsing hook [filesystems]
ERROR: module 'ext2' not found
:: Generating image '/boot/kernel26.img'...SUCCESS
==> SUCCESS
==> Building image "fallback"
==> Running command: /sbin/mkinitcpio -k 2.6.35-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect
:: Begin build
ERROR: module 'mmc_block' not found
ERROR: module 'mmc_core' not found
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [filesystems]
ERROR: module '9p' not found
ERROR: module 'affs' not found
ERROR: module 'kafs' not found
ERROR: module 'autofs4' not found
ERROR: module 'befs' not found
ERROR: module 'binfmt_aout' not found
ERROR: module 'btrfs' not found
ERROR: module 'cachefiles' not found
ERROR: module 'ceph' not found
ERROR: module 'cifs' not found
ERROR: module 'coda' not found
ERROR: module 'configfs' not found
ERROR: module 'cramfs' not found
ERROR: module 'dlm' not found
ERROR: module 'ecryptfs' not found
ERROR: module 'exofs' not found
ERROR: module 'exportfs' not found
ERROR: module 'ext2' not found
ERROR: module 'ext3' not found
ERROR: module 'ext4' not found
ERROR: module 'fat' not found
ERROR: module 'msdos' not found
ERROR: module 'vfat' not found
ERROR: module 'fscache' not found
ERROR: module 'cuse' not found
ERROR: module 'fuse' not found
ERROR: module 'gfs2' not found
ERROR: module 'hfs' not found
ERROR: module 'hfsplus' not found
ERROR: module 'isofs' not found
ERROR: module 'jbd' not found
ERROR: module 'jbd2' not found
ERROR: module 'jffs2' not found
ERROR: module 'jfs' not found
ERROR: module 'lockd' not found
ERROR: module 'logfs' not found
ERROR: module 'mbcache' not found
ERROR: module 'ncpfs' not found
ERROR: module 'nfs' not found
ERROR: module 'nfs_acl' not found
ERROR: module 'nfsd' not found
ERROR: module 'nilfs2' not found
ERROR: module 'ntfs' not found
ERROR: module 'ocfs2_nodemanager' not found
ERROR: module 'ocfs2_dlm' not found
ERROR: module 'ocfs2' not found
ERROR: module 'ocfs2_stack_o2cb' not found
ERROR: module 'ocfs2_stack_user' not found
ERROR: module 'ocfs2_stackglue' not found
ERROR: module 'omfs' not found
ERROR: module 'quota_tree' not found
ERROR: module 'quota_v1' not found
ERROR: module 'quota_v2' not found
ERROR: module 'reiserfs' not found
ERROR: module 'smbfs' not found
ERROR: module 'squashfs' not found
ERROR: module 'udf' not found
ERROR: module 'ufs' not found
ERROR: module 'xfs' not found
ERROR: module 'nls_cp437' not found
:: Generating image '/boot/kernel26-fallback.img'...SUCCESS
==> SUCCESS

When I look into the image kernel26.img, not one module shows up. The directory /lib/modules does not even exists in the image.

Offline

#2 2010-10-13 23:20:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: mkinitcpio cannot find modules

Just curious as to whether your kernel has them built in.  They are modules in my kernel:

ewaller@odin:~[1] 1003 %zcat /proc/config.gz | grep MMC
CONFIG_PCI_MMCONFIG=y
CONFIG_MMC=m
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set
# MMC/SD/SDIO Card Drivers
CONFIG_MMC_BLOCK=m
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_MMC_TEST is not set
# MMC/SD/SDIO Host Controller Drivers
CONFIG_MMC_SDHCI=m
CONFIG_MMC_SDHCI_PCI=m
CONFIG_MMC_RICOH_MMC=y
CONFIG_MMC_SDHCI_PLTFM=m
CONFIG_MMC_WBSD=m
CONFIG_MMC_TIFM_SD=m
CONFIG_MMC_SPI=m
CONFIG_MMC_SDRICOH_CS=m
CONFIG_MMC_CB710=m
CONFIG_MMC_VIA_SDMMC=m
ewaller@odin:~ 1004 %

edit: Fixed Typo

Last edited by ewaller (2010-10-13 23:20:47)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2010-10-14 18:32:09

robertP78
Member
Registered: 2010-10-13
Posts: 3

Re: mkinitcpio cannot find modules

Thanks for the quick reply. What are you getting at?
I cannot give you the config.gz, as the file is not present, but I can give you

# lsmod | grep mmc
mmc_block               5636  1 
mmc_core               14852  2 mmc_block,sdhci

and it clearly shows that these modules are loaded.


Anyone any ideas? Thanks in advance

Offline

#4 2010-10-14 19:29:56

robertP78
Member
Registered: 2010-10-13
Posts: 3

Re: mkinitcpio cannot find modules

I installed an earlier version and got continuously error messages popping up from /lib/mkinitcpio.
So I figured, these are all script files, and I was not mistaken. Obviously, fixing the script of the earlier version has caused a new bug:

I altered /lib/mkinitcpio/functions.sh and altered the the add_module function:

add_module ()
{
################ RobertP78 #####################
echo 'RobertP78: module string: ' $1
################################################
    local m fil path fw mod deps
    #cleanup - remove .ko, replace - with _
    m=$(basename "${1%.ko}" | tr '-' '_')
    #find pattern - replace _ with [-_] to match either
    fil=$(echo "$m" | sed 's|_|\[-_\]|g')
################ RobertP78 ###########################
   echo 'RobertP78: find'  "${MODULEDIR}" '-type f -name' "${fil}.ko"
######################################################

aaaand get the following result

# /sbin/mkinitcpio -k 2.6.35-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
:: Begin build
RobertP78: module string:  mmc_block
RobertP78: find /lib/modules/2.6.35-ARCH -type f -name .ko
ERROR: module 'mmc_block' not found
RobertP78: module string:  mmc_core
RobertP78: find /lib/modules/2.6.35-ARCH -type f -name .ko
ERROR: module 'mmc_core' not found
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
:: Parsing hook [filesystems]
RobertP78: module string:  ext2
RobertP78: find /lib/modules/2.6.35-ARCH -type f -name .ko
ERROR: module 'ext2' not found
:: Generating image '/boot/kernel26.img'...SUCCESS

So instead of replacing anyting, sed cuts everything away.
I am on it...

Offline

Board footer

Powered by FluxBB