Debian Bug report logs - #608538
Didn't include required module in initramfs

version graph

Package: initramfs-tools; Maintainer for initramfs-tools is Debian kernel team <debian-kernel@lists.debian.org>; Source for initramfs-tools is src:initramfs-tools.

Reported by: Aron Xu <happyaron.xu@gmail.com>

Date: Sat, 1 Jan 2011 09:45:02 UTC

Severity: important

Tags: d-i

Merged with 602254, 603578

Fixed in version initramfs-tools/0.98.8

Done: maximilian attems <maks@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Install Team <debian-boot@lists.debian.org>:
Bug#608538; Package installation-reports. (Sat, 01 Jan 2011 09:45:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aron Xu <happyaron.xu@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian Install Team <debian-boot@lists.debian.org>. (Sat, 01 Jan 2011 09:45:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Aron Xu <happyaron.xu@gmail.com>
To: submit@bugs.debian.org
Subject: btrfs root installation results in initramfs busybox prompt
Date: Sat, 1 Jan 2011 17:41:14 +0800
[Message part 1 (text/plain, inline)]
Package: installation-reports
Severity: important

-- Package-specific info:

Boot method: netinst CD
Image version: http://cdimage.debian.org/cdimage/squeeze_di_beta2/i386/iso-cd/debian-testing-i386-netinst.iso
Date: 31 Dec 2010 22:11

Machine: qemu-kvm i686, with bridged network, 1 CPU and 384MB RAM allocated.
Partitions: 1. Ext4 -> /boot, 50MB 2. Btrfs -> / , 4.1 GB

Base System Installation Checklist:
[O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it

Initial boot:           [O]
Detect network card:    [O]
Configure network:      [ O]
Detect CD:              [O]
Load installer modules: [O]
Detect hard drives:     [O]
Partition hard drives:  [O]
Install base system:    [O]
Clock/timezone setup:   [O]
User/password setup:    [O]
Install tasks:          [ ]
Install boot loader:    [O]
Overall install:        [O]

Comments/Problems:

The installation finished as normal, but after reboot it results into
an initramfs busybox prompt.

Warning information:
 FATAL: Error inserting btrfs
(/lib/modules/2.6.32-5-686)/kernel/fs/btrfs/btrfs.ko) unknown symbol
in module, or unknown parameter (see dmesg)

dmesg output attached as dmesg.txt.gz

lsb-release and hardware-summary didn't run.


-- 
Regards,
Aron Xu
[dmesg.txt.gz (application/x-gzip, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install Team <debian-boot@lists.debian.org>:
Bug#608538; Package installation-reports. (Sat, 01 Jan 2011 11:06:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install Team <debian-boot@lists.debian.org>. (Sat, 01 Jan 2011 11:06:13 GMT) Full text and rfc822 format available.

Message #10 received at 608538@bugs.debian.org (full text, mbox):

From: Cyril Brulebois <kibi@debian.org>
To: Aron Xu <happyaron.xu@gmail.com>, 608538@bugs.debian.org
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Sat, 1 Jan 2011 12:04:49 +0100
[Message part 1 (text/plain, inline)]
Hi Aron,

Aron Xu <happyaron.xu@gmail.com> (01/01/2011):
> Warning information:
>  FATAL: Error inserting btrfs
> (/lib/modules/2.6.32-5-686)/kernel/fs/btrfs/btrfs.ko) unknown symbol
> in module, or unknown parameter (see dmesg)
> 
> dmesg output attached as dmesg.txt.gz

I don't see anything related there?

KiBi.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install Team <debian-boot@lists.debian.org>:
Bug#608538; Package installation-reports. (Sat, 01 Jan 2011 11:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aron Xu <happyaron.xu@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Install Team <debian-boot@lists.debian.org>. (Sat, 01 Jan 2011 11:09:03 GMT) Full text and rfc822 format available.

Message #15 received at 608538@bugs.debian.org (full text, mbox):

From: Aron Xu <happyaron.xu@gmail.com>
To: Cyril Brulebois <kibi@debian.org>
Cc: 608538@bugs.debian.org
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Sat, 1 Jan 2011 19:06:26 +0800
On Sat, Jan 1, 2011 at 19:04, Cyril Brulebois <kibi@debian.org> wrote:
> Hi Aron,
>
> Aron Xu <happyaron.xu@gmail.com> (01/01/2011):
>> Warning information:
>>  FATAL: Error inserting btrfs
>> (/lib/modules/2.6.32-5-686)/kernel/fs/btrfs/btrfs.ko) unknown symbol
>> in module, or unknown parameter (see dmesg)
>>
>> dmesg output attached as dmesg.txt.gz
>
> I don't see anything related there?
>
> KiBi.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAk0fClEACgkQeGfVPHR5Nd1CkwCeO802DZaF0snpoKqBhQVDcX1x
> K6oAnj4m30hcCLNCEGXtqMecw6ZagBmd
> =ST7V
> -----END PGP SIGNATURE-----
>
>

No, nothing. But I truly only get an initramfs prompt.

-- 
Regards,
Aron Xu




Bug reassigned from package 'installation-reports' to 'initramfs-tools'. Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Sat, 01 Jan 2011 18:00:09 GMT) Full text and rfc822 format available.

Forcibly Merged 602254 608538. Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Sat, 01 Jan 2011 18:00:12 GMT) Full text and rfc822 format available.

Severity set to 'important' from 'normal' Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Sat, 01 Jan 2011 18:00:15 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#608538; Package initramfs-tools. (Sun, 02 Jan 2011 18:15:16 GMT) Full text and rfc822 format available.

Acknowledgement sent to Otavio Salvador <otavio@ossystems.com.br>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Sun, 02 Jan 2011 18:15:16 GMT) Full text and rfc822 format available.

Message #26 received at 608538@bugs.debian.org (full text, mbox):

From: Otavio Salvador <otavio@ossystems.com.br>
To: Aron Xu <happyaron.xu@gmail.com>, 608538@bugs.debian.org
Cc: Cyril Brulebois <kibi@debian.org>
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Sun, 2 Jan 2011 16:13:04 -0200
reassign 608538 btrfs-tools
retitle 608538 Didn't include required module in initramfs
thanks

On Sat, Jan 1, 2011 at 09:06, Aron Xu <happyaron.xu@gmail.com> wrote:
> No, nothing. But I truly only get an initramfs prompt.

It looks to be a btrfs-tools hook issue.

Reassigning it.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br




Bug reassigned from package 'initramfs-tools' to 'btrfs-tools'. Request was from Otavio Salvador <otavio@ossystems.com.br> to control@bugs.debian.org. (Sun, 02 Jan 2011 18:15:17 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions initramfs-tools/0.98.5. Request was from Otavio Salvador <otavio@ossystems.com.br> to control@bugs.debian.org. (Sun, 02 Jan 2011 18:15:19 GMT) Full text and rfc822 format available.

Changed Bug title to 'Didn't include required module in initramfs' from 'btrfs root installation results in initramfs busybox prompt' Request was from Otavio Salvador <otavio@ossystems.com.br> to control@bugs.debian.org. (Sun, 02 Jan 2011 18:15:20 GMT) Full text and rfc822 format available.

Added tag(s) d-i. Request was from Joey Hess <joeyh@debian.org> to control@bugs.debian.org. (Mon, 03 Jan 2011 20:24:05 GMT) Full text and rfc822 format available.

Bug reassigned from package 'btrfs-tools' to 'initramfs-tools'. Request was from Joey Hess <joeyh@debian.org> to control@bugs.debian.org. (Mon, 03 Jan 2011 20:24:06 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#608538; Package initramfs-tools. (Mon, 03 Jan 2011 20:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Mon, 03 Jan 2011 20:39:03 GMT) Full text and rfc822 format available.

Message #41 received at 608538@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: Aron Xu <happyaron.xu@gmail.com>, 608538@bugs.debian.org
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Mon, 3 Jan 2011 16:37:52 -0400
[Message part 1 (text/plain, inline)]
I hope this can be dealt with, it seems to be the only remaining
issue in getting Debian to support btrfs root filesystems. 

This is easily reproducible, I installed from a recent daily build
netinst, put /boot on ext3 and / on btrfs and same problem on boot.

The problem is that btrfs depends on libcrc32c, which demand loads
any of several crc32c implementations, depending on hardware. Those
modules are not declared as dependencies, so initramfs-tools does not
include them.

So, another way to see the same problem:

root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv crc32c.ko ~  
root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko 
insmod: error inserting '../lib/libcrc32c.ko': -1 Unknown symbol in module
root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv ~/crc32c.ko .
root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko
root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>

So, at least a workaround would be for the initramfs to have crc32c added to
it whenever libcrc32c is. Attached patch just adds it to the base modules
list; since btrfs is already there that seems like an ok quick fix.

Note that it would probably be better to try first loading hardware optimised
versions like crc32c-intel, and only load crc32c if they fail to load.

(BTW, this bug probably also breaks netbooting with certian ethernet cards
whose drivers also use libcrc32c.)

-- 
see shy jo
[patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#608538; Package initramfs-tools. (Mon, 03 Jan 2011 21:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Mon, 03 Jan 2011 21:06:03 GMT) Full text and rfc822 format available.

Message #46 received at 608538@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Joey Hess <joeyh@debian.org>, 608538@bugs.debian.org
Cc: Aron Xu <happyaron.xu@gmail.com>
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Mon, 03 Jan 2011 21:03:37 +0000
[Message part 1 (text/plain, inline)]
On Mon, 2011-01-03 at 16:37 -0400, Joey Hess wrote:
> I hope this can be dealt with, it seems to be the only remaining
> issue in getting Debian to support btrfs root filesystems. 
> 
> This is easily reproducible, I installed from a recent daily build
> netinst, put /boot on ext3 and / on btrfs and same problem on boot.
> 
> The problem is that btrfs depends on libcrc32c, which demand loads
> any of several crc32c implementations, depending on hardware. Those
> modules are not declared as dependencies, so initramfs-tools does not
> include them.
> 
> So, another way to see the same problem:
> 
> root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv crc32c.ko ~  
> root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko 
> insmod: error inserting '../lib/libcrc32c.ko': -1 Unknown symbol in module
> root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv ~/crc32c.ko .
> root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko
> root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>
> 
> So, at least a workaround would be for the initramfs to have crc32c added to
> it whenever libcrc32c is. Attached patch just adds it to the base modules
> list; since btrfs is already there that seems like an ok quick fix.

This is stupid.  Without a declared module dependency, a MODULES=dep
configuration will remain broken.  I think this needs to be fixed in the
kernel instead.

> Note that it would probably be better to try first loading hardware optimised
> versions like crc32c-intel, and only load crc32c if they fail to load.

I believe that happens automatically, as the hardware-optimised modules
provide an alias of 'crc32c'.

> (BTW, this bug probably also breaks netbooting with certian ethernet cards
> whose drivers also use libcrc32c.)

Right.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#608538; Package initramfs-tools. (Mon, 03 Jan 2011 21:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Prokop <mika@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Mon, 03 Jan 2011 21:21:03 GMT) Full text and rfc822 format available.

Message #51 received at 608538@bugs.debian.org (full text, mbox):

From: Michael Prokop <mika@debian.org>
To: Ben Hutchings <ben@decadent.org.uk>, 608538@bugs.debian.org
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Mon, 3 Jan 2011 22:16:23 +0100
[Message part 1 (text/plain, inline)]
* Ben Hutchings <ben@decadent.org.uk> [Mon Jan 03, 2011 at 09:03:37PM +0000]:
> On Mon, 2011-01-03 at 16:37 -0400, Joey Hess wrote:
> > I hope this can be dealt with, it seems to be the only remaining
> > issue in getting Debian to support btrfs root filesystems. 

> > This is easily reproducible, I installed from a recent daily build
> > netinst, put /boot on ext3 and / on btrfs and same problem on boot.

> > The problem is that btrfs depends on libcrc32c, which demand loads
> > any of several crc32c implementations, depending on hardware. Those
> > modules are not declared as dependencies, so initramfs-tools does not
> > include them.

> > So, another way to see the same problem:

> > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv crc32c.ko ~  
> > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko 
> > insmod: error inserting '../lib/libcrc32c.ko': -1 Unknown symbol in module
> > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv ~/crc32c.ko .
> > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko
> > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>

> > So, at least a workaround would be for the initramfs to have crc32c added to
> > it whenever libcrc32c is. Attached patch just adds it to the base modules
> > list; since btrfs is already there that seems like an ok quick fix.

> This is stupid.  Without a declared module dependency, a MODULES=dep
> configuration will remain broken.  I think this needs to be fixed in the
> kernel instead.

> > Note that it would probably be better to try first loading hardware optimised
> > versions like crc32c-intel, and only load crc32c if they fail to load.

> I believe that happens automatically, as the hardware-optimised modules
> provide an alias of 'crc32c'.

> > (BTW, this bug probably also breaks netbooting with certian ethernet cards
> > whose drivers also use libcrc32c.)

> Right.

Thanks for showing up, would be nice to see this fixed.

I just want to make sure you're aware of my bugreport #602254
(which Joey seemed to have noticed already according to its
BTS history).

Ben, do you think this could be fixed at the kernel side?

regards,
-mika-
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#608538; Package initramfs-tools. (Mon, 03 Jan 2011 21:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Mon, 03 Jan 2011 21:54:03 GMT) Full text and rfc822 format available.

Message #56 received at 608538@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Michael Prokop <mika@debian.org>, 608538@bugs.debian.org
Cc: Joey Hess <joeyh@debian.org>, Aron Xu <happyaron.xu@gmail.com>
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Mon, 03 Jan 2011 21:50:46 +0000
[Message part 1 (text/plain, inline)]
On Mon, 2011-01-03 at 22:16 +0100, Michael Prokop wrote:
> * Ben Hutchings <ben@decadent.org.uk> [Mon Jan 03, 2011 at 09:03:37PM +0000]:
> > On Mon, 2011-01-03 at 16:37 -0400, Joey Hess wrote:
> > > I hope this can be dealt with, it seems to be the only remaining
> > > issue in getting Debian to support btrfs root filesystems. 
> 
> > > This is easily reproducible, I installed from a recent daily build
> > > netinst, put /boot on ext3 and / on btrfs and same problem on boot.
> 
> > > The problem is that btrfs depends on libcrc32c, which demand loads
> > > any of several crc32c implementations, depending on hardware. Those
> > > modules are not declared as dependencies, so initramfs-tools does not
> > > include them.
> 
> > > So, another way to see the same problem:
> 
> > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv crc32c.ko ~  
> > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko 
> > > insmod: error inserting '../lib/libcrc32c.ko': -1 Unknown symbol in module
> > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>mv ~/crc32c.ko .
> > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>insmod ../lib/libcrc32c.ko
> > > root@gnu:/lib/modules/2.6.32-5-686/kernel/crypto>
> 
> > > So, at least a workaround would be for the initramfs to have crc32c added to
> > > it whenever libcrc32c is. Attached patch just adds it to the base modules
> > > list; since btrfs is already there that seems like an ok quick fix.
> 
> > This is stupid.  Without a declared module dependency, a MODULES=dep
> > configuration will remain broken.  I think this needs to be fixed in the
> > kernel instead.
> 
> > > Note that it would probably be better to try first loading hardware optimised
> > > versions like crc32c-intel, and only load crc32c if they fail to load.
> 
> > I believe that happens automatically, as the hardware-optimised modules
> > provide an alias of 'crc32c'.
> 
> > > (BTW, this bug probably also breaks netbooting with certian ethernet cards
> > > whose drivers also use libcrc32c.)
> 
> > Right.
> 
> Thanks for showing up, would be nice to see this fixed.
> 
> I just want to make sure you're aware of my bugreport #602254
> (which Joey seemed to have noticed already according to its
> BTS history).
> 
> Ben, do you think this could be fixed at the kernel side?

Eventually, yes, but unfortunately it turns out that we can't fix it
immediately.  'depmod' only looks at symbol dependencies; there is no
way for modules to declare explicit dependencies through module
information.  We can bodge it by exporting a specific symbol from crc32c
and referring to that from libcrc32c, but since the optimised version
doesn't satisfy that dependency it will not be loaded.

So I'm afraid this will have to be worked around in initramfs-tools for
now: whenever you add libcrc32c, add crc32c as well (no matter how
libcrc32c was selected).

Ben.

-- 
Ben Hutchings
Once a job is fouled upbv, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#608538; Package initramfs-tools. (Mon, 03 Jan 2011 22:00:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Prokop <mika@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Mon, 03 Jan 2011 22:00:05 GMT) Full text and rfc822 format available.

Message #61 received at 608538@bugs.debian.org (full text, mbox):

From: Michael Prokop <mika@debian.org>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: 608538@bugs.debian.org, Joey Hess <joeyh@debian.org>, Aron Xu <happyaron.xu@gmail.com>
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Mon, 3 Jan 2011 22:57:38 +0100
[Message part 1 (text/plain, inline)]
* Ben Hutchings <ben@decadent.org.uk> [Mon Jan 03, 2011 at 09:50:46PM +0000]:
> On Mon, 2011-01-03 at 22:16 +0100, Michael Prokop wrote:
> > * Ben Hutchings <ben@decadent.org.uk> [Mon Jan 03, 2011 at 09:03:37PM +0000]:
> > > On Mon, 2011-01-03 at 16:37 -0400, Joey Hess wrote:

> > > > So, at least a workaround would be for the initramfs to have crc32c added to
> > > > it whenever libcrc32c is. Attached patch just adds it to the base modules
> > > > list; since btrfs is already there that seems like an ok quick fix.

> > > This is stupid.  Without a declared module dependency, a MODULES=dep
> > > configuration will remain broken.  I think this needs to be fixed in the
> > > kernel instead.

> > > > Note that it would probably be better to try first loading hardware optimised
> > > > versions like crc32c-intel, and only load crc32c if they fail to load.

> > > I believe that happens automatically, as the hardware-optimised modules
> > > provide an alias of 'crc32c'.

> > > > (BTW, this bug probably also breaks netbooting with certian ethernet cards
> > > > whose drivers also use libcrc32c.)

> > > Right.

> > Thanks for showing up, would be nice to see this fixed.

> > I just want to make sure you're aware of my bugreport #602254
> > (which Joey seemed to have noticed already according to its
> > BTS history).

> > Ben, do you think this could be fixed at the kernel side?

> Eventually, yes, but unfortunately it turns out that we can't fix it
> immediately.  'depmod' only looks at symbol dependencies; there is no
> way for modules to declare explicit dependencies through module
> information.  We can bodge it by exporting a specific symbol from crc32c
> and referring to that from libcrc32c, but since the optimised version
> doesn't satisfy that dependency it will not be loaded.

Ok, that's what I expected.

> So I'm afraid this will have to be worked around in initramfs-tools for
> now: whenever you add libcrc32c, add crc32c as well (no matter how
> libcrc32c was selected).

So we should just add crc32c-intel, libcrc32c and crc32c by default
via initramfs-tools for now, ACK?

Thanks.

regards,
-mika-
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#608538; Package initramfs-tools. (Mon, 03 Jan 2011 22:36:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Mon, 03 Jan 2011 22:36:05 GMT) Full text and rfc822 format available.

Message #66 received at 608538@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Michael Prokop <mika@debian.org>
Cc: 608538@bugs.debian.org, Joey Hess <joeyh@debian.org>, Aron Xu <happyaron.xu@gmail.com>
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Mon, 03 Jan 2011 22:32:26 +0000
[Message part 1 (text/plain, inline)]
On Mon, 2011-01-03 at 22:57 +0100, Michael Prokop wrote:
> * Ben Hutchings <ben@decadent.org.uk> [Mon Jan 03, 2011 at 09:50:46PM +0000]:
> > On Mon, 2011-01-03 at 22:16 +0100, Michael Prokop wrote:
> > > * Ben Hutchings <ben@decadent.org.uk> [Mon Jan 03, 2011 at 09:03:37PM +0000]:
> > > > On Mon, 2011-01-03 at 16:37 -0400, Joey Hess wrote:
> 
> > > > > So, at least a workaround would be for the initramfs to have crc32c added to
> > > > > it whenever libcrc32c is. Attached patch just adds it to the base modules
> > > > > list; since btrfs is already there that seems like an ok quick fix.
> 
> > > > This is stupid.  Without a declared module dependency, a MODULES=dep
> > > > configuration will remain broken.  I think this needs to be fixed in the
> > > > kernel instead.
> 
> > > > > Note that it would probably be better to try first loading hardware optimised
> > > > > versions like crc32c-intel, and only load crc32c if they fail to load.
> 
> > > > I believe that happens automatically, as the hardware-optimised modules
> > > > provide an alias of 'crc32c'.
> 
> > > > > (BTW, this bug probably also breaks netbooting with certian ethernet cards
> > > > > whose drivers also use libcrc32c.)
> 
> > > > Right.
> 
> > > Thanks for showing up, would be nice to see this fixed.
> 
> > > I just want to make sure you're aware of my bugreport #602254
> > > (which Joey seemed to have noticed already according to its
> > > BTS history).
> 
> > > Ben, do you think this could be fixed at the kernel side?
> 
> > Eventually, yes, but unfortunately it turns out that we can't fix it
> > immediately.  'depmod' only looks at symbol dependencies; there is no
> > way for modules to declare explicit dependencies through module
> > information.  We can bodge it by exporting a specific symbol from crc32c
> > and referring to that from libcrc32c, but since the optimised version
> > doesn't satisfy that dependency it will not be loaded.
> 
> Ok, that's what I expected.

Actually, 'modprobe' will completely ignore aliases if there is a module
whose real name matches the requested name.  So currently crc32c-intel
will never be automatically loaded!

> > So I'm afraid this will have to be worked around in initramfs-tools for
> > now: whenever you add libcrc32c, add crc32c as well (no matter how
> > libcrc32c was selected).
> 
> So we should just add crc32c-intel, libcrc32c and crc32c by default
> via initramfs-tools for now, ACK?

Try this.  I've made it reasonably generic so you can easily add other
hidden dependencies like tg3 -> broadcom.

Ben.

From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 3 Jan 2011 21:58:24 +0000
Subject: [PATCH] Handle hidden dependency of libcrc32c on crc32c

'depmod' only looks at symbol dependencies; there is no way for
modules to declare explicit dependencies through module information,
so dependencies on e.g. crypto providers are hidden.  Until this is
fixed, we need to handle those hidden dependencies.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 hook-functions |   14 ++++++++++++++
 mkinitramfs    |    3 +++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/hook-functions b/hook-functions
index c559651..d77c295 100644
--- a/hook-functions
+++ b/hook-functions
@@ -484,6 +484,20 @@ auto_add_modules()
 	esac
 }
 
+# 'depmod' only looks at symbol dependencies; there is no way for
+# modules to declare explicit dependencies through module information,
+# so dependencies on e.g. crypto providers are hidden.  Until this is
+# fixed, we need to handle those hidden dependencies.
+hidden_dep_add_modules()
+{
+	for dep in "lib/libcrc32c crc32c"; do
+		set -- $dep
+		if [ -f "${DESTDIR}/lib/modules/${version}/kernel/$1.ko" ]; then
+			manual_add_modules "$2"
+		fi
+	done
+}
+
 # mkinitramfs help message
 usage()
 {
diff --git a/mkinitramfs b/mkinitramfs
index 0bb7806..40eb35b 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -232,6 +232,9 @@ list)
 	;;
 esac
 
+# Resolve hidden dependencies
+hidden_dep_add_modules
+
 # Have to do each file, because cpio --dereference doesn't recurse down
 # symlinks.
 
-- 
1.7.2.3

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#608538; Package initramfs-tools. (Tue, 04 Jan 2011 03:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to tim.gardner@canonical.com:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Tue, 04 Jan 2011 03:06:03 GMT) Full text and rfc822 format available.

Message #71 received at 608538@bugs.debian.org (full text, mbox):

From: Tim Gardner <tcanonical@tpi.com>
To: Ben Hutchings <ben@decadent.org.uk>, 608538@bugs.debian.org
Cc: Michael Prokop <mika@debian.org>, Joey Hess <joeyh@debian.org>, Aron Xu <happyaron.xu@gmail.com>
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Mon, 03 Jan 2011 19:31:39 -0700
[Message part 1 (text/plain, inline)]
On 01/03/2011 03:32 PM, Ben Hutchings wrote:
>
> Try this.  I've made it reasonably generic so you can easily add other
> hidden dependencies like tg3 ->  broadcom.
>
> Ben.
>

I wrote a couple of macros for Karmic to solve a race problem that might 
be applicable here. I think there are several areas of the kernel that 
suffer from this type of indirect runtime registration issue. 
Unfortunately, this patch requires that you hack the macro values into 
the offending modules.

rtg

-- 
Tim Gardner tim.gardner@canonical.com
[0001-UBUNTU-SAUCE-Created-MODULE_EXPORT-MODULE_IMPORT-mac.patch (text/x-patch, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#608538; Package initramfs-tools. (Tue, 04 Jan 2011 03:18:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Tue, 04 Jan 2011 03:18:03 GMT) Full text and rfc822 format available.

Message #76 received at 608538@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: tim.gardner@canonical.com
Cc: 608538@bugs.debian.org, Michael Prokop <mika@debian.org>, Joey Hess <joeyh@debian.org>, Aron Xu <happyaron.xu@gmail.com>
Subject: Re: Bug#608538: btrfs root installation results in initramfs busybox prompt
Date: Tue, 04 Jan 2011 03:14:39 +0000
[Message part 1 (text/plain, inline)]
On Mon, 2011-01-03 at 19:31 -0700, Tim Gardner wrote:
> On 01/03/2011 03:32 PM, Ben Hutchings wrote:
> >
> > Try this.  I've made it reasonably generic so you can easily add other
> > hidden dependencies like tg3 ->  broadcom.
> >
> > Ben.
> >
> 
> I wrote a couple of macros for Karmic to solve a race problem that might 
> be applicable here.
[...]

There are (at least) three different though similar problems:

1. The GART/GPU initialisation ordering problem.  The artificial symbol
dependency works for i915, but the problem remains for other GPU drivers
which can't depend on a specific GART driver.  Our solution was to
build-in all the GART drivers, as they are quite small.

2. Network driver dependency on a PHY driver.  There's no ordering
problem because we now generate and use module aliases based on MDIO
IDs.  However, the PHY module dependency is discovered dynamically, so
it is hidden from initramfs-tools.  (This is not a problem when
MODULES=most, because mkinitramfs then includes all modules under
drivers/net/phy.)  The artifical symbol dependency can be used as a
workaround, at the cost of loading modules that aren't needed.

3. For crypto users and drivers, the dependency is discovered
dynamically, so again it is hidden from initramfs-tools.  The artifical
symbol dependency can be used as a workaround, but optimised drivers
will not be loaded automatically.  (Though for the specific case of
crc32c this is broken anyway.)

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Forcibly Merged 602254 603578 608538. Request was from Joey Hess <joeyh@debian.org> to control@bugs.debian.org. (Sat, 08 Jan 2011 15:51:10 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from maximilian attems <maks@debian.org> to control@bugs.debian.org. (Fri, 28 Jan 2011 10:21:16 GMT) Full text and rfc822 format available.

Reply sent to maximilian attems <maks@debian.org>:
You have taken responsibility. (Fri, 28 Jan 2011 14:51:06 GMT) Full text and rfc822 format available.

Notification sent to Aron Xu <happyaron.xu@gmail.com>:
Bug acknowledged by developer. (Fri, 28 Jan 2011 14:51:06 GMT) Full text and rfc822 format available.

Message #85 received at 608538-close@bugs.debian.org (full text, mbox):

From: maximilian attems <maks@debian.org>
To: 608538-close@bugs.debian.org
Subject: Bug#608538: fixed in initramfs-tools 0.98.8
Date: Fri, 28 Jan 2011 14:48:25 +0000
Source: initramfs-tools
Source-Version: 0.98.8

We believe that the bug you reported is fixed in the latest version of
initramfs-tools, which is due to be installed in the Debian FTP archive:

initramfs-tools_0.98.8.dsc
  to main/i/initramfs-tools/initramfs-tools_0.98.8.dsc
initramfs-tools_0.98.8.tar.gz
  to main/i/initramfs-tools/initramfs-tools_0.98.8.tar.gz
initramfs-tools_0.98.8_all.deb
  to main/i/initramfs-tools/initramfs-tools_0.98.8_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 608538@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
maximilian attems <maks@debian.org> (supplier of updated initramfs-tools package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 28 Jan 2011 15:11:10 +0100
Source: initramfs-tools
Binary: initramfs-tools
Architecture: source all
Version: 0.98.8
Distribution: unstable
Urgency: high
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: maximilian attems <maks@debian.org>
Description: 
 initramfs-tools - tools for generating an initramfs
Closes: 608339 608538 608865
Changes: 
 initramfs-tools (0.98.8) unstable; urgency=high
 .
   [ maximilian attems ]
   * [67c1d32] initramfs-tools: MODULES=dep fix for ubifs /
     (Closes: #608339)
   * [ca4d08a] mkinitramfs: Fix noexec /tmp detection for long device
     names. (Closes: #608865) Thanks to Ian Campbell <ijc@hellion.org.uk>
 .
   [ Ben Hutchings ]
   * [78d9e04] initramfs-tools: Handle hidden dependency of libcrc32c on
     crc32c. (Closes: #608538)
Checksums-Sha1: 
 c35a1f91eeea135efb5b3e59d266c9ed88d26313 973 initramfs-tools_0.98.8.dsc
 eed439c0ec0db77684d86f0dc24497def63bc0f2 83169 initramfs-tools_0.98.8.tar.gz
 df235fd729ec526340d6c7a4874617f17596580e 89496 initramfs-tools_0.98.8_all.deb
Checksums-Sha256: 
 f7fc2339af15e4cbc1c2fe7088934a53df81607c0d81e2b315b5f8c8792003a5 973 initramfs-tools_0.98.8.dsc
 43342b7222eb5209f42a2d3146d4d1e9431baca536ed8a31800eb9f09a74c2bd 83169 initramfs-tools_0.98.8.tar.gz
 3115c15333e0327e8c4646b47e34490a1c2ae84da97dea811677c78c00df3460 89496 initramfs-tools_0.98.8_all.deb
Files: 
 32c35f10a6d3d9ee114d2d2709eda2e5 973 utils optional initramfs-tools_0.98.8.dsc
 933ff0d675ed86aa29c34453c3d07989 83169 utils optional initramfs-tools_0.98.8.tar.gz
 d8060188797be39c0d82e360d6436cd8 89496 utils optional initramfs-tools_0.98.8_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1C0I0ACgkQeW7Lc5tEHqiangCggvsSpXc46i717T76QbQTZLLa
JGYAn2xrhze7otXfFFizM/LuIIp+hNE/
=9mEK
-----END PGP SIGNATURE-----





Reply sent to maximilian attems <maks@debian.org>:
You have taken responsibility. (Fri, 28 Jan 2011 14:51:07 GMT) Full text and rfc822 format available.

Notification sent to Michael Prokop <mika@debian.org>:
Bug acknowledged by developer. (Fri, 28 Jan 2011 14:51:07 GMT) Full text and rfc822 format available.

Reply sent to maximilian attems <maks@debian.org>:
You have taken responsibility. (Fri, 28 Jan 2011 14:51:08 GMT) Full text and rfc822 format available.

Notification sent to Colomban Wendling <lists.ban@herbesfolles.org>:
Bug acknowledged by developer. (Fri, 28 Jan 2011 14:51:08 GMT) Full text and rfc822 format available.

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 27 Feb 2011 07:32:48 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 13:33:25 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.