initramfs-tools failed to install/upgrade, due to not being able to write initrd or vmlinuz.

Bug #562312 reported by Stuart
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Invalid
Undecided
Unassigned
Maverick
Won't Fix
Undecided
Unassigned
Natty
Won't Fix
Undecided
Unassigned
usb-creator (Ubuntu)
Fix Released
High
Evan
Maverick
Won't Fix
Medium
Unassigned
Natty
Fix Released
High
Evan

Bug Description

[Problem]
When dragging the "How much" slider all the way to the right, it may leave very little room left for system file updates. This can produce errors when trying to a) do a system update, b) install kernel drivers, c) anything else that requires system space outside the persistent storage.

This can also be seen on smaller USB drives (~1 GB) even if no persistent storage is present, just because there isn't that much space available to begin with.

[Discussion]
This bug appears because on live systems, new initrds are written to /cdrom/casper/initrd.lz.new (see special treatment of live systems in /usr/sbin/update-initramfs starting from line 9).

If you create a persistent live system via Startup Disk Creator and pull the "How much" slider to the right as far as possible (what seems sensible for most cases and users), all space not used for the system is allocated for that documents-and-settings-ext2-file and there is no space left on /cdrom for system file updates. Therefore update-initramfs fails with that cryptic lzma error code.

You might see different error messages depending on what process noticed the out-of-space issue. For instance, maybe there was enough space to update initramfs but not add the new kernel.

Perhaps Startup Disk Creator should leave some spare space on the live medium even if the user chooses "use all remaining space available for my live medium".

See also bug #685017 which describes one (unfortunately common) end result of this. Installation of a binary driver can overrun the available space and thus error (and potentially render the usb key useless).

[Original Report]
Binary package hint: initramfs-tools

Can not install Broadcom STA wireless driver package "bcmwl-kernel-source" in a fresh install of Lucid Beta 2 because there is an error in installing initram-fs

(bcmwl-kernel-source is correctly detected as a wireless card hardware driver)

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: initramfs-tools 0.92bubuntu71 [modified: usr/sbin/update-initramfs]
ProcVersionSignature: Ubuntu 2.6.32-19.28-generic 2.6.32.10+drm33.1
Uname: Linux 2.6.32-19-generic i686
AptOrdering:
 initramfs-tools: Configure
 bcmwl-kernel-source: Configure
Architecture: i386
Date: Tue Apr 13 13:59:53 2010
ErrorMessage: subprocess installed post-installation script returned error exit status 1
LiveMediaBuild: Ubuntu 10.04 "Lucid Lynx" - Beta i386 (20100406.1)
PackageArchitecture: all
SourcePackage: initramfs-tools
Title: package initramfs-tools 0.92bubuntu71 [modified: usr/sbin/update-initramfs] failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Revision history for this message
Stuart (stuartneilson) wrote :
Revision history for this message
Stuart (stuartneilson) wrote :

The important bit here is apparently:

  Setting up initramfs-tools (0.92bubuntu71) ...
  update-initramfs: deferring update (trigger activated)
  lzma: Encoder error: -2147467259

which simply means that there was insufficient space on the device to write the new kernel module.

However, I tried this again using a much larger USB device and generated an entirely different error - the update-initramfs trigger attempts to stat /vmlinuz and this a a link to a file that no longer exists, so again the wireless installation fails.

Revision history for this message
Stuart (stuartneilson) wrote :

I created an Ubuntu 10.04 Beta 2 USB Startup Disk with 4GB persistent space and ran a full update after booting.

The link /vmlinuz points to a missing file boot/vmlinuz-2.6.32-19-generic - this file does not exist on the USB Startup Disk, it is not installed when the disk is created. The absence of this file prevents some updates and package installations from completing.

As a workaround, sudo cp /boot/vmlinuz-2.6.32-20-generic /boot/vmlinuz-2.6.32-19-generic, will allow installation to complete. There is an error on the first reboot, after which Ubuntu 10.04 appears to boot correctly with wireless enabled.

summary: package initramfs-tools 0.92bubuntu71 [modified: usr/sbin/update-
- initramfs] failed to install/upgrade: subprocess installed post-
- installation script returned error exit status 1
+ initramfs] failed to install/upgrade: lzma: Encoder error: -2147467259
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote : Re: package initramfs-tools 0.92bubuntu71 [modified: usr/sbin/update-initramfs] failed to install/upgrade: lzma: Encoder error: -2147467259

thanks for your report.

Maybe related to bug 557023

Changed in initramfs-tools (Ubuntu):
status: New → Triaged
Revision history for this message
elPraga (elpraga) wrote :

I see the same error when installing 10.04 on USB stick. It is curious that doing the same while using LiveCD session proceeds without any errors. The same media, same hw.

Revision history for this message
Daniel C. Axelrod (daxelrod) wrote :

In my case ( bug #645700 ) there were over 700MB free, so presumably lzma did not run out of space.

In my case, /vmlinuz does point to a valid file, but I have no idea if this was true before the update:

~$ ls -al /vmlinuz
lrwxrwxrwx 1 root root 30 2010-09-17 00:28 /vmlinuz -> boot/vmlinuz-2.6.32-24-generic
~$ sudo ls -al /boot/vmlinuz-2.6.32-24-generic
-rw-r--r-- 1 root root 4034976 2010-09-16 18:14 /boot/vmlinuz-2.6.32-24-generic

Revision history for this message
nh2 (nh2) wrote :

This bug appears because on live systems, new initrds are written to /cdrom/casper/initrd.lz.new (see special treatment of live systems in /usr/sbin/update-initramfs starting from line 9).

If you create a persistent live system via Startup Disk Creator and pull the "How much" slider to the right as far as possible (what seems sensible for most cases and users), all space not used for the system is allocated for that documents-and-settings-ext2-file and there is no space left on /cdrom. Therefore update-initramfs fails with that cryptic lzma error code.

Perhaps Startup Disk Creator should leave some spare space on the live medium even if the user chooses "use all remaining space available for my live medium".

Bryce Harrington (bryce)
description: updated
Bryce Harrington (bryce)
description: updated
summary: - package initramfs-tools 0.92bubuntu71 [modified: usr/sbin/update-
- initramfs] failed to install/upgrade: lzma: Encoder error: -2147467259
+ initramfs-tools failed to install/upgrade, due to all space on usb key
+ reserved for persistent storage. No space left to write initrd or
+ vmlinuz.
Revision history for this message
Bryce Harrington (bryce) wrote : Re: initramfs-tools failed to install/upgrade, due to all space on usb key reserved for persistent storage. No space left to write initrd or vmlinuz.

I think there are several things that need to be done to address this class of bugs:

1. Jockey needs to be more attentive to the lack of space on the root device. This will be the focus for bug #685017. It should detect the situation and give the user an error message dialog, without trying to do the installation.

2. usb-creator needs to not let the user reserve 100% of the space to documents, or should display an appropriate warning or UI to indicate that if they do not preserve some space for system files, the usb key will become non-functional. I recommend something like the following:

  * For 1G USB keys, do not offer persistent storage at all
  * For 2G to 4G USB keys, make sure there is 800M or so remaining after creating casper-rw - enough space to update to a new kernel, write initrd, and other system type things needed.
  * For >4G USB keys, put the casper-rw on its own partition separate from the system files. Ensure there's at least 1G of space for system files, to install kernels and so on.

Revision history for this message
Bryce Harrington (bryce) wrote :

Focusing this bug report on item #2 in my previous comment.

Changed in usb-creator (Ubuntu):
importance: Undecided → Critical
milestone: none → natty-alpha-2
status: New → Triaged
Revision history for this message
Bryce Harrington (bryce) wrote :

I think partly there may be some confusion in the UI. The slider doesn't really make it clear that in involves a tradeoff of space allocation between the system boot files, and the installation. So maybe it could use something that turns red or shows a warning if you drag above some threshold (90% or 800M or whatever).

With a 1G usb stick, it might make sense to advise the user that they will not be able to install kernel drivers due to space limitations.

Revision history for this message
Bryce Harrington (bryce) wrote :

It may be that the UI is a bit confusing, in that it's a bit non-intuitive that moving the slider all the way to the right could make the stick not work properly. The wording "persistence" could be interpreted to mean that it provides persistent space for system updates including kernel installs and so on, and people who would want to do that would logically choose to maximize the space for that, and be surprised that it didn't work this way.

An idea to make this clearer could be to present the slider as a choice between "document storage" and "system space", or some such. Or, it could show something red or pop a warning if the user selects an amount of space which could make it difficult to update kernel drivers. (Or maybe both.)

Bryce Harrington (bryce)
description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

Actually, with a bit more testing, the issue is not that there isn't space but that the boot partition isn't writable, or at least writes don't persist from one boot to the next.

It is starting to sound like this is just a fundamental issue with the livecd environment, and that installation of -fglrx and -nvidia in livecds is just not a supportable option at this time. So I guess Jockey should be configured to not permit the user to do this (bug #685017).

summary: - initramfs-tools failed to install/upgrade, due to all space on usb key
- reserved for persistent storage. No space left to write initrd or
- vmlinuz.
+ initramfs-tools failed to install/upgrade, due to not being able to
+ write initrd or vmlinuz.
Changed in usb-creator (Ubuntu):
importance: Critical → High
Revision history for this message
Evan (ev) wrote :

I'm happy to add a reserved amount of space for the kernel and initramfs as a stop-gap measure until we have GRUB2 on the CDs. After which, I'd like us to write the kernel and initramfs in casper-rw, and have grub first attempt to read it from there.

Changed in usb-creator (Ubuntu):
assignee: nobody → Evan Dandrea (ev)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package usb-creator - 0.2.27

---------------
usb-creator (0.2.27) natty; urgency=low

  [ Mario Limonciello ]
  * If the EFI bootloader isn't present in the proper location but efi.img is
    available in boot/grub, extract the EFI bootloader and place it in the proper
    location. (LP: #677260)

  [ Evan Dandrea ]
  * Hide partition table block devices by default. To revert to the
    previous behavior, pass --show-all to usb-creator-gtk.
  * Increase the minimum persistent storage size to 1G.
  * Add a 30MB padding for the kernel and initramfs (LP: #562312).
 -- Evan Dandrea <email address hidden> Fri, 28 Jan 2011 15:42:25 +0000

Changed in usb-creator (Ubuntu Natty):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

I've seen quite a few apport-package bug reports coming in from people using USB persistance with Natty but having created them with Maverick which still has this bug. It seems like it'd be a good idea to fix this in Maverick and prevent reporting of these bugs.

Changed in usb-creator (Ubuntu Maverick):
assignee: nobody → Evan Dandrea (ev)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately, the package installation error message that you have received is actually a failure with lzma and a generic one at that. The following steps may help resolve the issue. Please execute the following command, as it will clear your package cache, in a terminal:

sudo apt-get clean

Then try performing the update again. This may resolve your issue. We plan to make lzma errors more informative and that work is being tracked in bug 691985 which I will mark this a duplicate of.

Changed in initramfs-tools (Ubuntu):
status: Triaged → Confirmed
Changed in usb-creator (Ubuntu):
status: Fix Released → Confirmed
Changed in initramfs-tools (Ubuntu Maverick):
status: New → Confirmed
Changed in usb-creator (Ubuntu Maverick):
status: Triaged → Confirmed
Changed in initramfs-tools (Ubuntu Natty):
status: Triaged → Confirmed
Changed in usb-creator (Ubuntu Natty):
status: Fix Released → Confirmed
tags: added: lzma-efail
Changed in usb-creator (Ubuntu):
status: Confirmed → Fix Released
Changed in usb-creator (Ubuntu Natty):
status: Confirmed → Fix Released
Changed in initramfs-tools (Ubuntu):
status: Confirmed → Triaged
Changed in usb-creator (Ubuntu Maverick):
status: Confirmed → Triaged
Evan (ev)
Changed in usb-creator (Ubuntu Maverick):
assignee: Evan Dandrea (ev) → nobody
Changed in initramfs-tools (Ubuntu Natty):
status: Confirmed → Won't Fix
Changed in initramfs-tools (Ubuntu Maverick):
status: Confirmed → Won't Fix
Changed in usb-creator (Ubuntu Maverick):
status: Triaged → Won't Fix
Revision history for this message
dino99 (9d9) wrote :

This version has expired

Changed in initramfs-tools (Ubuntu):
status: Triaged → Invalid
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.