update-initramfs: deferring update (trigger activated) / cp: cannot stat `/vmlinuz': No such file or directory

Bug #557023 reported by Terry Jones on 2010-04-07
This bug affects 487 people
Affects Status Importance Assigned to Milestone
casper (Ubuntu)
High
Evan
Nominated for Karmic by Gary M
Lucid
High
Unassigned
Maverick
High
Unassigned
Natty
High
Evan
usb-creator (Ubuntu)
High
Unassigned
Nominated for Karmic by Gary M
Lucid
Undecided
Unassigned
Maverick
Undecided
Unassigned
Natty
High
Unassigned

Bug Description

Stable update justification:

Impact: USB stick upgrades fail with obscure errors when upgrading the kernel. This results in very large numbers of duplicate bug reports.

Development branch: Fixed in casper 1.253/1.254 by making the writable-USB-stick update-initramfs shim more robust against the bits it's copying not existing for various reasons, and making it be a separate executable which can be upgraded in ways that don't involve regenerating the USB stick.

Patch:
 http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/lucid/casper/lucid/revision/818?compare_revid=814
 http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/maverick/casper/maverick/revision/843?compare_revid=841

TEST CASE: Create an Ubuntu USB stick, making sure that you do *not* drag the "Stored in reserved extra space" slider all the way to the right in usb-creator (see bug 562312), and run 'sudo update-initramfs -u'. 10.04.1 and 10.10 as released should fail. A lucid daily build dating from after this SRU is accepted should succeed (we're unlikely to do more daily builds of maverick). Also, if you start from 10.04.1 or 10.10 as released, upgrade the casper package to the current version in lucid-proposed or maverick-proposed after this SRU is accepted, and then run 'sudo update-initramfs -u', that should succeed.

Regression potential: I don't think update-initramfs will fail in any more situations due to this change. Possible sources of regression are problems upgrading the casper package, and testers should also make sure that the upgraded image actually still boots following this change.

Please note the similar bug 591207, which we're fixing along with this bug, and the related bug 591202 in grub2, which you may run into along the way.

Original bug report:

== description ==
update-initramfs failed on liveUSB because /vmlinux symlink doesn't exists

some users reported to have build the installation media with Universal-USB-Installer

== workaround ==
create /vmlinuz symbolic link to point to /cdrom/casper/vmlinuz

$ ln -s /cdrom/casper/vmlinuz /vmlinuz

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: bcmwl-kernel-source 5.60.48.36+bdcom-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-19.28-generic 2.6.32.10+drm33.1
Uname: Linux 2.6.32-19-generic i686
NonfreeKernelModules: wl
AptOrdering:
 initramfs-tools: Configure
 bcmwl-kernel-source: Configure
Architecture: i386
Date: Tue Apr 6 23:52:35 2010
ErrorMessage: subprocess installed post-installation script returned error exit status 1
LiveMediaBuild: Ubuntu 10.04 "Lucid Lynx" - Beta i386 (20100406.1)
SourcePackage: bcmwl
Title: package bcmwl-kernel-source 5.60.48.36+bdcom-0ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Terry Jones (terryjones28056) wrote :
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report

The relevant error is
---
Setting up initramfs-tools (0.92bubuntu71) ...
update-initramfs: deferring update (trigger activated)
cp: cannot stat `/vmlinuz': No such file or directory
dpkg: error processing initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1

Affecting to initramfs-tools

affects: bcmwl (Ubuntu) → initramfs-tools (Ubuntu)
summary: - package bcmwl-kernel-source 5.60.48.36+bdcom-0ubuntu2 failed to
- install/upgrade: subprocess installed post-installation script returned
- error exit status 1
+ update-initramfs: deferring update (trigger activated) / cp: cannot stat
+ `/vmlinuz': No such file or directory
Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Gary M (garym) wrote :

Occurs for me doing the many updates from lucid beta 2 UNE "live USB with persistent storage". This prevented the linux-generic update completing properly. IIRC, I had the same error with karmic UNR on its first kernel update.

/vmlinuz was a broken link to boot/vmlinuz-2.6.32-19-generic which did not exist. /boot/vmlinuz-2.6.32-20-generic did exist, and all other files in /boot were pairs for versions 2.6.32.19 and 2.6.32.30. The squashfs in /cdrom/casper/ has the same broken /vmlinuz link. Also, /cdrom/casper/ contains a real vmlinuz file, probably version 2.6.32.19.

Workaround was to copy /cdrom/casper/vmlinuz to /boot/vmlinuz-2.6.32-19-generic. After reinstalling initramfs-tools, /vmlinuz was a link to /boot/vmlinuz-2.6.32-20-generic as expected.

Jean-Baptiste Lallement (jibel) wrote :

@Terry Jones, is your system installed on an USB device ?
All other reports are installed on a USB device.

Changed in initramfs-tools (Ubuntu):
status: Confirmed → Incomplete
Jean-Baptiste Lallement (jibel) wrote :

Looks like it happens only on live usb.
Affecting to casper.

affects: initramfs-tools (Ubuntu) → casper (Ubuntu)
Terry Jones (terryjones28056) wrote :

"@Terry Jones, is your system installed on an USB device ?"

Sorry for the delay. Yes, I am using 2 USB devices (one 32bit, one 64bit)

Thanks,
Terry

Jean-Baptiste Lallement (jibel) wrote :

Thanks for following up. Setting status to triaged.

Changed in casper (Ubuntu):
status: Incomplete → Triaged
tictactoe (xavier-garel) wrote :

I got same error while installing lvm2 on USB live media :

Paramétrage de watershed (5) ...
update-initramfs: deferring update (trigger activated)
gzip: /initrd.img.gz: No such file or directory
cp: ne peut évaluer `/vmlinuz': Aucun fichier ou dossier de ce type
dpkg : erreur de traitement de watershed (--configure) :
 le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1
dpkg : des problèmes de dépendances empêchent la configuration de lvm2 :
 lvm2 dépend de watershed (>= 2) ; cependant :
 Le paquet watershed n'est pas encore configuré.
dpkg : erreur de traitement de lvm2 (--configure) :
 problèmes de dépendances - laissé non configuré
Traitement des actions différées (« triggers ») pour « libc-bin »...
ldconfig deferred processing now taking place
Pas de rapport Apport écrit car le message d'erreur indique que c'est la suite d'une erreur précédente.
                       Traitement des actions différées (« triggers ») pour « initramfs-tools »...
update-initramfs: Generating /boot/initrd.img-2.6.32-21-generic
cp: ne peut évaluer `/vmlinuz': Aucun fichier ou dossier de ce type
dpkg : erreur de traitement de initramfs-tools (--configure) :
 le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1
Des erreurs ont été rencontrées pendant l'exécution :
 watershed
 lvm2
 initramfs-tools

Evan P (evplatt-gmail) wrote :

I also encountered this problem on a liveUsb installation, while trying to install bcmwl-kernel-source.

As a workaround (slightly different from Gary M's), I just corrected the /vmlinuz symbolic link to point to /cdrom/casper/vmlinuz.

The installation the finished successfully.

Marian Popescu (popescubm) wrote :
Marian Popescu (popescubm) wrote :
Marian Popescu (popescubm) wrote :
Marian Popescu (popescubm) wrote :
Akagi (akagi010) wrote :

Hello,

this bug is still in the final release of Ubuntu 10.04 UBR.

Is there a workaround available? I use lvm on my netbook and I cannot access it without updating a live installation on an USB stick.

Best regards!

Akagi (akagi010) wrote :

Hello,

please disregard my last comment. I promise to read the threads before posting another one.

Best regards!

Changed in casper (Ubuntu):
importance: Medium → High
description: updated
Savvas Radevic (medigeek) wrote :

Should we add usb-creator to the affected packages?

Tobias Gesellchen (gesellix) wrote :

Using the mentioned workarounds lets me update the kernel, but the next reboot fails. See the attached screenshot.

the symbolic links and corresponding files have been successfully updated:
- /initrd.gz (or a filename similar to that)
- /vmlinuz

I'm using UNE 10.04 on a USB stick.

Changed in usb-creator (Ubuntu):
status: New → Triaged
importance: Undecided → High
description: updated

> Using the mentioned workarounds lets me update the kernel, but the next
> reboot fails. See the attached screenshot.

Tobias, is there a reason you changed initrd.gz? Changing *only* the
/vmlinuz link worked for me:

sudo rm /vmlinuz
sudo ln -s /cdrom/casper/vmlinuz /vmlinuz

(I might be wrong about the last command, I mix up the parameters sometimes.)

Tobias Gesellchen (gesellix) wrote :

Savvas, there was no particular reason to change or recreate initrd.gz - I don't remember exactly, but I suppose the file or link was missing, too. So there was some reason, but that didn't fix it.

I forgot to mention here, that there is some kind of error in reasoning when updating a kernel of a live system: the live system is mounted read-only and updates to the kernel don't update the kernel in the live image. One cannot expect that updates would also change the read-only image...

I reached a point where I can update the kernel without getting errors on the next reboot: there is some script (if I remember right it was 'update-initramfs') which is a bit modified on live images compared to real installations. I made changes to that script according to the real one so that executing the script wouldn't break my installation anymore.

For me, there's one decision to be made and to be tested:
option 1: complete install of ubuntu on a usb?
option 2: installing a live image on a usb and make the image somehow writable?

i-Moi (e-transaction) wrote :

Hi,

I also am using UNE 10.04 on a SD-Card, in a Dell Mini 10v (Inspiron), with a Broadcom 4312 Wifi chipset, and got the same issue, after various upgrades, installations and uninstalling some programs.

As most Dell Mini 10v user, I couldn't connect to Wifi networks, and I finally had decided to uninstall Network Manager, and replace it with Wicd. The Wicd installation having failed in uninstall all the components (or dependencies, I don't know, I'm a complete newbie), I uinistalled completely Network Manager (through Synaptic "complete uninstall").

At first it seemed to work, but finally ceased to. I then decided to do a U turn and get back to network manager, and got the same messages I read above.

So clearly there's an issue about USB live installs, UNE, and maybe Broadcom chipsets...
Best regards

i-Moi

nh2 (nh2) wrote :

This bug is affecting Ubuntu 10.10 final. If you use it to create a 10.10 persistant USB startup disk with Startup Disk Creator, your cannot install packages such as lvm2 due to this error.

nh2 (nh2) wrote :

Do you think this is a duplicate of Bug #591207?

Charlie Kravetz (charlie-tca) wrote :

nh2: no, this is not a duplicate of bug 591207. That bug was fixed on 2010-06-28 while this one is still affecting users as of 2010-10-11. The fix that worked for the other bug did not fix this issue.

Johnnel (johnnelito) wrote :

the suggested workaround for vmlinuz worked for me too...

Used LiLi Usb Live creator for Kubuntu 10.10 i386

Bryce Harrington (bryce) wrote :

Bug #562312 might be another to look at.

Changed in casper (Ubuntu Natty):
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Changed in casper (Ubuntu Natty):
assignee: Canonical Foundations Team (canonical-foundations) → Evan Dandrea (ev)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package casper - 1.253

---------------
casper (1.253) natty; urgency=low

  * Don't try to process the initramfs and kernel if the real update-
    initramfs hasn't generated anything (LP: #557023).
 -- Evan Dandrea <email address hidden> Wed, 05 Jan 2011 12:07:47 +0000

Changed in casper (Ubuntu Natty):
status: Triaged → Fix Released
Evan (ev) on 2011-01-05
Changed in usb-creator (Ubuntu Natty):
status: Triaged → Invalid
Colin Watson (cjwatson) on 2011-01-20
Changed in casper (Ubuntu Lucid):
status: New → In Progress
Changed in casper (Ubuntu Maverick):
status: New → Triaged
Changed in casper (Ubuntu Lucid):
importance: Undecided → High
Changed in casper (Ubuntu Maverick):
importance: Undecided → High
Changed in casper (Ubuntu Lucid):
milestone: none → ubuntu-10.04.2
Changed in usb-creator (Ubuntu Lucid):
status: New → Invalid
Changed in usb-creator (Ubuntu Maverick):
status: New → Invalid
Colin Watson (cjwatson) on 2011-01-20
description: updated

Accepted casper into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in casper (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Martin Pitt (pitti) wrote :

Accepted casper into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in casper (Ubuntu Maverick):
status: Triaged → Fix Committed
Download full text (4.3 KiB)

looks like it is working for me.

Thanks.

Eric Deschatelets

----- Original Message ----
From: Martin Pitt <email address hidden>
To: <email address hidden>
Sent: Tue, January 25, 2011 4:49:27 AM
Subject: [Bug 557023] Re: update-initramfs: deferring update (trigger activated)
/ cp: cannot stat `/vmlinuz': No such file or directory

Accepted casper into maverick-proposed, the package will build now and
be available in a few hours. Please test and give feedback here. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed. Thank you in advance!

** Changed in: casper (Ubuntu Maverick)
       Status: Triaged => Fix Committed

--
You received this bug notification because you are a direct subscriber
of a duplicate bug (691310).
https://bugs.launchpad.net/bugs/557023

Title:
  update-initramfs: deferring update (trigger activated) / cp: cannot
  stat `/vmlinuz': No such file or directory

Status in “casper” package in Ubuntu:
  Fix Released
Status in “usb-creator” package in Ubuntu:
  Invalid
Status in “casper” source package in Lucid:
  Fix Committed
Status in “usb-creator” source package in Lucid:
  Invalid
Status in “casper” source package in Maverick:
  Fix Committed
Status in “usb-creator” source package in Maverick:
  Invalid
Status in “casper” source package in Natty:
  Fix Released
Status in “usb-creator” source package in Natty:
  Invalid

Bug description:
  Stable update justification:

  Impact: USB stick upgrades fail with obscure errors when upgrading the
  kernel. This results in very large numbers of duplicate bug reports.

  Development branch: Fixed in casper 1.253/1.254 by making the
  writable-USB-stick update-initramfs shim more robust against the bits
  it's copying not existing for various reasons, and making it be a
  separate executable which can be upgraded in ways that don't involve
  regenerating the USB stick.

  Patch:

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/lucid/casper/lucid/revision/818?compare_revid=814

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/maverick/casper/maverick/revision/843?compare_revid=841

  TEST CASE: Create an Ubuntu USB stick, making sure that you do *not*
  drag the "Stored in reserved extra space" slider all the way to the
  right in usb-creator (see bug 562312), and run 'sudo update-initramfs
  -u'. 10.04.1 and 10.10 as released should fail. A lucid daily build
  dating from after this SRU is accepted should succeed (we're unlikely
  to do more daily builds of maverick). Also, if you start from 10.04.1
  or 10.10 as released, upgrade the casper package to the current
  version in lucid-proposed or maverick-proposed after this SRU is
  accepted, and then run 'sudo update-initramfs -u', that should
  succeed.

  Regression potential: I don't think update-initramfs will fail in any
  more situations due to this change. Possible sources of regression
  are problems upgrading the casper package, and testers should also
  make sure that the upgraded image actually still boots following this
  change.

  Please note the similar bug 591207, which we're fixing along with this
  bug, and the related bug 591202 in grub2, which ...

Read more...

Martin Pitt (pitti) on 2011-01-28
tags: added: verification-done

Unfortunately, in my case I ended up with a no-longer-bootable USB drive. :-( Please let me know if there is anything specific I should look for to help you understand why this happened.

SRU verification for Lucid:
I have reproduced the problem with casper 1.236 in lucid and have verified that the version of casper 1.236.2 in -proposed fixes the issue.

Marking as verification-done

tags: removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package casper - 1.236.2

---------------
casper (1.236.2) lucid-proposed; urgency=low

  * More fixes to the USB update-initramfs shim (thanks, Evan Dandrea;
    LP: #557023, #591207):
    - Make the shim a proper executable in
      /usr/share/casper/casper-update-initramfs and symlink to it if
      necessary at boot time, so that new versions of this shim are
      automatically installed when casper is upgraded.
    - Only copy each of $bootdir/initrd.img and $bootdir/vmlinuz if they
      exist (for example, initrd.img may exist without vmlinuz if we're
      running off a fresh live USB stick and the kernel hasn't yet been
      upgraded).
 -- Colin Watson <email address hidden> Thu, 20 Jan 2011 14:26:57 +0000

Changed in casper (Ubuntu Lucid):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package casper - 1.248.1

---------------
casper (1.248.1) maverick-proposed; urgency=low

  * More fixes to the USB update-initramfs shim (thanks, Evan Dandrea;
    LP: #557023, #591207):
    - Make the shim a proper executable in
      /usr/share/casper/casper-update-initramfs and symlink to it if
      necessary at boot time, so that new versions of this shim are
      automatically installed when casper is upgraded.
    - Only copy each of $bootdir/initrd.img and $bootdir/vmlinuz if they
      exist (for example, initrd.img may exist without vmlinuz if we're
      running off a fresh live USB stick and the kernel hasn't yet been
      upgraded).
 -- Colin Watson <email address hidden> Thu, 20 Jan 2011 14:34:15 +0000

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

Duplicates of this bug

Other bug subscribers