Excerpts from Debian Bug Tracking System's message of Sat Jul 17 20:39:11 +0200 
2010:
> This is an automatic notification regarding your Bug report
> which was filed against the kernel-package package:
> 
> #588936: initramfs-tools: still does not work with kernel-package kernels
> 
> It has been closed by Manoj Srivastava <[email protected]>.
> 
> Their explanation is attached below along with your original report.
> If this explanation is unsatisfactory and you have not received a
> better one in a separate message then please contact Manoj Srivastava 
> <[email protected]> by
> replying to this email.
> 
> On Tue, Jul 13 2010, Michal Suchanek wrote:
> 
> > Excerpts from maximilian attems's message of Tue Jul 13 18:20:33 +0200 2010:
> 
> >> first of all kernel-package is legacy, use make deb-pkg.
> 
>         Says who? I think the package is still in use (though it has
>  been sadly neglected in hte last couple of month, though that is changing)

As the in-kernel solution is undocumented it is not of much use to the
general user base, only to the guru who implemented it and his/her close
circle.

On the other hand, k-p comes with extensive documentation and there are
many howtos on the web.

> >
> > It is a trouble with initramfs and kernel-package integration.
> 
>         Have you tried the initramfs scripts that come with
>  kernel-package documentation?

Actually this turns out to be an issue with Debian kernels as well:

Setting up initramfs-tools (0.97.2) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-2.6.32-5-686 (2.6.32-15) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-686
cryptsetup: WARNING: could not determine root device from /etc/fstab
sed: can't read /etc/mdadm/mdadm.conf: No such file or directory
E: /usr/share/initramfs-tools/hooks/mdadm failed with return 2.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-686
/boot/vmlinuz-2.6.32-5-686

For the kernel-package image nothing is logged:

Setting up linux-image-2.6.34-1-686 (2.6.34-1-686-10.00.Custom) ...

 Hmm. There is a symbolic link /lib/modules/2.6.34-1-686/build
 However, I can not read it: No such file or directory
 Therefore, I am deleting /lib/modules/2.6.34-1-686/build


 Hmm. The package shipped with a symbolic link
/lib/modules/2.6.34-1-686/source
 However, I can not read the target: No such file or directory
 Therefore, I am deleting /lib/modules/2.6.34-1-686/source

Running depmod.
Examining /etc/kernel/postinst.d.

Note that with k-p initramfs-tools are configured after the kernel while
with Dedian kernels they are configured before the kernel.

A postinst.d script is installed automatically:

initramfs-tools: /etc/kernel/postinst.d/initramfs-tools
--------------------------------------------------------------------------------
#!/bin/sh

version="$1"
bootopt=""

# passing the kernel version is required
[ -z "${version}" ] && exit 0

# kernel-package passes an extra arg
if [ -n "$2" ]; then
        if [ -n "${KERNEL_PACKAGE_VERSION}" ]; then
                bootdir=$(dirname "$2")
                bootopt="-b ${bootdir}"
        else
                # official Debian linux-images take care themself
                exit 0
        fi
fi

# avoid running multiple times
if [ -n "$DEB_MAINT_PARAMS" ]; then
        eval set -- "$DEB_MAINT_PARAMS"
        if [ -z "$1" ] || [ "$1" != "configure" ]; then
                exit 0
        fi
fi

# we're good - create initramfs.  update runs do_bootloader
update-initramfs -c -t -k "${version}" ${bootopt}
--------------------------------------------------------------------------------
The example script is different, though:
/usr/share/doc/kernel-package/examples/etc/kernel/postinst.d/initramfs 
--------------------------------------------------------------------------------
#! /bin/sh

set -e

if [ -n "$INITRD" ] && [ "$INITRD" = 'No' ]; then
    exit 0
fi
version="$1"
vmlinuz_location="$2"


if [ -n "$DEB_MAINT_PARAMS" ]; then
    eval set -- "$DEB_MAINT_PARAMS"
    if [ -z "$1" ] || [ "$1" != "configure" ]; then
        exit 0;
    fi
fi

# passing the kernel version is required
[ -z "$version" ] && exit 1


if [  -n "$vmlinuz_location" ]; then
    # Where is the image located? We'll place the initrd there.
    boot=$(dirname "$vmlinuz_location")
    bootarg="-b $boot"
fi

# 
if which update-initramfs >/dev/null ; then
    update-initramfs -c -t -k "$version" $bootarg
fi
--------------------------------------------------------------------------------




> >
> > For Debian official kernel an initramfs is created, for kernel-package
> > it is not.
> 
>         This is documented, i think.
> 
>         Please read /usr/share/doc/kernel-package/README for
>  instructions on how to get an initramfs.

Indeed, it is well documented in current kernel-package.

Thanks

Michal
-- 
Michal Suchánek
[email protected]
tel 224491810 fax 224491594
Univerzita Karlova v Praze
Ústav Výpočetní Techniky
Ovocný trh 3
Praha 1



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to