Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #52762 > unrolled thread

Bug#814288: Generates corrupt (?) initrd images

Started byChristopher David Howie <me@chrishowie.com>
First post2016-02-10 00:00 +0100
Last post2016-07-22 18:40 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.debian.kernel


Contents

  Bug#814288: Generates corrupt (?) initrd images Christopher David Howie <me@chrishowie.com> - 2016-02-10 00:00 +0100
    Processed: Re: Bug#814288: Generates corrupt (?) initrd images owner@bugs.debian.org (Debian Bug Tracking System) - 2016-02-10 17:20 +0100
    Bug#814288: Generates corrupt (?) initrd images Ben Hutchings <ben@decadent.org.uk> - 2016-02-10 17:20 +0100
      Bug#814288: Generates corrupt (?) initrd images Christopher David Howie <me@chrishowie.com> - 2016-02-10 19:10 +0100
    Bug#814288: marked as done (Generates corrupt (?) initrd images) owner@bugs.debian.org (Debian Bug Tracking System) - 2016-07-22 18:40 +0200

#52762 — Bug#814288: Generates corrupt (?) initrd images

FromChristopher David Howie <me@chrishowie.com>
Date2016-02-10 00:00 +0100
SubjectBug#814288: Generates corrupt (?) initrd images
Message-ID<r0pqj-251-47@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Package: initramfs-tools
Version: 0.120

I have a rather odd case where update-initramfs sometimes generates good
initrds and sometimes it does not.  I'm not sure if the bug lies here or
in the kernel, but after sinking hours into investigating this issues
I'm very confident there is a bug somewhere.  I figure I will start with
this package and see where we get.

Kernel info, for the record:

-----
Linux debian-workstation 3.16.0-4-amd64 #1 SMP Debian
3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
-----

Every initrd generated on the target machine with "update-initramfs -k
all -u" causes a kernel panic on the next boot:

-----
Initramfs unpacking failed: no cpio magic
/bin/sh: error while loading shared libraries: libc.so.6: cannot open
shared object file: No such file or directory
(usual "attempted to kill init" flood)
-----

However, if I boot from the amd64-8.1.0 netinstall CD in rescue mode and
select the options that will chroot me into the root volume of the
target machine and run the same update-initramfs command there, then the
machine boots.

I captured an example of a working and a broken initrd.  If I extract
them (gunzip < $file | cpio -i -dv) and diff the two trees, only one
file reports as being different: /etc/boottime.kmap.gz .  If I gunzip
this file in both trees, diff reports no differences.

I am at a total loss to explain this behavior.  The same
update-initramfs / mkinitramfs are used to build both, since I am
chroot'd into the root volume when building from the rescue CD.  The
only different pieces are the running kernel, and various mounts (/dev,
/proc, etc.).  The same kernel is used to actually boot both generated
initrds.

Since the initrds are not small, I'm linking them instead of attaching them.

Working:
<http://static.chrishowie.com/files/initrd.img-3.16.0-4-amd64.working>

Broken:
<http://static.chrishowie.com/files/initrd.img-3.16.0-4-amd64.broken>

Thanks for your time,

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5

------------------------------------------------------------------------
                    IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.



[toc] | [next] | [standalone]


#52773 — Processed: Re: Bug#814288: Generates corrupt (?) initrd images

Fromowner@bugs.debian.org (Debian Bug Tracking System)
Date2016-02-10 17:20 +0100
SubjectProcessed: Re: Bug#814288: Generates corrupt (?) initrd images
Message-ID<r0FEJ-4vM-3@gated-at.bofh.it>
In reply to#52762
Processing control commands:

> tag -1 moreinfo unreproducible
Bug #814288 [initramfs-tools] Generates corrupt (?) initrd images
Added tag(s) moreinfo and unreproducible.

-- 
814288: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814288
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#52774

FromBen Hutchings <ben@decadent.org.uk>
Date2016-02-10 17:20 +0100
Message-ID<r0FEJ-4vM-5@gated-at.bofh.it>
In reply to#52762

[Multipart message — attachments visible in raw view] — view raw

Control: tag -1 moreinfo unreproducible

On Tue, 2016-02-09 at 17:51 -0500, Christopher David Howie wrote:
> Package: initramfs-tools
> Version: 0.120
> 
> I have a rather odd case where update-initramfs sometimes generates good
> initrds and sometimes it does not.  I'm not sure if the bug lies here or
> in the kernel, but after sinking hours into investigating this issues
> I'm very confident there is a bug somewhere.  I figure I will start with
> this package and see where we get.
> 
> Kernel info, for the record:
> 
> -----
> Linux debian-workstation 3.16.0-4-amd64 #1 SMP Debian
> 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
> -----
> 
> Every initrd generated on the target machine with "update-initramfs -k
> all -u" causes a kernel panic on the next boot:

Which boot loader are you using?

[...]
> I captured an example of a working and a broken initrd.  If I extract
> them (gunzip < $file | cpio -i -dv) and diff the two trees, only one
> file reports as being different: /etc/boottime.kmap.gz .  If I gunzip
> this file in both trees, diff reports no differences.
[...]

diffoscope (https://try.diffoscope.org/) agrees with that.

This works for me:

    kvm -m 1G -kernel /boot/vmlinuz-3.16.0-4-amd64 -initrd initrd.img-3.16.0-4-amd64.broken

Of course the initramfs can't find your root device, but it eventually
drops to a rescue shell.  Which I can't use because... is that 
Dvorak layout?

Ben.

-- 
Ben Hutchings
Beware of bugs in the above code;
I have only proved it correct, not tried it. - Donald Knuth

[toc] | [prev] | [next] | [standalone]


#52781

FromChristopher David Howie <me@chrishowie.com>
Date2016-02-10 19:10 +0100
Message-ID<r0Hnd-5O7-43@gated-at.bofh.it>
In reply to#52774

[Multipart message — attachments visible in raw view] — view raw

On 2/10/2016 11:10 AM, Ben Hutchings wrote:
> Which boot loader are you using?

Grub 2.

> diffoscope (https://try.diffoscope.org/) agrees with that.
> 
> This works for me:
> 
>     kvm -m 1G -kernel /boot/vmlinuz-3.16.0-4-amd64 -initrd initrd.img-3.16.0-4-amd64.broken

Huh.  This is only making me more confused.  The .broken initrd image
consistently gives me "no cpio magic" panics.

The machine is a VirtualBox VM.  Perhaps I can produce a small VM image
that reproduces the problem.  Since the failure is in loading the
initrd, an image with just a /boot volume should be sufficient to
reproduce this specific failure.

> Of course the initramfs can't find your root device, but it eventually
> drops to a rescue shell.  Which I can't use because... is that 
> Dvorak layout?

It is.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5

------------------------------------------------------------------------
                    IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.

[toc] | [prev] | [next] | [standalone]


#54757 — Bug#814288: marked as done (Generates corrupt (?) initrd images)

Fromowner@bugs.debian.org (Debian Bug Tracking System)
Date2016-07-22 18:40 +0200
SubjectBug#814288: marked as done (Generates corrupt (?) initrd images)
Message-ID<rXLEt-8aa-13@gated-at.bofh.it>
In reply to#52762

[Multipart message — attachments visible in raw view] — view raw

Your message dated Fri, 22 Jul 2016 12:23:06 -0400
with message-id <2744ab28-8a74-0e11-7323-45255a0bec93@chrishowie.com>
and subject line Re: Bug#814288: Generates corrupt (?) initrd images
has caused the Debian Bug report #814288,
regarding Generates corrupt (?) initrd images
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
814288: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814288
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web