Kernel panic when booting with initramfs-tools version 0.120ubuntu1 generated initramfs

Bug #1481733 reported by Daniel Winzen
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
busybox (Ubuntu)
Fix Released
High
Andy Whitcroft
initramfs-tools (Ubuntu)
Fix Released
High
Andy Whitcroft

Bug Description

After updating initramfs-tools to version 0.120ubuntu1 the kernel stops with a kernel panic during boot.


Begin Running /scripts/local-bottom...
Begin Running /scripts/init-bottom...
done.
/init: exec: line 372: switch_root: not found
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200

For the rest of the backtrace, see the attached image.

Revision history for this message
Daniel Winzen (q-d-deactivatedaccount) wrote :
Revision history for this message
Daniel Winzen (q-d-deactivatedaccount) wrote :
Revision history for this message
Andy Whitcroft (apw) wrote :

@Daniel -- could you attach the broken initramfs from /boot please.

This seems very odd to my eye as we should only use switch_root if we have found switch_root present as a command on the previous line in /init.

  if [ -z "$drop_caps" ] && command -v switch_root >/dev/null 2>&1; then
        exec switch_root ${rootmnt} ${init} "$@" ${recovery:+--startup-event=recovery} <${rootmnt}/dev/console >${rootmnt}/dev/console 2>&1
  elif command -v run-init >/dev/null 2>&1; then
        exec run-init ${drop_caps} ${rootmnt} ${init} "$@" ${recovery:+--startup-event=recovery} <${rootmnt}/dev/console >${rootmnt}/dev/console 2>&1
  fi

Changed in initramfs-tools (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Andy Whitcroft (apw)
Revision history for this message
Daniel Winzen (q-d-deactivatedaccount) wrote :

Sure, here it is

Revision history for this message
Andy Whitcroft (apw) wrote :

Do you have the intel-microcode package installed on this system by any chance?

Revision history for this message
Daniel Winzen (q-d-deactivatedaccount) wrote :

Yes, it is installed.

Revision history for this message
Daniel Winzen (q-d-deactivatedaccount) wrote :

I just removed intel-microcode and tested again. Still the same issue as soon as I upgrade initramfs-tools and reboot.

Revision history for this message
Harry (harry33) wrote :

Same here, kernel panic with v. 0.120ubuntu1
I also use intel-microcode; remiving does not solve anything.
However, intramfs.tools_0.103ubuntu16 works well.
I had to chroot to downgrade to that one.

Revision history for this message
Thomas Karl Pietrowski (thopiekar) wrote :

Also happens here. Every newly installed linux versions fail here. Using amd-microcode here, so IMO it happens during upgrade of initramfs-tools.
Is there a workaround?

Revision history for this message
Harry (harry33) wrote :

The correct workaround or fix for the time being is to downgrade the version 0.120ubuntu1 to the working version 0.103ubuntu16.

You will need to chroot the root partition to do this.
I believe package intel-microcode has nothing to with this.

Revision history for this message
Andy Whitcroft (apw) wrote :

@Daniel -- ok could I have the broken /boot/initrd file from that it built without intel-microcode. Also I think I am going to need a transcript of the upgrade process as well, so as you install 120 and it eats your initrd. I cannot for the life of me tickle this in my installs.

Revision history for this message
Andy Whitcroft (apw) wrote :

@Daniel -- could you also run the update-initramfs -v -u -k `uname -r` after the upgrade of initramfs-tools and before you reboot. The output with -v should tell us what exactly it did when rebuilding. Attach what it produces and the initrd as well please. Thanks.

Revision history for this message
Daniel Winzen (q-d-deactivatedaccount) wrote :

Ok, I attached an archive with both, the old and the new initrd and update-initrd logs for comparison.
To minimize the size, I uninstalled the linux-image-extra-* and linux-firmware packages, but the issue is still the same.

Revision history for this message
Andy Whitcroft (apw) wrote :

@Daniel -- ok your log implies that somehow you do not have busybox-static installed, which is supprising me somewhat. Could you also append a dpkg -l listing please.

Revision history for this message
Daniel Winzen (q-d-deactivatedaccount) wrote :

@Andy -- Well, I thought that's what the busybox-initramfs package was for. I didn't have that package installed for years and never had any problems. But I just tested the upgrade again after installing busybox-static and it solves this issue.
Maybe busybox-static should be added as a dependency?

Revision history for this message
Andy Whitcroft (apw) wrote :

Ahh enlightenment dawns, actually you shoudn't need busybox-static and this is a hooks issue in busybox. Will poke that.

Changed in busybox (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Andy Whitcroft (apw)
milestone: none → ubuntu-15.08
Changed in initramfs-tools (Ubuntu):
milestone: none → ubuntu-15.08
Revision history for this message
Andy Whitcroft (apw) wrote :

Ok, I think we have this one licked. The packages in the PPA below should sort this issue out. @Daniel -- if you could test them out and confirm that would be helpful, but I am fairly confident this is your issue (it is cirtainly _an_ issue). Please report any testing back here. Thanks:

    https://launchpad.net/~apw/+archive/ubuntu/initramfs-tools/

tags: added: block-proposed blocks-proposed
Revision history for this message
Daniel Winzen (q-d-deactivatedaccount) wrote :

@Andy -- Yes, the PPA version resolves the issue, booting fine. Thanks!

Revision history for this message
Andy Whitcroft (apw) wrote :

@Daniel -- thanks for the quick feedback.

Revision history for this message
Harry (harry33) wrote :

I can confirm too, the PPA solved the issue.
I also have only busybox-initramfs installed.

Andy Whitcroft (apw)
Changed in busybox (Ubuntu):
status: In Progress → Fix Committed
Changed in initramfs-tools (Ubuntu):
status: In Progress → Fix Committed
Andy Whitcroft (apw)
tags: removed: block-proposed blocks-proposed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package busybox - 1:1.22.0-9ubuntu2

---------------
busybox (1:1.22.0-9ubuntu2) wily; urgency=medium

  * Move zz-busybox to busybox-initramfs to ensure we get links to all
    the tools we need, stop shipping it anywhere else. (LP: #1481733)
  * Prefer busybox commands over klibc commands where there is duplication.

 -- Andy Whitcroft <email address hidden> Fri, 07 Aug 2015 13:03:51 +0100

Changed in busybox (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.120ubuntu2

---------------
initramfs-tools (0.120ubuntu2) wily; urgency=medium

    * update-initramfs: switch dpkg --compare-versions from > to >=
      to avoid warnings from dpkg. (LP: #1480340)
    * debian/control: update Vcs-* links for Ubuntu.
    * scripts/functions: use :> rather than touch to create fsck
      stamp. (LP: #1481789)
    * hooks/busybox: revert local changes, these now need to occur
      in the new late zz-busybox-initramfs hook. (LP: #1481733)

 -- Andy Whitcroft <email address hidden> Wed, 05 Aug 2015 13:02:34 +0100

Changed in initramfs-tools (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.