Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Kernel (http://www.linux-archive.org/debian-kernel/)
-   -   Bug#520198: mkinitramfs: cannot build initrd with rootfs on mmcblk (http://www.linux-archive.org/debian-kernel/265275-bug-520198-mkinitramfs-cannot-build-initrd-rootfs-mmcblk.html)

maximilian attems 03-18-2009 10:42 AM

Bug#520198: mkinitramfs: cannot build initrd with rootfs on mmcblk
 
On Tue, Jul 01, 2025 at 01:12:27PM +0400, Paul Malishev wrote:
> Package: initramfs-tools
> Version: 0.93
> Severity: important
>
> I've got armel with rootfs at /dev/mmcblk0p3.
> initramfs failes to create initrd image for kernel:
>
> # LANG=C dpkg --configure -a
> Setting up initramfs-tools (0.93) ...
> update-initramfs: deferring update (trigger activated)
> Processing triggers for initramfs-tools ...
> update-initramfs: Generating /boot/initrd.img-2.6.26-1-versatile
> mkinitramfs: missing mmcblk root /dev/mmcblk0p3 /sys entry
> mkinitramfs: workaround is MODULES=most
> mkinitramfs: Error please report the bug
> update-initramfs: failed for /boot/initrd.img-2.6.26-1-versatile
> dpkg: subprocess post-installation script returned error exit status 1

please post
ls /sys/block/

> there was MODULE=most in initramfs.conf by default

well that most probably is overriden by a file in
/etc/initramfs-tools/conf.d/




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

afunix 03-18-2009 01:45 PM

Bug#520198: mkinitramfs: cannot build initrd with rootfs on mmcblk
 
Hello

Wednesday 18 March 2009 14:42:04 maximilian attems писал:

> > I've got armel with rootfs at /dev/mmcblk0p3.
> > initramfs failes to create initrd image for kernel:
> please post
> ls /sys/block/

# ls /sys/block
mmcblk0

> > there was MODULE=most in initramfs.conf by default
> well that most probably is overriden by a file in
> /etc/initramfs-tools/conf.d/

it builds initrd with MODULES=most in /etc/initramfs-tools/conf.d/driver-policy

--
{ afunix 18 марта 2009 14:42 }

maximilian attems 03-18-2009 03:51 PM

Bug#520198: mkinitramfs: cannot build initrd with rootfs on mmcblk
 
btw how did you install your box?

On Wed, 18 Mar 2009, afunix wrote:

> # ls /sys/block
> mmcblk0

i see this confuses me right now, will need more info, see below

> > > there was MODULE=most in initramfs.conf by default
> > well that most probably is overriden by a file in
> > /etc/initramfs-tools/conf.d/
>
> it builds initrd with MODULES=most in /etc/initramfs-tools/conf.d/driver-policy

can you reset to "MODULES=dep" and post the output of
sh -x mkinitramfs -o /tmp/foo

thanks

--
maks



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

afunix 03-18-2009 06:15 PM

Bug#520198: mkinitramfs: cannot build initrd with rootfs on mmcblk
 
Доброго времени суток, .

Wednesday 18 March 2009 19:51:19 maximilian attems писал:

> btw how did you install your box?

I've installed system on qemu-arm emulator with standard lenny kernel, than I've used custom kernel 2.6.21-hh9 for that hardware to boot already installed system.
it's not debian kernel, because standard kernel just doesn't starts and custom kernel, compiled with debian tools can't mount root.

> > # ls /sys/block
> > mmcblk0
> i see this confuses me right now, will need more info, see below

I found that there wasn't /lib/modules/2.6.21-hh9 directory. I've copied modules, but mkinitramfs-kpkg still failes:
Setting up linux-image-2.6.26-1-versatile (2.6.26-13) ...
Running depmod.
Finding valid ramdisk creators.
Using mkinitramfs-kpkg to build the ramdisk.
Depreciation WARNING: use update-initramfs(8)
mkinitramfs-kpkg failed to create initrd image.
Failed to create initrd image.
dpkg: error processing linux-image-2.6.26-1-versatile (--configure):

> > > > there was MODULE=most in initramfs.conf by default
> > > well that most probably is overriden by a file in
> > > /etc/initramfs-tools/conf.d/
> > it builds initrd with MODULES=most in /etc/initramfs-tools/conf.d/driver-policy
> can you reset to "MODULES=dep" and post the output of
> sh -x mkinitramfs -o /tmp/foo

# sh -x mkinitramfs -o /tmp/foo
+ umask 0022
+ export PATH=/usr/bin:/sbin:/bin
+ PATH=/usr/bin:/sbin:/bin
+ keep=n
+ CONFDIR=/etc/initramfs-tools
+ verbose=n
+ errors_to='2>/dev/null'
+ BUSYBOXDIR=/bin
++ getopt -o d:ko:r:v -n mkinitramfs -- -o /tmp/foo
+ OPTIONS=' -o '/tmp/foo' --'
+ '[' 0 '!=' 0 ']'
+ eval set -- ' -o '/tmp/foo' --'
++ set -- -o /tmp/foo --
+ true
+ case "$1" in
+ outfile=/tmp/foo
+ shift 2
+ true
+ case "$1" in
+ shift
+ break
+ . /usr/share/initramfs-tools/scripts/functions
+ . /usr/share/initramfs-tools/hook-functions
+ . /etc/initramfs-tools/initramfs.conf
++ MODULES=most
++ BUSYBOX=y
++ KEYMAP=n
++ BOOT=local
++ DEVICE=eth0
++ NFSROOT=auto
+ EXTRA_CONF=
+ for i in '/usr/share/initramfs-tools/conf.d/*' '${CONFDIR}/conf.d/*'
++ basename '/usr/share/initramfs-tools/conf.d/*'
++ grep '^[[:alnum:]][[:alnum:]._-]*$'
++ grep -v '.dpkg-.*$'
+ EXTRA_CONF=' '
+ for i in '/usr/share/initramfs-tools/conf.d/*' '${CONFDIR}/conf.d/*'
++ basename /etc/initramfs-tools/conf.d/driver-policy
++ grep '^[[:alnum:]][[:alnum:]._-]*$'
++ grep -v '.dpkg-.*$'
+ EXTRA_CONF=' driver-policy'
+ for i in '/usr/share/initramfs-tools/conf.d/*' '${CONFDIR}/conf.d/*'
++ grep '^[[:alnum:]][[:alnum:]._-]*$'
++ grep -v '.dpkg-.*$'
++ basename /etc/initramfs-tools/conf.d/resume
+ EXTRA_CONF=' driver-policy resume'
+ for i in '${EXTRA_CONF}'
+ '[' -e /etc/initramfs-tools/conf.d/driver-policy ']'
+ . /etc/initramfs-tools/conf.d/driver-policy
++ MODULES=dep
+ for i in '${EXTRA_CONF}'
+ '[' -e /etc/initramfs-tools/conf.d/resume ']'
+ . /etc/initramfs-tools/conf.d/resume
++ RESUME=/dev/mmcblk0p2
+ for i in '/usr/share/initramfs-tools/conf-hooks.d/*'
+ '[' -e '/usr/share/initramfs-tools/conf-hooks.d/*' ']'
+ '[' -n ' ']'
+ '[' -z /tmp/foo ']'
+ touch /tmp/foo
++ readlink -f /tmp/foo
+ outfile=/tmp/foo
+ '[' 0 -ne 1 ']'
++ uname -r
+ version=2.6.21-hh9
+ check_minkver 2.6.21-hh9
+ local curversion initdir DPKG_ARCH minversion cm_x tmp
+ curversion=2.6.21-hh9
+ initdir=
+ '[' -z ' ']'
++ dpkg --print-installation-architecture
+ DPKG_ARCH=armel
+ case ${DPKG_ARCH} in
+ minversion=2.6.12
+ dpkg --compare-versions 2.6.21-hh9 lt 2.6.12
+ return 0
+ check_minkver 2.6.21-hh9 /usr/share/initramfs-tools/hooks
+ local curversion initdir DPKG_ARCH minversion cm_x tmp
+ curversion=2.6.21-hh9
+ initdir=/usr/share/initramfs-tools/hooks
+ '[' -z /usr/share/initramfs-tools/hooks ']'
+ set_initlist
+ unset initlist
+ for si_x in '${initdir}/*'
+ '[' /usr/share/initramfs-tools/hooks/kernelextras = '/usr/share/initramfs-tools/hooks/*' ']'
+ case ${si_x#${initdir}/} in
+ '[' '!' -x /usr/share/initramfs-tools/hooks/kernelextras ']'
+ '[' -d /usr/share/initramfs-tools/hooks/kernelextras ']'
+ initlist=' kernelextras'
+ for si_x in '${initdir}/*'
+ '[' /usr/share/initramfs-tools/hooks/keymap = '/usr/share/initramfs-tools/hooks/*' ']'
+ case ${si_x#${initdir}/} in
+ '[' '!' -x /usr/share/initramfs-tools/hooks/keymap ']'
+ '[' -d /usr/share/initramfs-tools/hooks/keymap ']'
+ initlist=' kernelextras keymap'
+ for si_x in '${initdir}/*'
+ '[' /usr/share/initramfs-tools/hooks/thermal = '/usr/share/initramfs-tools/hooks/*' ']'
+ case ${si_x#${initdir}/} in
+ '[' '!' -x /usr/share/initramfs-tools/hooks/thermal ']'
+ '[' -d /usr/share/initramfs-tools/hooks/thermal ']'
+ initlist=' kernelextras keymap thermal'
+ for si_x in '${initdir}/*'
+ '[' /usr/share/initramfs-tools/hooks/udev = '/usr/share/initramfs-tools/hooks/*' ']'
+ case ${si_x#${initdir}/} in
+ '[' '!' -x /usr/share/initramfs-tools/hooks/udev ']'
+ '[' -d /usr/share/initramfs-tools/hooks/udev ']'
+ initlist=' kernelextras keymap thermal udev'
+ for cm_x in '${initlist}'
++ sed '/^MINKVER=/!d;$!d;s/^MINKVER=//;s/[[:space:]]*$//' /usr/share/initramfs-tools/hooks/kernelextras
+ minver=
+ '[' -z ' ']'
+ continue
+ for cm_x in '${initlist}'
++ sed '/^MINKVER=/!d;$!d;s/^MINKVER=//;s/[[:space:]]*$//' /usr/share/initramfs-tools/hooks/keymap
+ minver=
+ '[' -z ' ']'
+ continue
+ for cm_x in '${initlist}'
++ sed '/^MINKVER=/!d;$!d;s/^MINKVER=//;s/[[:space:]]*$//' /usr/share/initramfs-tools/hooks/thermal
+ minver=
+ '[' -z ' ']'
+ continue
+ for cm_x in '${initlist}'
++ sed '/^MINKVER=/!d;$!d;s/^MINKVER=//;s/[[:space:]]*$//' /usr/share/initramfs-tools/hooks/udev
+ minver=
+ '[' -z ' ']'
+ continue
+ check_minkver 2.6.21-hh9 /etc/initramfs-tools/hooks
+ local curversion initdir DPKG_ARCH minversion cm_x tmp
+ curversion=2.6.21-hh9
+ initdir=/etc/initramfs-tools/hooks
+ '[' -z /etc/initramfs-tools/hooks ']'
+ set_initlist
+ unset initlist
+ for si_x in '${initdir}/*'
+ '[' '/etc/initramfs-tools/hooks/*' = '/etc/initramfs-tools/hooks/*' ']'
+ return
+ case "${version}" in
+ case "${version}" in
+ '[' -d /tmp/foo ']'
+ MODULESDIR=/lib/modules/2.6.21-hh9
+ '[' '!' -e /lib/modules/2.6.21-hh9 ']'
+ '[' '!' -e /lib/modules/2.6.21-hh9/modules.dep ']'
++ mktemp -t -d mkinitramfs_XXXXXX
+ DESTDIR=/tmp/mkinitramfs_zUGiYR
++ mktemp -t mkinitramfs-OL_XXXXXX
+ __TMPCPIOGZ=/tmp/mkinitramfs-OL_vizlpw
++ dpkg --print-installation-architecture
+ DPKG_ARCH=armel
+ export MODULESDIR
+ export version
+ export CONFDIR
+ export DESTDIR
+ export DPKG_ARCH
+ export verbose
+ export KEYMAP
+ export MODULES
+ export __TMPCPIOGZ
+ for d in bin conf/conf.d etc lib/modules sbin scripts '${MODULESDIR}'
+ mkdir -p /tmp/mkinitramfs_zUGiYR/bin
+ for d in bin conf/conf.d etc lib/modules sbin scripts '${MODULESDIR}'
+ mkdir -p /tmp/mkinitramfs_zUGiYR/conf/conf.d
+ for d in bin conf/conf.d etc lib/modules sbin scripts '${MODULESDIR}'
+ mkdir -p /tmp/mkinitramfs_zUGiYR/etc
+ for d in bin conf/conf.d etc lib/modules sbin scripts '${MODULESDIR}'
+ mkdir -p /tmp/mkinitramfs_zUGiYR/lib/modules
+ for d in bin conf/conf.d etc lib/modules sbin scripts '${MODULESDIR}'
+ mkdir -p /tmp/mkinitramfs_zUGiYR/sbin
+ for d in bin conf/conf.d etc lib/modules sbin scripts '${MODULESDIR}'
+ mkdir -p /tmp/mkinitramfs_zUGiYR/scripts
+ for d in bin conf/conf.d etc lib/modules sbin scripts '${MODULESDIR}'
+ mkdir -p /tmp/mkinitramfs_zUGiYR//lib/modules/2.6.21-hh9
+ for x in '"${CONFDIR}/modules"' '/usr/share/initramfs-tools/modules.d/*'
+ '[' -f /etc/initramfs-tools/modules ']'
+ add_modules_from_file /etc/initramfs-tools/modules
+ '[' '!' -e /etc/initramfs-tools/modules ']'
+ sed -e '/^#/d' /etc/initramfs-tools/modules
+ read module rest
+ for x in '"${CONFDIR}/modules"' '/usr/share/initramfs-tools/modules.d/*'
+ '[' -f '/usr/share/initramfs-tools/modules.d/*' ']'
+ case "${MODULES}" in
+ dep_add_modules
+ local block minor root FSTYPE root_dev_path x
++ mount
++ awk '//dev// {if ($3 == "/") {print "root=" $1 "
FSTYPE=" $5; exit}}'
+ eval 'root=/dev/mmcblk0p3
FSTYPE=ext3'
++ root=/dev/mmcblk0p3
++ FSTYPE=ext3
+ '[' /dev/mmcblk0p3 = /dev/root ']'
++ readlink -f /dev/mmcblk0p3
+ root=/dev/mmcblk0p3
+ '[' ext3 = auto ']'
+ '[' ext3 = unknown ']'
+ manual_add_modules ext3
+ local mam_x firmwares firmware
++ modprobe --set-version=2.6.21-hh9 --ignore-install --show-depends ext3
++ awk '/^insmod/ { print $2 }'
+ '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
+ '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
+ '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
+ '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
+ '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
+ '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
+ '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
+ '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
+ block=mmcblk0p3
+ block=mmcblk
+ '[' -z mmcblk ']'
+ '[' '!' -e /sys/block/mmcblk ']'
+ echo 'mkinitramfs: missing mmcblk root /dev/mmcblk0p3 /sys entry'
mkinitramfs: missing mmcblk root /dev/mmcblk0p3 /sys entry
+ echo 'mkinitramfs: workaround is MODULES=most'
mkinitramfs: workaround is MODULES=most
+ echo 'mkinitramfs: Error please report the bug'
mkinitramfs: Error please report the bug
+ exit 1



До свидания, .

--
{ afunix 18 марта 2009 19:51 }

maximilian attems 03-19-2009 09:28 PM

Bug#520198: mkinitramfs: cannot build initrd with rootfs on mmcblk
 
On Wed, 18 Mar 2009, afunix wrote:

> Wednesday 18 March 2009 19:51:19 maximilian attems писал:
>
> > btw how did you install your box?
>
> I've installed system on qemu-arm emulator with standard lenny kernel,
> than I've used custom kernel 2.6.21-hh9 for that hardware to boot
> already installed system. it's not debian kernel, because standard
> kernel just doesn't starts and custom kernel, compiled with debian tools
> can't mount root.

ok thanks for the info. interesting box :D

> > > # ls /sys/block
> > > mmcblk0
> > i see this confuses me right now, will need more info, see below
>
> I found that there wasn't /lib/modules/2.6.21-hh9 directory. I've copied modules, but mkinitramfs-kpkg still failes:
> Setting up linux-image-2.6.26-1-versatile (2.6.26-13) ...
> Running depmod.
> Finding valid ramdisk creators.
> Using mkinitramfs-kpkg to build the ramdisk.
> Depreciation WARNING: use update-initramfs(8)
> mkinitramfs-kpkg failed to create initrd image.
> Failed to create initrd image.
> dpkg: error processing linux-image-2.6.26-1-versatile (--configure):

hmmm what does this output give:
cat /etc/kernel-img.conf

> ++ modprobe --set-version=2.6.21-hh9 --ignore-install --show-depends ext3
> ++ awk '/^insmod/ { print $2 }'
> + '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
> + '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
> + '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
> + '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
> + '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
> + '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
> + '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
> + '[' /dev/mmcblk0p3 '!=' /dev/mmcblk0p3 ']'
> + block=mmcblk0p3
> + block=mmcblk
> + '[' -z mmcblk ']'
> + '[' '!' -e /sys/block/mmcblk ']'
> + echo 'mkinitramfs: missing mmcblk root /dev/mmcblk0p3 /sys entry'

i see, could you test with MODULES=dep belows patch:
(you might need to apply it to /usr/share/initramfs-tools/hook-functions

diff --git a/hook-functions b/hook-functions
index 353495f..82ffbef 100644
--- a/hook-functions
+++ b/hook-functions
@@ -292,6 +292,10 @@ dep_add_modules()
if [ ! -e /sys/block/${block} ] ; then
block=${block%%[0-9]*}
fi
+ # /dev/mmcblkXpX
+ elif [ "${root#/dev/mmcblk}" != "${root}" ]; then
+ block=${root#/dev/}
+ block=${block%%p[0-9]*}
# classical root device
else
block=${root#/dev/}



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

afunix 03-20-2009 03:17 PM

Bug#520198: mkinitramfs: cannot build initrd with rootfs on mmcblk
 
Доброго времени суток, .

Friday 20 March 2009 01:28:17 maximilian attems писал:

> > > btw how did you install your box?
> > I've installed system on qemu-arm emulator with standard lenny kernel,
> > than I've used custom kernel 2.6.21-hh9 for that hardware to boot
> > already installed system. it's not debian kernel, because standard
> > kernel just doesn't starts and custom kernel, compiled with debian tools
> > can't mount root.
> ok thanks for the info. interesting box :D

that's wm5-based pda. dell axim x51v :)

> > I found that there wasn't /lib/modules/2.6.21-hh9 directory. I've copied modules, but mkinitramfs-kpkg still failes:
> > Setting up linux-image-2.6.26-1-versatile (2.6.26-13) ...
> > Running depmod.
> > Finding valid ramdisk creators.
> > Using mkinitramfs-kpkg to build the ramdisk.
> > Depreciation WARNING: use update-initramfs(8)
> > mkinitramfs-kpkg failed to create initrd image.
> > Failed to create initrd image.
> > dpkg: error processing linux-image-2.6.26-1-versatile (--configure):
> hmmm what does this output give:
> cat /etc/kernel-img.conf

# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = yes

> i see, could you test with MODULES=dep belows patch:
> (you might need to apply it to /usr/share/initramfs-tools/hook-functions

OMG! It works!:)
Thanks a lot!

До свидания, .

--
{ afunix 20 марта 2009 01:28 }

Paul Malishev 07-01-2025 09:12 AM

Bug#520198: mkinitramfs: cannot build initrd with rootfs on mmcblk
 
Package: initramfs-tools
Version: 0.93
Severity: important

I've got armel with rootfs at /dev/mmcblk0p3.
initramfs failes to create initrd image for kernel:

# LANG=C dpkg --configure -a
Setting up initramfs-tools (0.93) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.26-1-versatile
mkinitramfs: missing mmcblk root /dev/mmcblk0p3 /sys entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug
update-initramfs: failed for /boot/initrd.img-2.6.26-1-versatile
dpkg: subprocess post-installation script returned error exit status 1

there was MODULE=most in initramfs.conf by default



-- Package-specific info:
-- /proc/cmdline
root=/dev/mmcblk0p3 mem=64M rootdelay=1 rw ip=10.0.0.2:10.0.0.1:10.0.0.1:255.255.255.0:axim:u sb0:none console=ttyS0,115200n8 console=tty0 psplash=false

-- /proc/filesystems
ext2
msdos
vfat

-- lsmod
Module Size Used by

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = yes

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
BOOT=local
DEVICE=eth0
NFSROOT=auto


-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: armel (armv5tel)

Kernel: Linux 2.6.21-hh9 (PREEMPT)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages initramfs-tools depends on:
ii cpio 2.9.90-3 GNU cpio -- a program to manage ar
ii findutils 4.4.0-3 utilities for finding files--find,
ii klibc-utils 1.5.15-1 small utilities built with klibc f
ii module-init-tools 3.4-1 tools for managing Linux kernel mo
ii udev 0.125-7 /dev/ and hotplug management daemo

Versions of packages initramfs-tools recommends:
ii busybox 1:1.10.2-2 Tiny utilities for small and embed

initramfs-tools suggests no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 07:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.